| Constructor and Description |
|---|
Future() |
| Modifier and Type | Method and Description |
|---|---|
Future |
onSuccess(Runnable successHandler)
Adds a completion handler to this promise which only handles the successful completion of the promise.
|
Future |
success()
Marks this future as successfully completed.
|
await, chain, doNotLogErrors, fail, failChain, flatMap, get, getFailure, handleErrors, isCompleted, isFailed, isSuccessful, map, mapChain, onComplete, onFailure, onFailureCallback, onSuccess, onSuccessCallback, successpublic Future success()
This is a shortcut for success(null), which further shows, that the matter of successful
completion is important, not the resulting object of a computation.
public Future onSuccess(Runnable successHandler)
If the promise is already completed, the handler is immediately invoked.
successHandler - the handler to be notified once the promise is completed. A promise can notify more than
one handler.Copyright © 2018. All rights reserved.