|
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
@java.lang.SuppressWarningsthis.outputs = outputs; 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()
Registers the provided handler to all input channels |
void
|
afterStop()
|
void
|
checkPoison(java.lang.Object data)
|
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)
Handles the poisson message. |
void
|
registerChannelListenersToAllInputs(DataflowChannelListener handler)
|
void
|
reportException(java.lang.Throwable e)
|
MessageStream
|
send(java.lang.Object message)
All messages unhandled by sub-classes will result in an exception being thrown |
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 |
---|
@java.lang.SuppressWarningsvoid afterStop() { DataflowProcessorActor(DataflowProcessor owningProcessor, PGroup group, java.util.List outputs, java.util.List inputs, groovy.lang.Closure code)
Method Detail |
---|
void afterStart()
handler
- The closure to invoke whenever a value gets bound to any of the input channels
void afterStop()
final void checkPoison(java.lang.Object data)
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)
@java.lang.Overridefinal void checkPoison(final Object data) { public void onMessage(java.lang.Object message)
data
- The poisson to re-send
final void registerChannelListenersToAllInputs(DataflowChannelListener handler)
final void reportException(java.lang.Throwable e)
@java.lang.Override public MessageStream send(java.lang.Object message)
message
- The unhandled message
Copyright © 2008–2013 Václav Pech. All Rights Reserved.