|
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.impl.ReplyingMessageStream groovyx.gpars.actor.impl.SequentialProcessingActor groovyx.gpars.actor.BlockingActor
@java.lang.SuppressWarnings* @param message The original message public abstract class BlockingActor extends SequentialProcessingActor
Field Summary | |
---|---|
static java.lang.String |
AN_ACTOR_CAN_ONLY_RECEIVE_ONE_MESSAGE_AT_A_TIME
|
private static java.lang.String |
THE_ACTOR_HAS_BEEN_STOPPED
|
private static java.lang.String |
THE_ACTOR_HAS_NOT_BEEN_STARTED
|
private static long |
serialVersionUID
|
Fields inherited from class ReplyingMessageStream | |
---|---|
sender, serialVersionUID |
Fields inherited from class MessageStream | |
---|---|
serialVersionUID |
Fields inherited from class WithSerialId | |
---|---|
serialHandle, serialVersionUID |
Constructor Summary | |
BlockingActor()
|
Method Summary | |
---|---|
private void
|
checkStoppedFlags()
|
private java.lang.Object
|
enhanceAndUnwrap(ActorMessage message)
|
private void
|
enhanceReplies(ActorMessage message)
Retrieves a message from the message queue, waiting, if necessary, for a message to arrive. |
protected void
|
handleStart()
|
protected void
|
receive(groovy.lang.Closure handler)
|
protected void
|
receive(long timeout, java.util.concurrent.TimeUnit timeUnit, groovy.lang.Closure handler)
Retrieves a message from the message queue, waiting, if necessary, for a message to arrive. |
protected void
|
receive(groovy.time.Duration duration, groovy.lang.Closure handler)
Retrieves a message from the message queue, waiting, if necessary, for a message to arrive. |
protected java.lang.Object
|
receiveImpl()
Retrieves a message from the message queue, waiting, if necessary, for a message to arrive. |
protected java.lang.Object
|
receiveImpl(long timeout, java.util.concurrent.TimeUnit units)
|
Methods inherited from class SequentialProcessingActor | |
---|---|
act, awaitNextMessage, checkStopTerminate, handleTermination, hasBeenStopped, isActive, pollMessage, receive, receive, receive, receiveImpl, receiveImpl, retrieveNextMessage, run, send, setParallelGroup, silentStart, start, stop, sweepNextMessage, takeMessage, takeMessage, terminate, throwIfNeeded, transferQueues, unwrapMessage |
Methods inherited from class ReplyingMessageStream | |
---|---|
getSender, reply, replyIfExists, setSender |
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 |
---|
public static final java.lang.String AN_ACTOR_CAN_ONLY_RECEIVE_ONE_MESSAGE_AT_A_TIME
private static final java.lang.String THE_ACTOR_HAS_BEEN_STOPPED
private static final java.lang.String THE_ACTOR_HAS_NOT_BEEN_STARTED
private static final long serialVersionUID
Constructor Detail |
---|
BlockingActor()
Method Detail |
---|
private void checkStoppedFlags()
private java.lang.Object enhanceAndUnwrap(ActorMessage message)
private void enhanceReplies(ActorMessage message)
@java.lang.Override protected void handleStart()
@java.lang.SuppressWarningshandler.call(); protected final void receive(groovy.lang.Closure handler)
protected final void receive(long timeout, java.util.concurrent.TimeUnit timeUnit, groovy.lang.Closure handler)
timeout
- how long to wait before giving up, in units of unittimeUnit
- a TimeUnit determining how to interpret the timeout parameterhandler
- A closure accepting the retrieved message as a parameter, which will be invoked after a message is received.
@java.lang.SuppressWarnings protected final void receive(groovy.time.Duration duration, groovy.lang.Closure handler)
duration
- how long to wait before giving up, in units of unithandler
- A closure accepting the retrieved message as a parameter, which will be invoked after a message is received.
@java.lang.Override protected final java.lang.Object receiveImpl()
timeout
- how long to wait before giving up, in units of unitunits
- a TimeUnit
determining how to interpret the timeout parameter
@java.lang.Overrideprivate void checkStoppedFlags() { protected final java.lang.Object receiveImpl(long timeout, java.util.concurrent.TimeUnit units)
Copyright © 2008–2013 Václav Pech. All Rights Reserved.