| Constructor and Description |
|---|
ProcessedPromise(Promise<R,S,E> originalPromise,
ErrorableFunction<R,R2,E> processor)
Contains a processed promise, processing the result of the original
promise with the given function.
|
| Modifier and Type | Method and Description |
|---|---|
R2 |
get()
Retrieves a result synchronously.
|
java.lang.Class<E> |
getErrorClass()
Retrieves the error class.
|
Promise<R2,S,E> |
onCached(Consumer<R2> consumer)
Registers a consumer to be called when cached data becomes available.
|
Promise<R2,S,E> |
onDone(Consumer<R2> consumer)
Registers a consumer to be called when the call has finished.
|
Promise<R2,S,E> |
onFail(Consumer<E> consumer)
Registers a consumer to be called when an error occurs.
|
Promise<R2,S,E> |
onStatus(Consumer<S> consumer)
Registers a consumer to be called when status updates are available.
|
public java.lang.Class<E> getErrorClass()
PromisegetErrorClass in interface Promise<R2,S,E extends java.lang.Throwable>public Promise<R2,S,E> onDone(Consumer<R2> consumer)
Promisepublic Promise<R2,S,E> onCached(Consumer<R2> consumer)
Promisepublic Promise<R2,S,E> onStatus(Consumer<S> consumer)
Promisepublic Promise<R2,S,E> onFail(Consumer<E> consumer)
Promise