Handler.Adapter<C>| Constructor and Description |
|---|
Promise() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
void |
completed(T result)
Callback invoked when the operation completes.
|
void |
failed(Throwable x)
Callback invoked when the operation fails.
|
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
public void completed(T result)
HandlerCallback invoked when the operation completes.
completed in interface Handler<T>result - the contextHandler.failed(Throwable)public void failed(Throwable x)
HandlerCallback invoked when the operation fails.
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<T>public T get() throws InterruptedException, ExecutionException
get in interface Future<T>InterruptedExceptionExecutionExceptionpublic T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<T>InterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.