public class ExtendedPromiseDecorator<T> extends AbstractPromiseDecorator<T,Promise<T>>
delegate| Constructor and Description |
|---|
ExtendedPromiseDecorator(Promise<T> delegate) |
| Modifier and Type | Method and Description |
|---|---|
Promise<Void> |
acceptEither(CompletionStage<? extends T> other,
Consumer<? super T> action) |
Promise<Void> |
acceptEitherAsync(CompletionStage<? extends T> other,
Consumer<? super T> action) |
Promise<Void> |
acceptEitherAsync(CompletionStage<? extends T> other,
Consumer<? super T> action,
Executor executor) |
<U> Promise<U> |
applyToEither(CompletionStage<? extends T> other,
Function<? super T,U> fn) |
<U> Promise<U> |
applyToEitherAsync(CompletionStage<? extends T> other,
Function<? super T,U> fn) |
<U> Promise<U> |
applyToEitherAsync(CompletionStage<? extends T> other,
Function<? super T,U> fn,
Executor executor) |
DependentPromise<T> |
dependent()
Converts this
Promise to a DependentPromise
The returned DependentPromise does not implicitly enlist any CompletionStage
for cancellation (neither self, nor passed as arguments to combining methods);
only enlisting via explicit parameter is supported |
DependentPromise<T> |
dependent(Set<PromiseOrigin> defaultEnlistOptions)
Converts this
Promise to a DependentPromise
The returned DependentPromise does implicitly enlist CompletionStage
for cancellation (either self, and/or passed as arguments to combining methods)
according to defaultEnlistOptions parameter |
Promise<T> |
exceptionally(Function<Throwable,? extends T> fn) |
Promise<T> |
exceptionallyAsync(Function<Throwable,? extends T> fn) |
Promise<T> |
exceptionallyAsync(Function<Throwable,? extends T> fn,
Executor executor) |
Promise<T> |
exceptionallyCompose(Function<Throwable,? extends CompletionStage<T>> fn) |
Promise<T> |
exceptionallyComposeAsync(Function<Throwable,? extends CompletionStage<T>> fn) |
Promise<T> |
exceptionallyComposeAsync(Function<Throwable,? extends CompletionStage<T>> fn,
Executor executor) |
<U> Promise<U> |
handle(BiFunction<? super T,Throwable,? extends U> fn) |
<U> Promise<U> |
handleAsync(BiFunction<? super T,Throwable,? extends U> fn) |
<U> Promise<U> |
handleAsync(BiFunction<? super T,Throwable,? extends U> fn,
Executor executor) |
Promise<T> |
onCancel(Runnable code) |
Promise<T> |
onTimeout(Supplier<? extends T> supplier,
Duration duration) |
Promise<T> |
onTimeout(Supplier<? extends T> supplier,
Duration duration,
boolean cancelOnTimeout) |
Promise<T> |
onTimeout(Supplier<? extends T> supplier,
long timeout,
TimeUnit unit) |
Promise<T> |
onTimeout(Supplier<? extends T> supplier,
long timeout,
TimeUnit unit,
boolean cancelOnTimeout) |
Promise<Void> |
runAfterBoth(CompletionStage<?> other,
Runnable action) |
Promise<Void> |
runAfterBothAsync(CompletionStage<?> other,
Runnable action) |
Promise<Void> |
runAfterBothAsync(CompletionStage<?> other,
Runnable action,
Executor executor) |
Promise<Void> |
runAfterEither(CompletionStage<?> other,
Runnable action) |
Promise<Void> |
runAfterEitherAsync(CompletionStage<?> other,
Runnable action) |
Promise<Void> |
runAfterEitherAsync(CompletionStage<?> other,
Runnable action,
Executor executor) |
Promise<Void> |
thenAccept(Consumer<? super T> action) |
Promise<Void> |
thenAcceptAsync(Consumer<? super T> action) |
Promise<Void> |
thenAcceptAsync(Consumer<? super T> action,
Executor executor) |
<U> Promise<Void> |
thenAcceptBoth(CompletionStage<? extends U> other,
BiConsumer<? super T,? super U> action) |
<U> Promise<Void> |
thenAcceptBothAsync(CompletionStage<? extends U> other,
BiConsumer<? super T,? super U> action) |
<U> Promise<Void> |
thenAcceptBothAsync(CompletionStage<? extends U> other,
BiConsumer<? super T,? super U> action,
Executor executor) |
<U> Promise<U> |
thenApply(Function<? super T,? extends U> fn) |
<U> Promise<U> |
thenApplyAsync(Function<? super T,? extends U> fn) |
<U> Promise<U> |
thenApplyAsync(Function<? super T,? extends U> fn,
Executor executor) |
<U,V> Promise<V> |
thenCombine(CompletionStage<? extends U> other,
BiFunction<? super T,? super U,? extends V> fn) |
<U,V> Promise<V> |
thenCombineAsync(CompletionStage<? extends U> other,
BiFunction<? super T,? super U,? extends V> fn) |
<U,V> Promise<V> |
thenCombineAsync(CompletionStage<? extends U> other,
BiFunction<? super T,? super U,? extends V> fn,
Executor executor) |
<U> Promise<U> |
thenCompose(Function<? super T,? extends CompletionStage<U>> fn) |
<U> Promise<U> |
thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn) |
<U> Promise<U> |
thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn,
Executor executor) |
Promise<T> |
thenFilter(Predicate<? super T> predicate) |
Promise<T> |
thenFilter(Predicate<? super T> predicate,
Function<? super T,Throwable> errorSupplier) |
Promise<T> |
thenFilterAsync(Predicate<? super T> predicate) |
Promise<T> |
thenFilterAsync(Predicate<? super T> predicate,
Executor executor) |
Promise<T> |
thenFilterAsync(Predicate<? super T> predicate,
Function<? super T,Throwable> errorSupplier) |
Promise<T> |
thenFilterAsync(Predicate<? super T> predicate,
Function<? super T,Throwable> errorSupplier,
Executor executor) |
Promise<Void> |
thenRun(Runnable action) |
Promise<Void> |
thenRunAsync(Runnable action) |
Promise<Void> |
thenRunAsync(Runnable action,
Executor executor) |
Promise<T> |
whenComplete(BiConsumer<? super T,? super Throwable> action) |
Promise<T> |
whenCompleteAsync(BiConsumer<? super T,? super Throwable> action) |
Promise<T> |
whenCompleteAsync(BiConsumer<? super T,? super Throwable> action,
Executor executor) |
protected <U,V> BiConsumer<U,V> |
wrapArgument(BiConsumer<U,V> original,
boolean async) |
protected <U,V,R> BiFunction<U,V,R> |
wrapArgument(BiFunction<U,V,R> original,
boolean async) |
protected <U> CompletionStage<U> |
wrapArgument(CompletionStage<U> original,
boolean async) |
protected <U> Consumer<U> |
wrapArgument(Consumer<U> original,
boolean async) |
protected Executor |
wrapArgument(Executor original) |
protected <U,R> Function<U,R> |
wrapArgument(Function<U,R> original,
boolean async,
boolean isCompose) |
protected <U> Predicate<U> |
wrapArgument(Predicate<U> original,
boolean async) |
protected Runnable |
wrapArgument(Runnable original,
boolean async) |
protected <U> Supplier<U> |
wrapArgument(Supplier<U> original,
boolean async) |
protected <U> Promise<U> |
wrapNew(CompletionStage<U> original) |
protected <U> Promise<U> |
wrapResult(CompletionStage<U> original) |
defaultAsyncOn, delay, delay, delay, delay, getNow, getNow, isCompletedExceptionally, join, onTimeout, onTimeout, onTimeout, onTimeout, orTimeout, orTimeout, orTimeout, orTimeout, raw, unwrapcancel, get, get, isCancelled, isDonewrap, αtoCompletableFuture, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waittoCompletableFutureprotected <U,R> Function<U,R> wrapArgument(Function<U,R> original, boolean async, boolean isCompose)
protected <U,V,R> BiFunction<U,V,R> wrapArgument(BiFunction<U,V,R> original, boolean async)
protected <U,V> BiConsumer<U,V> wrapArgument(BiConsumer<U,V> original, boolean async)
protected <U> CompletionStage<U> wrapArgument(CompletionStage<U> original, boolean async)
protected <U> Promise<U> wrapResult(CompletionStage<U> original)
protected final <U> Promise<U> wrapNew(CompletionStage<U> original)
wrapNew in class AbstractPromiseLikeDecorator<T,Promise<T>>public DependentPromise<T> dependent()
PromisePromise to a DependentPromise
The returned DependentPromise does not implicitly enlist any CompletionStage
for cancellation (neither self, nor passed as arguments to combining methods);
only enlisting via explicit parameter is supportedpublic DependentPromise<T> dependent(Set<PromiseOrigin> defaultEnlistOptions)
PromisePromise to a DependentPromise
The returned DependentPromise does implicitly enlist CompletionStage
for cancellation (either self, and/or passed as arguments to combining methods)
according to defaultEnlistOptions parameterdependent in interface Promise<T>dependent in class AbstractPromiseDecorator<T,Promise<T>>defaultEnlistOptions - defines what CompletionStage should be enlisted implicitly for cancellationpublic Promise<T> onTimeout(Supplier<? extends T> supplier, long timeout, TimeUnit unit, boolean cancelOnTimeout)
public Promise<T> onTimeout(Supplier<? extends T> supplier, Duration duration, boolean cancelOnTimeout)
public <U> Promise<U> thenApplyAsync(Function<? super T,? extends U> fn)
thenApplyAsync in interface CompletionStage<T>thenApplyAsync in interface Promise<T>thenApplyAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U> Promise<U> thenApplyAsync(Function<? super T,? extends U> fn, Executor executor)
thenApplyAsync in interface CompletionStage<T>thenApplyAsync in interface Promise<T>thenApplyAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> thenAccept(Consumer<? super T> action)
thenAccept in interface CompletionStage<T>thenAccept in interface Promise<T>thenAccept in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> thenAcceptAsync(Consumer<? super T> action)
thenAcceptAsync in interface CompletionStage<T>thenAcceptAsync in interface Promise<T>thenAcceptAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> thenAcceptAsync(Consumer<? super T> action, Executor executor)
thenAcceptAsync in interface CompletionStage<T>thenAcceptAsync in interface Promise<T>thenAcceptAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> thenRunAsync(Runnable action)
thenRunAsync in interface CompletionStage<T>thenRunAsync in interface Promise<T>thenRunAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> thenRunAsync(Runnable action, Executor executor)
thenRunAsync in interface CompletionStage<T>thenRunAsync in interface Promise<T>thenRunAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U,V> Promise<V> thenCombine(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn)
thenCombine in interface CompletionStage<T>thenCombine in interface Promise<T>thenCombine in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U,V> Promise<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn)
thenCombineAsync in interface CompletionStage<T>thenCombineAsync in interface Promise<T>thenCombineAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U,V> Promise<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn, Executor executor)
thenCombineAsync in interface CompletionStage<T>thenCombineAsync in interface Promise<T>thenCombineAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U> Promise<Void> thenAcceptBoth(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action)
thenAcceptBoth in interface CompletionStage<T>thenAcceptBoth in interface Promise<T>thenAcceptBoth in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U> Promise<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action)
thenAcceptBothAsync in interface CompletionStage<T>thenAcceptBothAsync in interface Promise<T>thenAcceptBothAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U> Promise<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action, Executor executor)
thenAcceptBothAsync in interface CompletionStage<T>thenAcceptBothAsync in interface Promise<T>thenAcceptBothAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> runAfterBoth(CompletionStage<?> other, Runnable action)
runAfterBoth in interface CompletionStage<T>runAfterBoth in interface Promise<T>runAfterBoth in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action)
runAfterBothAsync in interface CompletionStage<T>runAfterBothAsync in interface Promise<T>runAfterBothAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)
runAfterBothAsync in interface CompletionStage<T>runAfterBothAsync in interface Promise<T>runAfterBothAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U> Promise<U> applyToEither(CompletionStage<? extends T> other, Function<? super T,U> fn)
applyToEither in interface CompletionStage<T>applyToEither in interface Promise<T>applyToEither in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U> Promise<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn)
applyToEitherAsync in interface CompletionStage<T>applyToEitherAsync in interface Promise<T>applyToEitherAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U> Promise<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn, Executor executor)
applyToEitherAsync in interface CompletionStage<T>applyToEitherAsync in interface Promise<T>applyToEitherAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action)
acceptEither in interface CompletionStage<T>acceptEither in interface Promise<T>acceptEither in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action)
acceptEitherAsync in interface CompletionStage<T>acceptEitherAsync in interface Promise<T>acceptEitherAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor)
acceptEitherAsync in interface CompletionStage<T>acceptEitherAsync in interface Promise<T>acceptEitherAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> runAfterEither(CompletionStage<?> other, Runnable action)
runAfterEither in interface CompletionStage<T>runAfterEither in interface Promise<T>runAfterEither in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action)
runAfterEitherAsync in interface CompletionStage<T>runAfterEitherAsync in interface Promise<T>runAfterEitherAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)
runAfterEitherAsync in interface CompletionStage<T>runAfterEitherAsync in interface Promise<T>runAfterEitherAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U> Promise<U> thenCompose(Function<? super T,? extends CompletionStage<U>> fn)
thenCompose in interface CompletionStage<T>thenCompose in interface Promise<T>thenCompose in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U> Promise<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn)
thenComposeAsync in interface CompletionStage<T>thenComposeAsync in interface Promise<T>thenComposeAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U> Promise<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn, Executor executor)
thenComposeAsync in interface CompletionStage<T>thenComposeAsync in interface Promise<T>thenComposeAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<T> exceptionally(Function<Throwable,? extends T> fn)
exceptionally in interface CompletionStage<T>exceptionally in interface Promise<T>exceptionally in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<T> exceptionallyAsync(Function<Throwable,? extends T> fn)
exceptionallyAsync in interface Promise<T>exceptionallyAsync in class AbstractPromiseDecorator<T,Promise<T>>public Promise<T> exceptionallyAsync(Function<Throwable,? extends T> fn, Executor executor)
exceptionallyAsync in interface Promise<T>exceptionallyAsync in class AbstractPromiseDecorator<T,Promise<T>>public Promise<T> exceptionallyCompose(Function<Throwable,? extends CompletionStage<T>> fn)
exceptionallyCompose in interface Promise<T>exceptionallyCompose in class AbstractPromiseDecorator<T,Promise<T>>public Promise<T> exceptionallyComposeAsync(Function<Throwable,? extends CompletionStage<T>> fn)
exceptionallyComposeAsync in interface Promise<T>exceptionallyComposeAsync in class AbstractPromiseDecorator<T,Promise<T>>public Promise<T> exceptionallyComposeAsync(Function<Throwable,? extends CompletionStage<T>> fn, Executor executor)
exceptionallyComposeAsync in interface Promise<T>exceptionallyComposeAsync in class AbstractPromiseDecorator<T,Promise<T>>public Promise<T> thenFilter(Predicate<? super T> predicate)
thenFilter in interface Promise<T>thenFilter in class AbstractPromiseDecorator<T,Promise<T>>public Promise<T> thenFilter(Predicate<? super T> predicate, Function<? super T,Throwable> errorSupplier)
thenFilter in interface Promise<T>thenFilter in class AbstractPromiseDecorator<T,Promise<T>>public Promise<T> thenFilterAsync(Predicate<? super T> predicate)
thenFilterAsync in interface Promise<T>thenFilterAsync in class AbstractPromiseDecorator<T,Promise<T>>public Promise<T> thenFilterAsync(Predicate<? super T> predicate, Function<? super T,Throwable> errorSupplier)
thenFilterAsync in interface Promise<T>thenFilterAsync in class AbstractPromiseDecorator<T,Promise<T>>public Promise<T> thenFilterAsync(Predicate<? super T> predicate, Executor executor)
thenFilterAsync in interface Promise<T>thenFilterAsync in class AbstractPromiseDecorator<T,Promise<T>>public Promise<T> thenFilterAsync(Predicate<? super T> predicate, Function<? super T,Throwable> errorSupplier, Executor executor)
thenFilterAsync in interface Promise<T>thenFilterAsync in class AbstractPromiseDecorator<T,Promise<T>>public Promise<T> whenComplete(BiConsumer<? super T,? super Throwable> action)
whenComplete in interface CompletionStage<T>whenComplete in interface Promise<T>whenComplete in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> action)
whenCompleteAsync in interface CompletionStage<T>whenCompleteAsync in interface Promise<T>whenCompleteAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public Promise<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> action, Executor executor)
whenCompleteAsync in interface CompletionStage<T>whenCompleteAsync in interface Promise<T>whenCompleteAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U> Promise<U> handle(BiFunction<? super T,Throwable,? extends U> fn)
public <U> Promise<U> handleAsync(BiFunction<? super T,Throwable,? extends U> fn)
handleAsync in interface CompletionStage<T>handleAsync in interface Promise<T>handleAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>public <U> Promise<U> handleAsync(BiFunction<? super T,Throwable,? extends U> fn, Executor executor)
handleAsync in interface CompletionStage<T>handleAsync in interface Promise<T>handleAsync in class AbstractPromiseLikeDecorator<T,Promise<T>>Copyright © 2021. All rights reserved.