|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RequestFuture
Method Summary | |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
Marks this request as canceled and notifies all waiting threads on it. |
Message |
get()
Waits if necessary for the request to complete, and then returns its result. |
Message |
get(long timeout)
Deprecated. |
Message |
get(long timeout,
java.util.concurrent.TimeUnit unit)
Waits if necessary for at most the given time for the request to complete, and then returns its result, if available. |
Message |
getRequest()
Returns original request message. |
Message |
getResponse()
Deprecated. |
Message |
getResponse(long timeout)
Deprecated. |
boolean |
isCanceled()
Deprecated. |
boolean |
isDone()
Returns true if this request completed. |
Methods inherited from interface java.util.concurrent.Future |
---|
isCancelled |
Method Detail |
---|
Message getRequest()
boolean isDone()
beginRequest()
by default.
isDone
in interface java.util.concurrent.Future<Message>
boolean cancel(boolean mayInterruptIfRunning)
mayInterruptIfRunning
has no effect here because
real request execution is been done on server side and communication
protocols usually do not support cancellation queries.
cancel
in interface java.util.concurrent.Future<Message>
mayInterruptIfRunning
- not used
Message get() throws java.lang.InterruptedException
get
in interface java.util.concurrent.Future<Message>
java.lang.InterruptedException
- if thread is interrupted@Deprecated Message get(long timeout) throws java.lang.InterruptedException
timeout
- timeout in milliseconds
java.lang.InterruptedException
- if thread is interruptedget(long, TimeUnit)
,
TimeUnit.MILLISECONDS
Message get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
get
in interface java.util.concurrent.Future<Message>
timeout
- the maximum time to waitunit
- the time unit of the timeout argument
java.lang.InterruptedException
- if thread is interruptedget(long, TimeUnit)
,
TimeUnit.MILLISECONDS
@Deprecated boolean isCanceled()
Future.isCancelled()
@Deprecated Message getResponse() throws java.lang.InterruptedException
java.lang.InterruptedException
- if thread is interruptedget()
@Deprecated Message getResponse(long timeout) throws java.lang.InterruptedException
timeout
- timeout in milliseconds
java.lang.InterruptedException
- if thread is interruptedget(long, TimeUnit)
,
TimeUnit.MILLISECONDS
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |