| Modifier and Type | Field and Description |
|---|---|
| protected final ContextInternal |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public <U> Future | |
| public final ContextInternal | |
| protected final void | |
| protected final void | |
| public <U> Future | eventually(Function<Void, Future<U>>
the function returning the future. mapper)Implements io. Compose this future with a |
| public Future | expecting(Expectation<? super T>
the expectation expectation)Implements io. Guard the control flow of this future with an expectation. |
| public <U> Future | map(Function<T, U>
the mapper function mapper)Implements io. Apply a |
| public <V> Future | map(V
the value that eventually completes the mapped future value)Implements io. Map the result of a future to a specific |
| public Future | otherwise(Function<Throwable, T>
the mapper function mapper)Implements io. Apply a |
| public Future | otherwise(T
the value that eventually completes the mapped future value)Implements io. Map the failure of a future to a specific |
| public Future | timeout(long
the delay delay, TimeUnit the unit of the delay unit)Implements io. Returns a future succeeded or failed with the outcome of this future when it happens before the timeout fires. |
| public <U> Future | transform(Function<AsyncResult<T>, Future<U>>
the function mapping the future mapper)Implements io. Transform this future with a |
| context | back to summary |
|---|---|
| protected final ContextInternal context | |
| FutureBase | back to summary |
|---|---|
| pack-priv FutureBase() Create a future that hasn't completed yet | |
| FutureBase | back to summary |
|---|---|
| pack-priv FutureBase(ContextInternal context) Create a future that hasn't completed yet | |
| compose | back to summary |
|---|---|
| public <U> Future Implements io. Doc from io. Compose this future with a
When this future (the one on which
When this future (the one on which If any mapper function throws an exception, the returned future will be failed with this exception.
| |
| context | back to summary |
|---|---|
| public final ContextInternal context() Implements io.
| |
| emitFailure | back to summary |
|---|---|
| protected final void emitFailure(Throwable cause, Listener<T> listener) | |
| emitSuccess | back to summary |
|---|---|
| protected final void emitSuccess(T value, Listener<T> listener) | |
| eventually | back to summary |
|---|---|
| public <U> Future Implements io. Doc from io. Compose this future with a When this future (the one on which The outcome of the future returned by the | |
| expecting | back to summary |
|---|---|
| public Future Implements io. Doc from io. Guard the control flow of this future with an expectation.
When the future is completed with a success, the Expectations are usually lambda expressions: return future.expecting(response -> response.statusCode() == 200); Expectation instances can also be used:
future = future.expecting(HttpResponseExpectation.SC_OK);
| |
| map | back to summary |
|---|---|
| public <U> Future Implements io. Doc from io. Apply a
When this future succeeds, the
If the
When this future fails, the failure will be propagated to the returned future and the | |
| map | back to summary |
|---|---|
| public <V> Future 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. | |
| otherwise | back to summary |
|---|---|
| public Future 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 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. | |
| timeout | back to summary |
|---|---|
| public Future Implements io. Doc from io. Returns a future succeeded or failed with the outcome of this future when it happens before the timeout fires. When
the timeout fires before, the future is failed with a | |
| transform | back to summary |
|---|---|
| public <U> Future Implements io. Doc from io. Transform this future with a
When this future (the one on which If any mapper function throws an exception, the returned future will be failed with this exception.
| |