Promise.Adapter<C>| Constructor and Description |
|---|
FuturePromise() |
FuturePromise(C result) |
FuturePromise(C ctx,
Throwable failed) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
void |
failed(Throwable cause)
Callback invoked when the operation fails.
|
C |
get() |
C |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
static void |
rethrow(ExecutionException e) |
void |
succeeded(C result)
Callback invoked when the operation completes.
|
String |
toString() |
public FuturePromise()
public FuturePromise(C result)
public void succeeded(C result)
PromiseCallback invoked when the operation completes.
succeeded in interface Promise<C>result - the contextPromise.failed(Throwable)public void failed(Throwable cause)
PromiseCallback invoked when the operation fails.
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<C>public C get() throws InterruptedException, ExecutionException
get in interface Future<C>InterruptedExceptionExecutionExceptionpublic C get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<C>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic static void rethrow(ExecutionException e) throws IOException
IOExceptionCopyright © 1995-2015 Webtide. All Rights Reserved.