| Constructor and Description |
|---|
ResolvedPromise(R response,
java.lang.Class<E> errorClass) |
ResolvedPromise(R response,
java.lang.Class<E> errorClass,
Consumer<java.lang.Runnable> runner) |
| Modifier and Type | Method and Description |
|---|---|
R |
get()
Retrieves a result synchronously.
|
java.lang.Class<E> |
getErrorClass()
Retrieves the error class.
|
Promise<R,S,E> |
onCached(Consumer<R> consumer)
Registers a consumer to be called when cached data becomes available.
|
Promise<R,S,E> |
onDone(Consumer<R> consumer)
Registers a consumer to be called when the call has finished.
|
Promise<R,S,E> |
onFail(Consumer<E> consumer)
Registers a consumer to be called when an error occurs.
|
Promise<R,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<R,S,E extends java.lang.Throwable>public Promise<R,S,E> onDone(Consumer<R> consumer)
Promisepublic Promise<R,S,E> onCached(Consumer<R> consumer)
Promisepublic Promise<R,S,E> onStatus(Consumer<S> consumer)
Promisepublic Promise<R,S,E> onFail(Consumer<E> consumer)
Promise