public class ImmediateFailureResponseMessageFuture extends java.lang.Object implements ResponseMessageFuture
| Constructor and Description |
|---|
ImmediateFailureResponseMessageFuture(java.lang.Exception cause) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel()
Cancel the current request
|
ResponseMessage |
get()
Wait synchronously for the response
|
ResponseMessage |
get(long timeout)
Wait synchronously for the response.
|
boolean |
isCancelled()
Is the request cancelled ?
|
boolean |
isDone()
Is the request finished ?
|
public ImmediateFailureResponseMessageFuture(java.lang.Exception cause)
public boolean cancel()
ResponseMessageFuturecancel in interface ResponseMessageFuturepublic ResponseMessage get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
ResponseMessageFutureget in interface ResponseMessageFuturejava.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutExceptionpublic ResponseMessage get(long timeout) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
ResponseMessageFuturetimeout) has elapsed before the response is received.
If timeout is zero, however, then the method simply waits until the response
is received or the default transport timeout has elapsed.get in interface ResponseMessageFuturetimeout - the maximum time to wait in milliseconds.java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutExceptionpublic boolean isCancelled()
ResponseMessageFutureisCancelled in interface ResponseMessageFuturepublic boolean isDone()
ResponseMessageFutureisDone in interface ResponseMessageFuture