org.codehaus.gpars

groovyx.gpars.actor.impl
[Java] Class MessageStream.ResultWaiter

java.lang.Object
  groovyx.gpars.serial.WithSerialId
      groovyx.gpars.actor.impl.MessageStream
          groovyx.gpars.actor.impl.MessageStream.ResultWaiter

private static class MessageStream.ResultWaiter
extends MessageStream

Field Summary
private boolean isSet

private static long serialVersionUID

private java.lang.Object value

 
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)

void onDeliveryError(java.lang.Object msg)

private void rethrowException()

Handle cases when the message sent to the actor doesn't get delivered

MessageStream send(java.lang.Object message)

 
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

isSet

private boolean isSet


serialVersionUID

private static final long serialVersionUID


value

private java.lang.Object value


 
Constructor Detail

MessageStream.ResultWaiter

private MessageStream.ResultWaiter()


 
Method Detail

getResult

@java.lang.SuppressWarnings*
public java.lang.Object getResult()
Retrieves the response blocking until a message arrives
throws:
InterruptedException If the thread gets interrupted
Returns:
The received message


getResult

public java.lang.Object getResult(long timeout, java.util.concurrent.TimeUnit units)


onDeliveryError

@java.lang.SuppressWarnings@Override
        public MessageStream send(Object message) {
public void onDeliveryError(java.lang.Object msg)


rethrowException

private void rethrowException()
Handle cases when the message sent to the actor doesn't get delivered
Parameters:
msg - The message that failed to get delivered


send

@java.lang.Override/**
public MessageStream send(java.lang.Object message)


 

Copyright © 2008–2013 Václav Pech. All Rights Reserved.