public interface AsyncOperation<T>
Modifier and Type | Interface and Description |
---|---|
static class |
AsyncOperation.CompletionHandler<U>
Processes the result of the background operation that created this object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isComplete()
Checks the status of the result
|
void |
onComplete(AsyncOperation.CompletionHandler<T> handler)
Queues a handler to process the result of the background operation.
|
T |
result()
Retrieves the result of the operation if available
|
void onComplete(AsyncOperation.CompletionHandler<T> handler)
handler
- Handler to process the task's resultboolean isComplete()
T result() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionException
- If the underlying task threw an exceptionjava.lang.InterruptedException
- If the result is not ready