| Consumer | R Documentation |
A Class for reading and executing tasks from a source
A Class for reading and executing tasks from a source
handlersA list of handlers
stoppedIs currently stopped.
laterHandleA callback handle.
new()Creates the object.
Consumer$new(source)
sourceA source, e.g. TextFileSource.
setSource()Sets the source.
Consumer$setSource(source)
sourceA source, e.g. TextFileSource.
getSource()Gets the source.
Consumer$getSource()
consume()Executes all (unprocessed) signals fired to source from a Producer.
if throwErrors is TRUE, the first error encountered is thrown
after executing all signals. Signals are executed in the env environment.
If env is NULL, the environment set at initialization is used.
Consumer$consume(throwErrors = TRUE, env = parent.frame())
throwErrorsShould errors be thrown or caught.
envThe execution environment.
start()Starts executing consume every millis milliseconds. throwErrors
and env are passed down to consume
Consumer$start(millis = 250, env = parent.frame())
millismilliseconds.
envThe execution environment.
stop()Stops the periodic execution of consume.
Consumer$stop()
addHandler()Adds a handler for 'signal'. func
Consumer$addHandler(func, signal)
funcThe function which takes three parameters: 1. the signal, 2. the message object, and 3. the evaluation environment.
signalA string to bind the function to.
clearHandlers()Removes all handler.s
Consumer$clearHandlers()
removeHandler()Removes a single handler.
Consumer$removeHandler(signal, index)
signalThe signal of the handler.
indexThe index of the handler to remove from the signal.
initHandlers()Adds default handlers.
Consumer$initHandlers()
finalize()cleans up object.
Consumer$finalize()
clone()The objects of this class are cloneable with this method.
Consumer$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.