groovyx.gpars.actor
[Java] Class StaticDispatchActor
java.lang.Object
groovyx.gpars.serial.WithSerialId
groovyx.gpars.actor.impl.MessageStream
groovyx.gpars.actor.Actor
groovyx.gpars.actor.AbstractLoopingActor
groovyx.gpars.actor.StaticDispatchActor
@SuppressWarnings({"ThisEscapedInObjectConstruction"})
public abstract class StaticDispatchActor
extends AbstractLoopingActor
Offers a statically dispatched and thus slightly faster alternative to the DynamicDispatchActor class.
Message handlers are discovered at compile-time.
Fields inherited from class Actor
|
ACTOR_HAS_ALREADY_BEEN_STARTED, AFTER_START, CANNOT_SEND_REPLIES_NO_SENDER_HAS_BEEN_REGISTERED, EMPTY_ARGUMENTS, ON_DELIVERY_ERROR, RESPONDS_TO, START_MESSAGE, STOP_MESSAGE, TERMINATE_MESSAGE, TIMEOUT, TIMEOUT_MESSAGE, currentActorPerThread, currentThread, joinLatch, onStop, parallelGroup, serialVersionUID, timer |
Method Summary |
void
|
onMessage(java.lang.Object message)
Handles the incoming messages.
|
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 Actor
|
callDynamic, createActorMessage, createRemoteHandle, deregisterCurrentActorWithThread, getJoinLatch, getParallelGroup, handleException, handleInterrupt, handleStart, handleTermination, handleTimeout, hasBeenStopped, isActive, isActorThread, join, join, join, join, onStop, registerCurrentActorWithThread, sendAndContinue, sendAndPromise, setParallelGroup, silentStart, start, stop, sweepNextMessage, sweepQueue, terminate, threadBoundActor |
serialVersionUID
private static final long serialVersionUID
-
StaticDispatchActor
protected StaticDispatchActor()
- Creates a new instance
onMessage
public void onMessage(java.lang.Object message)
- Handles the incoming messages. Needs to be implemented in sub-classes.
- Parameters:
message
- The message at the head of the mail box
Copyright © 2008–2012 Václav Pech. All Rights Reserved.