public class FailedFuture<T> extends Object implements Future<T>, Promise<T>
| Modifier and Type | Method and Description |
|---|---|
Throwable |
cause()
A Throwable describing failure.
|
void |
complete()
Set a null result.
|
void |
complete(T result)
Set the result.
|
void |
fail(String failureMessage)
Try to set the failure.
|
void |
fail(Throwable cause)
Set the failure.
|
boolean |
failed()
Did it fail?
|
Future<T> |
future() |
void |
handle(AsyncResult<T> asyncResult)
Succeed or fail this future with the
AsyncResult event. |
boolean |
isComplete()
Has the future completed?
|
T |
result()
The result of the operation.
|
Future<T> |
setHandler(Handler<AsyncResult<T>> handler)
|
boolean |
succeeded()
Did it succeed?
|
String |
toString() |
boolean |
tryComplete()
Try to set the result.
|
boolean |
tryComplete(T result)
Set the failure.
|
boolean |
tryFail(String failureMessage)
Try to set the failure.
|
boolean |
tryFail(Throwable cause)
Try to set the failure.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcompleter, compose, compose, compose, failedFuture, failedFuture, flatMap, future, future, map, map, mapEmpty, onComplete, onFailure, onSuccess, otherwise, otherwise, otherwiseEmpty, recover, succeededFuture, succeededFuturepublic boolean isComplete()
FutureIt's completed if it's either succeeded or failed.
isComplete in interface Future<T>public Future<T> setHandler(Handler<AsyncResult<T>> handler)
FuturesetHandler in interface Future<T>public void complete(T result)
Futurepublic void complete()
Futurepublic void fail(Throwable cause)
Futurepublic void fail(String failureMessage)
Futurepublic boolean tryComplete(T result)
FuturetryComplete in interface Future<T>tryComplete in interface Promise<T>result - the resultpublic boolean tryComplete()
FuturetryComplete in interface Future<T>tryComplete in interface Promise<T>public boolean tryFail(Throwable cause)
Futurepublic boolean tryFail(String failureMessage)
Futurepublic T result()
Futurepublic Throwable cause()
Futurepublic boolean succeeded()
Futurepublic boolean failed()
Futurepublic void handle(AsyncResult<T> asyncResult)
FutureAsyncResult event.Copyright © 2020. All rights reserved.