Interface AsyncResult<T>
public interface AsyncResult<T>
Interface to define interaction with deferred results.
Implementations of this class are provided by HandlerContext
and should not be
overriden/wrapped.
-
Method Summary
Modifier and TypeMethodDescriptionctx()
default <U> AsyncResult
<U> map
(ThrowingFunction<T, CompletableFuture<U>> successMapper) <U> AsyncResult
<U> map
(ThrowingFunction<T, CompletableFuture<U>> successMapper, ThrowingFunction<TerminalException, CompletableFuture<U>> failureMapper) default AsyncResult
<T> mapFailure
(ThrowingFunction<TerminalException, CompletableFuture<T>> failureMapper) poll()
-
Method Details
-
poll
CompletableFuture<T> poll() -
ctx
HandlerContext ctx() -
map
<U> AsyncResult<U> map(ThrowingFunction<T, CompletableFuture<U>> successMapper, ThrowingFunction<TerminalException, CompletableFuture<U>> failureMapper) -
map
-
mapFailure
default AsyncResult<T> mapFailure(ThrowingFunction<TerminalException, CompletableFuture<T>> failureMapper)
-