Modifier and Type | Method and Description |
---|---|
boolean |
complete(V value)
Completes this Promise with a value if not yet done.
|
boolean |
completeExceptionally(java.lang.RuntimeException value)
Completes this Promise with a an exception if not yet done.
|
boolean |
completeFrom(Promise<V> source)
Completes or completes exceptionally this promise from the source promise when it becomes
completed.
|
allOf, allOf, anyOf, anyOf, exceptionally, get, get, get, get, getFailure, handle, isCompleted, thenApply, thenCompose
boolean complete(V value)
boolean completeExceptionally(java.lang.RuntimeException value)
boolean completeFrom(Promise<V> source)
destination.completeFrom(source);
Is shortcut to:
source.handle((value, failure) -> {
if (failure != null) {
destination.completeExceptionally(failure);
} else {
destination.complete(value);
}
return null;
}
source
- promise that is being watched.