com.amazonaws.mturk.service.axis
Class AsyncReply

java.lang.Object
  extended by com.amazonaws.mturk.service.axis.AsyncReply

public class AsyncReply
extends java.lang.Object

The reply for an asynchronous request placed in the Axis work queue


Constructor Summary
AsyncReply(Message msg, java.util.concurrent.Future<java.lang.Object> f)
          Constructs a new reply once the message is submitted to the Axis work queue
 
Method Summary
 java.util.concurrent.Future<java.lang.Object> getFuture()
          Future containing the result of the asynchronous call
 Message getRequestMessage()
          Returns the request for this reply
 java.lang.Object getResult()
          Returns the result of the asynchronous request (waits, if not yet available)
 boolean isDone()
          Returns true if the request has been processed (either successfully or failing).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncReply

public AsyncReply(Message msg,
                  java.util.concurrent.Future<java.lang.Object> f)
Constructs a new reply once the message is submitted to the Axis work queue

Parameters:
msg - The request message to send
f - The future contain the result of the asynchronous call
Method Detail

getFuture

public java.util.concurrent.Future<java.lang.Object> getFuture()
Future containing the result of the asynchronous call

Returns:

getRequestMessage

public Message getRequestMessage()
Returns the request for this reply

Returns:

getResult

public java.lang.Object getResult()
                           throws ServiceException
Returns the result of the asynchronous request (waits, if not yet available)

Returns:
Throws:
ServiceException

isDone

public boolean isDone()
Returns true if the request has been processed (either successfully or failing).