Interface CompletionStage<T>
- All Known Implementing Classes:
CompletableFuture
public interface CompletionStage<T>
java.util.concurrent.CompletionStage: one step of a computation that
others can be attached to. CompletableFuture is the implementation.-
Method Summary
Modifier and TypeMethodDescriptionacceptEither(CompletionStage<? extends T> other, Consumer<? super T> action) acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action) acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor) <U> CompletionStage<U> applyToEither(CompletionStage<? extends T> other, Function<? super T, U> fn) <U> CompletionStage<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T, U> fn) <U> CompletionStage<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T, U> fn, Executor executor) exceptionally(Function<Throwable, ? extends T> fn) <U> CompletionStage<U> handle(BiFunction<? super T, Throwable, ? extends U> fn) <U> CompletionStage<U> handleAsync(BiFunction<? super T, Throwable, ? extends U> fn) <U> CompletionStage<U> handleAsync(BiFunction<? super T, Throwable, ? extends U> fn, Executor executor) runAfterBoth(CompletionStage<?> other, Runnable action) runAfterBothAsync(CompletionStage<?> other, Runnable action) runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor) runAfterEither(CompletionStage<?> other, Runnable action) runAfterEitherAsync(CompletionStage<?> other, Runnable action) runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor) thenAccept(Consumer<? super T> action) thenAcceptAsync(Consumer<? super T> action) thenAcceptAsync(Consumer<? super T> action, Executor executor) <U> CompletionStage<Void> thenAcceptBoth(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action) <U> CompletionStage<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action) <U> CompletionStage<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action, Executor executor) <U> CompletionStage<U> <U> CompletionStage<U> thenApplyAsync(Function<? super T, ? extends U> fn) <U> CompletionStage<U> thenApplyAsync(Function<? super T, ? extends U> fn, Executor executor) <U,V> CompletionStage <V> thenCombine(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn) <U,V> CompletionStage <V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn) <U,V> CompletionStage <V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn, Executor executor) <U> CompletionStage<U> thenCompose(Function<? super T, ? extends CompletionStage<U>> fn) <U> CompletionStage<U> thenComposeAsync(Function<? super T, ? extends CompletionStage<U>> fn) <U> CompletionStage<U> thenComposeAsync(Function<? super T, ? extends CompletionStage<U>> fn, Executor executor) thenRunAsync(Runnable action) thenRunAsync(Runnable action, Executor executor) whenComplete(BiConsumer<? super T, ? super Throwable> action) whenCompleteAsync(BiConsumer<? super T, ? super Throwable> action) whenCompleteAsync(BiConsumer<? super T, ? super Throwable> action, Executor executor)
-
Method Details
-
thenApply
-
thenApplyAsync
-
thenApplyAsync
-
thenAccept
-
thenAcceptAsync
-
thenAcceptAsync
-
thenRun
-
thenRunAsync
-
thenRunAsync
-
thenCombine
<U,V> CompletionStage<V> thenCombine(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn) -
thenCombineAsync
<U,V> CompletionStage<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn) -
thenCombineAsync
<U,V> CompletionStage<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn, Executor executor) -
thenAcceptBoth
<U> CompletionStage<Void> thenAcceptBoth(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action) -
thenAcceptBothAsync
<U> CompletionStage<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action) -
thenAcceptBothAsync
<U> CompletionStage<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action, Executor executor) -
runAfterBoth
-
runAfterBothAsync
-
runAfterBothAsync
CompletionStage<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor) -
applyToEither
-
applyToEitherAsync
<U> CompletionStage<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T, U> fn) -
applyToEitherAsync
<U> CompletionStage<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T, U> fn, Executor executor) -
acceptEither
-
acceptEitherAsync
CompletionStage<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action) -
acceptEitherAsync
CompletionStage<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor) -
runAfterEither
-
runAfterEitherAsync
-
runAfterEitherAsync
CompletionStage<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor) -
thenCompose
-
thenComposeAsync
-
thenComposeAsync
<U> CompletionStage<U> thenComposeAsync(Function<? super T, ? extends CompletionStage<U>> fn, Executor executor) -
handle
-
handleAsync
-
handleAsync
<U> CompletionStage<U> handleAsync(BiFunction<? super T, Throwable, ? extends U> fn, Executor executor) -
whenComplete
-
whenCompleteAsync
-
whenCompleteAsync
CompletionStage<T> whenCompleteAsync(BiConsumer<? super T, ? super Throwable> action, Executor executor) -
exceptionally
-
toCompletableFuture
CompletableFuture<T> toCompletableFuture()
-