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?
|
Future<T> |
onComplete(Handler<AsyncResult<T>> handler)
Add a handler to be notified of the result.
|
T |
result()
The result of the operation.
|
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, fromCompletionStage, fromCompletionStage, future, future, map, map, mapEmpty, onFailure, onSuccess, otherwise, otherwise, otherwiseEmpty, recover, setHandler, succeededFuture, succeededFuture, toCompletionStagepublic boolean isComplete()
FutureIt's completed if it's either succeeded or failed.
isComplete in interface Future<T>public Future<T> onComplete(Handler<AsyncResult<T>> handler)
FutureonComplete in interface Future<T>handler - the handler that will be called with the resultpublic 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.