|
org.codehaus.gpars | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgroovyx.gpars.serial.WithSerialId
groovyx.gpars.actor.impl.MessageStream
groovyx.gpars.actor.impl.MessageStream.ResultWaiter
private static class MessageStream.ResultWaiter extends MessageStream
Represents a pending request for a reply from an actor.
- The type of expected reply message| Field Summary | |
|---|---|
private boolean |
isSet
|
private static long |
serialVersionUID
|
private java.lang.Object |
value
Holds a reference to the calling thread, while waiting, and the received reply message, once it has arrived. |
| Fields inherited from class MessageStream | |
|---|---|
| serialVersionUID |
| Fields inherited from class WithSerialId | |
|---|---|
| serialHandle, serialVersionUID |
| Constructor Summary | |
private MessageStream.ResultWaiter()
|
|
| Method Summary | |
|---|---|
java.lang.Object
|
getResult()
Retrieves the response blocking until a message arrives |
java.lang.Object
|
getResult(long timeout, java.util.concurrent.TimeUnit units)
Retrieves the response blocking until a message arrives |
void
|
onDeliveryError(java.lang.Object msg)
Handle cases when the message sent to the actor doesn't get delivered |
private void
|
rethrowException()
|
MessageStream
|
send(java.lang.Object message)
Accepts the message as a reply and wakes up the sleeping thread. |
| 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 |
|---|
private boolean isSet
private static final long serialVersionUID
private java.lang.Object value
| Constructor Detail |
|---|
private MessageStream.ResultWaiter()
| Method Detail |
|---|
@SuppressWarnings("unchecked")
public java.lang.Object getResult()
public java.lang.Object getResult(long timeout, java.util.concurrent.TimeUnit units)
timeout - How long to waitunits - Unit for the timeout
@SuppressWarnings("unused") // TODO: Eclipse requires this to be tagged as unused.
public void onDeliveryError(java.lang.Object msg)
msg - The message that failed to get delivered
private void rethrowException()
@Override public MessageStream send(java.lang.Object message)
message - message to send
Copyright © 2008–2012 Václav Pech. All Rights Reserved.