| Modifier and Type | Field and Description |
|---|---|
| public static final SucceededFuture | EMPTY
Stateless instance of empty results that can be shared safely. |
| private final T |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SucceededFuture(ContextInternal
the context context, T the result result)Create a future that has already succeeded |
| Modifier and Type | Method and Description |
|---|---|
| public void | addListener(Listener<T>
the listener listener)Implements io. Add a listener to the future result. |
| public Throwable | |
| public boolean | |
| public boolean | |
| public <V> Future | map(V
the value that eventually completes the mapped future value)Overrides io. Implements io. Map the result of a future to a specific |
| public Future | onComplete(Handler<AsyncResult<T>>
the handler that will be called with the result handler)Implements io. Add a handler to be notified of the result. |
| public Future | onFailure(Handler<Throwable>
the handler that will be called with the failed result handler)Overrides default io. Add a handler to be notified of the failed result. |
| public Future | onSuccess(Handler<T>
the handler that will be called with the succeeded result handler)Overrides default io. Add a handler to be notified of the succeeded result. |
| public Future | otherwise(Function<Throwable, T>
the mapper function mapper)Overrides io. Implements io. Apply a |
| public Future | otherwise(T
the value that eventually completes the mapped future value)Overrides io. Implements io. Map the failure of a future to a specific |
| public void | removeListener(Listener<T>
the listener listener)Implements io. Remove a listener to the future result. |
| public T | |
| public boolean | |
| public String |
| EMPTY | back to summary |
|---|---|
| public static final SucceededFuture<T> EMPTY Stateless instance of empty results that can be shared safely. | |
| result | back to summary |
|---|---|
| private final T result | |
| SucceededFuture | back to summary |
|---|---|
| public SucceededFuture(T result) Create a future that has already succeeded
| |
| SucceededFuture | back to summary |
|---|---|
| public SucceededFuture(ContextInternal context, T result) Create a future that has already succeeded
| |
| addListener | back to summary |
|---|---|
| public void addListener(Listener<T> listener) Implements io. Doc from io. Add a listener to the future result. | |
| cause | back to summary |
|---|---|
| public Throwable cause() Implements io. Doc from io. A Throwable describing failure. This will be null if the operation succeeded. | |
| failed | back to summary |
|---|---|
| public boolean failed() Implements io. Doc from io. Did it fail?
| |
| isComplete | back to summary |
|---|---|
| public boolean isComplete() Implements io. Doc from io. Has the future completed? It's completed if it's either succeeded or failed.
| |
| map | back to summary |
|---|---|
| public <V> Future Overrides io. Implements io. Doc from io. Map the result of a future to a specific
When this future succeeds, this When this future fails, the failure will be propagated to the returned future. | |
| onComplete | back to summary |
|---|---|
| public Future Implements io. Doc from io. Add a handler to be notified of the result. Warning this is a terminal operation.
If several
| |
| onFailure | back to summary |
|---|---|
| public Future Overrides default io. Doc from io. Add a handler to be notified of the failed result. Warning this is a terminal operation.
If several | |
| onSuccess | back to summary |
|---|---|
| public Future Overrides default io. Doc from io. Add a handler to be notified of the succeeded result. Warning this is a terminal operation.
If several | |
| otherwise | back to summary |
|---|---|
| public Future Overrides io. Implements io. Doc from io. Apply a
When this future fails, the
If the
When this future succeeds, the result will be propagated to the returned future and the | |
| otherwise | back to summary |
|---|---|
| public Future Overrides io. Implements io. Doc from io. Map the failure of a future to a specific
When this future fails, this When this future succeeds, the result will be propagated to the returned future. | |
| removeListener | back to summary |
|---|---|
| public void removeListener(Listener<T> listener) Implements io. Doc from io. Remove a listener to the future result. | |
| result | back to summary |
|---|---|
| public T result() Implements io. Doc from io. The result of the operation. This will be null if the operation failed.
| |
| succeeded | back to summary |
|---|---|
| public boolean succeeded() Implements io. Doc from io. Did it succeed?
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |