abstract class DataflowProcessorActor extends StaticDispatchActor<java.lang.Object>
Actor.MyRemoteHandle, Actor.RemoteActor
MessageStream.RemoteMessageStream, MessageStream.SendTo
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CANNOT_OBTAIN_THE_SEMAPHORE_TO_FORK_OPERATOR_S_BODY |
protected groovy.lang.Closure |
code |
protected java.util.List |
inputs |
protected java.util.List |
outputs |
protected DataflowProcessor |
owningProcessor |
protected boolean |
stoppingGently |
ACTOR_HAS_ALREADY_BEEN_STARTED, CANNOT_SEND_REPLIES_NO_SENDER_HAS_BEEN_REGISTERED, currentThread, parallelGroup, START_MESSAGE, STOP_MESSAGE, TERMINATE_MESSAGE, TIMEOUT, TIMEOUT_MESSAGE, timer
serialHandle
Constructor and Description |
---|
DataflowProcessorActor(DataflowProcessor owningProcessor,
PGroup group,
java.util.List outputs,
java.util.List inputs,
groovy.lang.Closure code) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
afterStart() |
(package private) void |
afterStop() |
(package private) void |
checkPoison(java.lang.Object data)
Handles the poisson message.
|
protected java.lang.Object |
fireMessageArrived(java.lang.Object result,
int index,
boolean controlMessage) |
protected void |
forwardPoisonPill(java.lang.Object data) |
(package private) static boolean |
isControlMessage(java.lang.Object message) |
(package private) void |
onException(java.lang.Throwable e) |
void |
onMessage(java.lang.Object message)
All messages unhandled by sub-classes will result in an exception being thrown
|
(package private) void |
registerChannelListenersToAllInputs(DataflowChannelListener<java.lang.Object> handler)
Registers the provided handler to all input channels
|
(package private) void |
reportException(java.lang.Throwable e) |
MessageStream |
send(java.lang.Object message)
Sends the message, ignoring exceptions caused by the actor not being active anymore
|
getSender, hasBeenStopped, initialize, isActive, isFair, makeFair, reply, replyIfExists, setParallelGroup, setTimeout, silentStart, start, stop, sweepNextMessage, terminate
createActorMessage, createRemoteHandle, deregisterCurrentActorWithThread, getJoinLatch, getParallelGroup, handleException, handleInterrupt, handleStart, handleTermination, handleTimeout, isActorThread, join, join, join, join, onStop, registerCurrentActorWithThread, sendAndContinue, sendAndPromise, threadBoundActor
call, getRemoteClass, leftShift, send, send, sendAndWait, sendAndWait, sendAndWait
getOrCreateSerialHandle, writeReplace
protected static final java.lang.String CANNOT_OBTAIN_THE_SEMAPHORE_TO_FORK_OPERATOR_S_BODY
protected final java.util.List inputs
protected final java.util.List outputs
protected final groovy.lang.Closure code
protected final DataflowProcessor owningProcessor
protected boolean stoppingGently
DataflowProcessorActor(DataflowProcessor owningProcessor, PGroup group, java.util.List outputs, java.util.List inputs, groovy.lang.Closure code)
void afterStart()
void afterStop()
final void registerChannelListenersToAllInputs(DataflowChannelListener<java.lang.Object> handler)
handler
- The closure to invoke whenever a value gets bound to any of the input channelsfinal void onException(java.lang.Throwable e)
public MessageStream send(java.lang.Object message)
send
in class AbstractLoopingActor
message
- The message to sendpublic void onMessage(java.lang.Object message)
onMessage
in class StaticDispatchActor<java.lang.Object>
message
- The unhandled messagestatic boolean isControlMessage(java.lang.Object message)
final void checkPoison(java.lang.Object data)
data
- The poisson to re-sendprotected void forwardPoisonPill(java.lang.Object data)
final void reportException(java.lang.Throwable e)
protected java.lang.Object fireMessageArrived(java.lang.Object result, int index, boolean controlMessage)