public class DataflowEventAdapter extends java.lang.Object
A default empty implementation of DataflowEventListener
Constructor and description |
---|
DataflowEventAdapter
() |
Type | Name and description |
---|---|
void |
afterRun(DataflowProcessor processor, java.util.List<java.lang.Object> messages) Invoked when the operator completes a single run. |
void |
afterStart(DataflowProcessor processor) Invoked immediately after the operator starts by a pooled thread before the first message is obtained |
void |
afterStop(DataflowProcessor processor) Invoked immediately after the operator terminates |
java.util.List<java.lang.Object> |
beforeRun(DataflowProcessor processor, java.util.List<java.lang.Object> messages) Invoked when all messages required to trigger the operator become available in the input channels. |
java.lang.Object |
controlMessageArrived(DataflowProcessor processor, DataflowReadChannel<java.lang.Object> channel, int index, java.lang.Object message) Invoked when a control message (instances of ControlMessage) becomes available in an input channel. |
java.lang.Object |
customEvent(DataflowProcessor processor, java.lang.Object data) Invoked when the fireCustomEvent() method is triggered manually on a dataflow operator/selector. |
java.lang.Object |
messageArrived(DataflowProcessor processor, DataflowReadChannel<java.lang.Object> channel, int index, java.lang.Object message) Invoked when a message becomes available in an input channel. |
java.lang.Object |
messageSentOut(DataflowProcessor processor, DataflowWriteChannel<java.lang.Object> channel, int index, java.lang.Object message) Invoked when a message is being bound to an output channel. |
boolean |
onException(DataflowProcessor processor, java.lang.Throwable e) Invoked if an exception occurs. |
void |
registered(DataflowProcessor processor) Invoked immediately after the listener has been attached to a dataflow processor. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Invoked when the operator completes a single run. When using maxForks, the method may be invoked from threads running the forks.
processor
- The reporting dataflow operator/selectormessages
- The incoming messages that have been processedInvoked immediately after the operator starts by a pooled thread before the first message is obtained
processor
- The reporting dataflow operator/selectorInvoked immediately after the operator terminates
processor
- The reporting dataflow operator/selectorInvoked when all messages required to trigger the operator become available in the input channels.
processor
- The reporting dataflow operator/selectormessages
- The incoming messagesInvoked when a control message (instances of ControlMessage) becomes available in an input channel.
processor
- The reporting dataflow operator/selectorchannel
- The input channel holding the messageindex
- The index of the input channel within the operatormessage
- The incoming messageInvoked when the fireCustomEvent() method is triggered manually on a dataflow operator/selector. This implementation returns the original piece of data. When using maxForks, the method may be invoked from threads running the forks.
processor
- The reporting dataflow operator/selectordata
- The custom piece of data provided as part of the eventInvoked when a message becomes available in an input channel.
processor
- The reporting dataflow operator/selectorchannel
- The input channel holding the messageindex
- The index of the input channel within the operatormessage
- The incoming messageInvoked when a message is being bound to an output channel. When using maxForks, the method may be invoked from threads running the forks.
processor
- The reporting dataflow operator/selectorchannel
- The output channel to send the message toindex
- The index of the output channel within the operatormessage
- The message to sendInvoked if an exception occurs. Unless overriden by subclasses this implementation returns true to terminate the operator. If any of the listeners returns true, the operator will terminate. Exceptions outside of the operator's body or listeners' messageSentOut() handlers will terminate the operator irrespective of the listeners' votes. When using maxForks, the method may be invoked from threads running the forks.
processor
- The reporting dataflow operator/selectore
- The thrown exceptionInvoked immediately after the listener has been attached to a dataflow processor.
processor
- The reporting dataflow operator/selectorCopyright © 2008–2014 Václav Pech. All Rights Reserved.