|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovyx.gpars.serial.WithSerialId
gpars.actor.impl.MessageStream
gpars.actor.impl.ReceivingMessageStream
@SuppressWarnings({"ThrowableInstanceNeverThrown"}) public abstract class ReceivingMessageStream extends MessageStream
Nested Class Summary | |
---|---|
static class |
ReceivingMessageStream.ReplyCategory
Enhances objects with the ability to send replies and detect message originators. |
Field Summary | |
---|---|
protected WeakHashMap |
obj2Sender
|
Method Summary | |
---|---|
protected List
|
getSenders()
|
protected Object
|
receive()
Retrieves a message from the message queue, waiting, if necessary, for a message to arrive. |
protected Object
|
receive(long timeout, TimeUnit units)
Retrieves a message from the message queue, waiting, if necessary, for a message to arrive. |
protected Object
|
receive(groovy.time.BaseDuration duration)
Retrieves a message from the message queue, waiting, if necessary, for a message to arrive. |
protected Object
|
receiveImpl()
Retrieves a message from the message queue, waiting, if necessary, for a message to arrive. |
protected Object
|
receiveImpl(long timeout, TimeUnit units)
Retrieves a message from the message queue, waiting, if necessary, for a message to arrive. |
protected void
|
reply(Object message)
Sends a reply to all currently processed messages. |
protected void
|
replyIfExists(Object message)
Sends a reply to all currently processed messages, which have been sent by an actor. |
Methods inherited from class MessageStream | |
---|---|
call, getRemoteClass, leftShift, send, send, send, sendAndContinue, sendAndWait, sendAndWait, sendAndWait |
Field Detail |
---|
protected final WeakHashMap obj2Sender
Method Detail |
---|
@SuppressWarnings({"ReturnOfCollectionOrArrayField"}) protected final List getSenders()
protected final Object receive()
protected final Object receive(long timeout, TimeUnit units)
timeout
- how long to wait before giving up, in units of unitunits
- a TimeUnit determining how to interpret the timeout parameter
protected final Object receive(groovy.time.BaseDuration duration)
duration
- how long to wait before giving up, in units of unit
protected Object receiveImpl()
protected Object receiveImpl(long timeout, TimeUnit units)
timeout
- how long to wait before giving up, in units of unitunits
- a TimeUnit determining how to interpret the timeout parameter
protected final void reply(Object message)
message
- reply message
protected final void replyIfExists(Object message)
message
- reply message
Groovy Documentation