public class FutureResponse extends BaseFutureImpl
BaseFuture.FutureTypecompleted, lock, reason, type| Constructor and Description |
|---|
FutureResponse(Message requestMessage)
Create the future and set the request message
|
| Modifier and Type | Method and Description |
|---|---|
Message |
getRequest()
The future response always keeps a reference to the request.
|
Message |
getResponse()
Returns the response message.
|
void |
setFailed(String reason)
Sets the failed flat to true and the completed flag to true.
|
void |
setReplyTimeoutHandler(ReplyTimeoutHandler replyTimeoutHandler)
Set the cancel operation for the timeout handler.
|
void |
setResponse()
If we don't get a reply message, which is the case for fire-and-forget
messages, then set the reply to null and set this future to complete with
the type Success.
|
void |
setResponse(Message responseMessage)
Gets called if a peer responds.
|
addCancellation, addListener, await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, getFailedReason, getType, isCompleted, isFailed, isSuccess, notifyListerenrs, removeCancellation, removeListener, setCompletedAndNotifypublic FutureResponse(Message requestMessage)
requestMessage - The request message that will be send over the
wire.public void setResponse()
public void setResponse(Message responseMessage)
message - The received messagepublic void setFailed(String reason)
BaseFuturesetFailed in interface BaseFuturesetFailed in class BaseFutureImplpublic Message getResponse()
public Message getRequest()
public void setReplyTimeoutHandler(ReplyTimeoutHandler replyTimeoutHandler)
replyTimeoutHandler - The timeout that needs to be canceled if the
future returns successfully.Copyright © 2011. All Rights Reserved.