- java.lang.Object
-
- io.helidon.common.reactive.CompletionAwaitable<T>
-
- Type Parameters:
T- payload type
- All Implemented Interfaces:
Awaitable<T>,CompletionStage<T>
- Direct Known Subclasses:
CompletionSingle
public class CompletionAwaitable<T> extends Object implements CompletionStage<T>, Awaitable<T>
CompletionStagewrapper enriched withAwaitable.
-
-
Method Summary
-
-
-
Method Detail
-
thenApply
public <U> CompletionAwaitable<U> thenApply(Function<? super T,? extends U> fn)
- Specified by:
thenApplyin interfaceCompletionStage<T>
-
thenApplyAsync
public <U> CompletionAwaitable<U> thenApplyAsync(Function<? super T,? extends U> fn)
- Specified by:
thenApplyAsyncin interfaceCompletionStage<T>
-
thenApplyAsync
public <U> CompletionAwaitable<U> thenApplyAsync(Function<? super T,? extends U> fn, Executor executor)
- Specified by:
thenApplyAsyncin interfaceCompletionStage<T>
-
thenAccept
public CompletionAwaitable<Void> thenAccept(Consumer<? super T> action)
- Specified by:
thenAcceptin interfaceCompletionStage<T>
-
thenAcceptAsync
public CompletionAwaitable<Void> thenAcceptAsync(Consumer<? super T> action)
- Specified by:
thenAcceptAsyncin interfaceCompletionStage<T>
-
thenAcceptAsync
public CompletionAwaitable<Void> thenAcceptAsync(Consumer<? super T> action, Executor executor)
- Specified by:
thenAcceptAsyncin interfaceCompletionStage<T>
-
thenRun
public CompletionAwaitable<Void> thenRun(Runnable action)
- Specified by:
thenRunin interfaceCompletionStage<T>
-
thenRunAsync
public CompletionAwaitable<Void> thenRunAsync(Runnable action)
- Specified by:
thenRunAsyncin interfaceCompletionStage<T>
-
thenRunAsync
public CompletionAwaitable<Void> thenRunAsync(Runnable action, Executor executor)
- Specified by:
thenRunAsyncin interfaceCompletionStage<T>
-
thenCombine
public <U,V> CompletionAwaitable<V> thenCombine(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn)
- Specified by:
thenCombinein interfaceCompletionStage<T>
-
thenCombineAsync
public <U,V> CompletionAwaitable<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn)
- Specified by:
thenCombineAsyncin interfaceCompletionStage<T>
-
thenCombineAsync
public <U,V> CompletionAwaitable<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn, Executor executor)
- Specified by:
thenCombineAsyncin interfaceCompletionStage<T>
-
thenAcceptBoth
public <U> CompletionAwaitable<Void> thenAcceptBoth(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action)
- Specified by:
thenAcceptBothin interfaceCompletionStage<T>
-
thenAcceptBothAsync
public <U> CompletionAwaitable<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action)
- Specified by:
thenAcceptBothAsyncin interfaceCompletionStage<T>
-
thenAcceptBothAsync
public <U> CompletionAwaitable<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action, Executor executor)
- Specified by:
thenAcceptBothAsyncin interfaceCompletionStage<T>
-
runAfterBoth
public CompletionAwaitable<Void> runAfterBoth(CompletionStage<?> other, Runnable action)
- Specified by:
runAfterBothin interfaceCompletionStage<T>
-
runAfterBothAsync
public CompletionAwaitable<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action)
- Specified by:
runAfterBothAsyncin interfaceCompletionStage<T>
-
runAfterBothAsync
public CompletionAwaitable<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)
- Specified by:
runAfterBothAsyncin interfaceCompletionStage<T>
-
applyToEither
public <U> CompletionAwaitable<U> applyToEither(CompletionStage<? extends T> other, Function<? super T,U> fn)
- Specified by:
applyToEitherin interfaceCompletionStage<T>
-
applyToEitherAsync
public <U> CompletionAwaitable<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn)
- Specified by:
applyToEitherAsyncin interfaceCompletionStage<T>
-
applyToEitherAsync
public <U> CompletionAwaitable<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn, Executor executor)
- Specified by:
applyToEitherAsyncin interfaceCompletionStage<T>
-
acceptEither
public CompletionAwaitable<Void> acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action)
- Specified by:
acceptEitherin interfaceCompletionStage<T>
-
acceptEitherAsync
public CompletionAwaitable<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action)
- Specified by:
acceptEitherAsyncin interfaceCompletionStage<T>
-
acceptEitherAsync
public CompletionAwaitable<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor)
- Specified by:
acceptEitherAsyncin interfaceCompletionStage<T>
-
runAfterEither
public CompletionAwaitable<Void> runAfterEither(CompletionStage<?> other, Runnable action)
- Specified by:
runAfterEitherin interfaceCompletionStage<T>
-
runAfterEitherAsync
public CompletionAwaitable<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action)
- Specified by:
runAfterEitherAsyncin interfaceCompletionStage<T>
-
runAfterEitherAsync
public CompletionAwaitable<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)
- Specified by:
runAfterEitherAsyncin interfaceCompletionStage<T>
-
thenCompose
public <U> CompletionAwaitable<U> thenCompose(Function<? super T,? extends CompletionStage<U>> fn)
- Specified by:
thenComposein interfaceCompletionStage<T>
-
thenComposeAsync
public <U> CompletionAwaitable<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn)
- Specified by:
thenComposeAsyncin interfaceCompletionStage<T>
-
thenComposeAsync
public <U> CompletionAwaitable<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn, Executor executor)
- Specified by:
thenComposeAsyncin interfaceCompletionStage<T>
-
handle
public <U> CompletionAwaitable<U> handle(BiFunction<? super T,Throwable,? extends U> fn)
- Specified by:
handlein interfaceCompletionStage<T>
-
handleAsync
public <U> CompletionAwaitable<U> handleAsync(BiFunction<? super T,Throwable,? extends U> fn)
- Specified by:
handleAsyncin interfaceCompletionStage<T>
-
handleAsync
public <U> CompletionAwaitable<U> handleAsync(BiFunction<? super T,Throwable,? extends U> fn, Executor executor)
- Specified by:
handleAsyncin interfaceCompletionStage<T>
-
whenComplete
public CompletionAwaitable<T> whenComplete(BiConsumer<? super T,? super Throwable> action)
- Specified by:
whenCompletein interfaceCompletionStage<T>
-
whenCompleteAsync
public CompletionAwaitable<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> action)
- Specified by:
whenCompleteAsyncin interfaceCompletionStage<T>
-
whenCompleteAsync
public CompletionAwaitable<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> action, Executor executor)
- Specified by:
whenCompleteAsyncin interfaceCompletionStage<T>
-
exceptionally
public CompletionAwaitable<T> exceptionally(Function<Throwable,? extends T> fn)
- Specified by:
exceptionallyin interfaceCompletionStage<T>
-
exceptionallyAccept
public CompletionAwaitable<T> exceptionallyAccept(Consumer<Throwable> consumer)
Returns a new CompletionAwaitable that, when this stage completes exceptionally, is executed with this stage's exception as the argument to the supplied consumer. Otherwise, if this stage completes normally, then the returned stage also completes normally with the same value.- Parameters:
consumer- the consumer to invoke if this CompletionAwaitable completed exceptionally- Returns:
- the new CompletionAwaitable
-
toCompletableFuture
public CompletableFuture<T> toCompletableFuture()
Description copied from interface:AwaitableReturns aCompletableFuturemaintaining the same completion properties as this stage. If this stage is already a CompletableFuture, this method may return this stage itself. Otherwise, invocation of this method may be equivalent in effect tothenApply(x -> x), but returning an instance of typeCompletableFuture.- Specified by:
toCompletableFuturein interfaceAwaitable<T>- Specified by:
toCompletableFuturein interfaceCompletionStage<T>- Returns:
- the CompletableFuture
-
-