|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovyx.gpars.serial.WithSerialId groovyx.gpars.actor.impl.MessageStream groovyx.gpars.actor.Actor groovyx.gpars.actor.AbstractLoopingActor groovyx.gpars.actor.StaticDispatchActor groovyx.gpars.dataflow.operator.DataflowProcessorActor
@SuppressWarnings({"RawUseOfParameterizedType"}) abstract class DataflowProcessorActor extends StaticDispatchActor
A base actor class for operators' and selectors' actors
Field Summary | |
---|---|
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
|
Fields inherited from class StaticDispatchActor | |
---|---|
serialVersionUID |
Fields inherited from class AbstractLoopingActor | |
---|---|
core, currentSender, currentTimerTask, serialVersionUID, stoppedFlag, terminatedFlag, terminatingFlag, timeoutCounter |
Fields inherited from class MessageStream | |
---|---|
serialVersionUID |
Fields inherited from class WithSerialId | |
---|---|
serialHandle, serialVersionUID |
Constructor Summary | |
DataflowProcessorActor(DataflowProcessor owningProcessor, PGroup group, java.util.List outputs, java.util.List inputs, groovy.lang.Closure code)
|
Method Summary | |
---|---|
void
|
afterStart()
|
void
|
afterStop()
|
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)
|
static boolean
|
isControlMessage(java.lang.Object message)
|
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 |
void
|
registerChannelListenersToAllInputs(DataflowChannelListener handler)
Registers the provided handler to all input channels |
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 |
Methods inherited from class StaticDispatchActor | |
---|---|
onMessage |
Methods inherited from class AbstractLoopingActor | |
---|---|
cancelCurrentTimeoutTask, doStart, getCore, getSender, hasBeenStopped, initialize, isActive, isFair, makeFair, reply, replyIfExists, runEnhancedWithoutRepliesOnMessages, send, setParallelGroup, setTimeout, silentStart, start, stop, sweepNextMessage, terminate |
Methods inherited from class MessageStream | |
---|---|
call, getRemoteClass, leftShift, reInterrupt, send, send, send, sendAndWait, sendAndWait, sendAndWait |
Methods inherited from class WithSerialId | |
---|---|
createRemoteHandle, getOrCreateSerialHandle, getRemoteClass, writeReplace |
Field Detail |
---|
protected static final java.lang.String CANNOT_OBTAIN_THE_SEMAPHORE_TO_FORK_OPERATOR_S_BODY
protected final groovy.lang.Closure code
protected final java.util.List inputs
protected final java.util.List outputs
protected final DataflowProcessor owningProcessor
protected boolean stoppingGently
Constructor Detail |
---|
@SuppressWarnings({"AssignmentToCollectionOrArrayFieldFromParameter"}) DataflowProcessorActor(DataflowProcessor owningProcessor, PGroup group, java.util.List outputs, java.util.List inputs, groovy.lang.Closure code)
Method Detail |
---|
void afterStart()
void afterStop()
final void checkPoison(java.lang.Object data)
data
- The poisson to re-send
protected java.lang.Object fireMessageArrived(java.lang.Object result, int index, boolean controlMessage)
protected void forwardPoisonPill(java.lang.Object data)
static boolean isControlMessage(java.lang.Object message)
final void onException(java.lang.Throwable e)
@Override public void onMessage(java.lang.Object message)
message
- The unhandled message
final void registerChannelListenersToAllInputs(DataflowChannelListener handler)
handler
- The closure to invoke whenever a value gets bound to any of the input channels
final void reportException(java.lang.Throwable e)
@Override public MessageStream send(java.lang.Object message)
message
- The message to send
Copyright © 2008–2012 Václav Pech. All Rights Reserved.