groovyx.gpars.actor
Class Actor.RemoteActor
java.lang.Object
groovyx.gpars.serial.WithSerialId
groovyx.gpars.actor.impl.MessageStream
groovyx.gpars.actor.Actor
groovyx.gpars.actor.Actor.RemoteActor
- All Implemented Interfaces:
- RemoteSerialized, java.io.Serializable
- Enclosing class:
- Actor
public static class Actor.RemoteActor
- extends Actor
- implements RemoteSerialized
- See Also:
- Serialized Form
Methods inherited from class groovyx.gpars.actor.Actor |
createActorMessage, createRemoteHandle, deregisterCurrentActorWithThread, getJoinLatch, getParallelGroup, handleException, handleInterrupt, handleStart, handleTermination, handleTimeout, isActorThread, join, join, join, join, onStop, registerCurrentActorWithThread, sendAndContinue, setParallelGroup, sweepQueue, threadBoundActor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
remoteHost
private final RemoteHost remoteHost
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
Actor.RemoteActor
public Actor.RemoteActor(SerialContext host,
DataflowExpression<java.lang.Object> jointLatch)
silentStart
public Actor silentStart()
- Description copied from class:
Actor
- Starts the Actor without sending the START_MESSAGE message to speed the start-up.
The potential custom afterStart handlers won't be run.
No messages can be sent or received before an Actor is started.
- Specified by:
silentStart
in class Actor
- Returns:
- same actor
start
public Actor start()
- Description copied from class:
Actor
- Starts the Actor and sends it the START_MESSAGE to run any afterStart handlers.
No messages can be sent or received before an Actor is started.
- Specified by:
start
in class Actor
- Returns:
- same actor
stop
public Actor stop()
- Description copied from class:
Actor
- Send message to stop to the Actor. The actor will finish processing the current message and all unprocessed messages will be passed to the afterStop method, if such exists.
No new messages will be accepted since that point.
Has no effect if the Actor is not started.
- Specified by:
stop
in class Actor
- Returns:
- same actor
terminate
public Actor terminate()
- Description copied from class:
Actor
- Terminates the Actor. Unprocessed messages will be passed to the afterStop method, if exists.
No new messages will be accepted since that point.
Has no effect if the Actor is not started.
- Specified by:
terminate
in class Actor
- Returns:
- same actor
isActive
public boolean isActive()
- Description copied from class:
Actor
- Checks the current status of the Actor.
- Specified by:
isActive
in class Actor
- Returns:
- current status of the Actor.
hasBeenStopped
protected boolean hasBeenStopped()
- Specified by:
hasBeenStopped
in class Actor
sweepNextMessage
protected ActorMessage sweepNextMessage()
- Description copied from class:
Actor
- Removes the head of the message queue
- Specified by:
sweepNextMessage
in class Actor
- Returns:
- The head message, or null, if the message queue is empty
send
public MessageStream send(java.lang.Object message)
- Description copied from class:
MessageStream
- Send message to stream and return immediately
- Specified by:
send
in class MessageStream
- Parameters:
message
- message to send
- Returns:
- always return message stream itself