|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RequestContainer
Base interface for request results. An executing request is tracked by a request container that receives the updates and results from the request. listener.
| Method Summary | |
|---|---|
void |
awaitFinished()
Blocks until the request is finished or cancelled. |
void |
awaitFinished(long timeout,
TimeUnit timeUnit)
Blocks until the request is finished or cancelled. |
void |
awaitUpdate()
Blocks until the result has been updated. |
void |
awaitUpdate(long timeout,
TimeUnit timeUnit)
Blocks until the result has been updated or until the timeout is reached. |
void |
cancel()
Cancels this request and immediately finishes it. |
Throwable |
getError()
|
boolean |
hasError()
|
boolean |
isCancelled()
|
boolean |
isFinished()
|
boolean |
isValid()
|
| Method Detail |
|---|
void cancel()
boolean isCancelled()
boolean isFinished()
boolean isValid()
Note: If this method returns false, calling any getter on this container may lead to an exception.
boolean hasError()
Throwable getError()
void awaitFinished()
void awaitFinished(long timeout,
TimeUnit timeUnit)
throws TimeoutException
timeout - The maximum time to wait for the request to finish.timeUnit - The time unit.
TimeoutException - If the timeout occurs.void awaitUpdate()
void awaitUpdate(long timeout,
TimeUnit timeUnit)
throws TimeoutException
timeout - The timeout.timeUnit - The time unit.
TimeoutException - If the timeout occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||