public class FutureResponse extends BaseFutureImpl<FutureResponse>
BaseFuture.FutureTypecompleted, lock, reason, type| Constructor and Description |
|---|
FutureResponse(Message requestMessage)
Create the future and set the request message.
|
FutureResponse(Message requestMessage,
FutureSuccessEvaluator futureSuccessEvaluator)
Create the future and set the request message.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
completedAndNotify()
Make sure that the calling method has synchronized (lock).
|
FutureResponse |
emptyResponse()
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.
|
boolean |
failedLater(Throwable cause) |
RTT |
getRoundTripTime() |
Message |
request()
The future response always keeps a reference to the request.
|
FutureResponse |
response(Message responseMessage)
Gets called if a peer responds.
|
boolean |
responseLater(Message responseMessage) |
Message |
responseMessage()
Returns the response message.
|
FutureResponse |
responseNow() |
boolean |
startRTTMeasurement(boolean isUDP)
Start measuring time until reply is recieved
|
boolean |
stopRTTMeasurement()
Stops time measurement for the round trip time
|
String |
toString() |
addCancel, addListener, await, await, awaitListeners, awaitListenersUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, cancel, failed, failed, failed, failed, failed, failedReason, isCompleted, isFailed, isSuccess, notifyListeners, removeCancel, removeListener, self, self, typepublic FutureResponse(Message requestMessage)
requestMessage - The request message that will be send over the wire.public FutureResponse(Message requestMessage, FutureSuccessEvaluator futureSuccessEvaluator)
requestMessage - The request message that will be send over the wire.futureSuccessEvaluator - Evaluates if the future was a success or failureprogressListener - The progress listener for streaming supportpublic FutureResponse emptyResponse()
public FutureResponse response(Message responseMessage)
responseMessage - The received messagepublic boolean responseLater(Message responseMessage)
public boolean failedLater(Throwable cause)
public FutureResponse responseNow()
protected boolean completedAndNotify()
BaseFutureImplcompletedAndNotify in class BaseFutureImpl<FutureResponse>public Message responseMessage()
public Message request()
public boolean startRTTMeasurement(boolean isUDP)
public boolean stopRTTMeasurement()
public RTT getRoundTripTime()
Copyright © 2015. All rights reserved.