| Interface | Description |
|---|---|
| Promise<RESULT> |
The
Promise interface is very similar to a Future, but it provides
callbacks for completion, failure, and cancellation |
| Promise.OnCancelListener |
Task cancellation callback
|
| Promise.OnCompleteListener<RESULT> |
Task completion callback
|
| Promise.OnFailListener |
Task failure callback
|
| Class | Description |
|---|---|
| AbstractPromise<RESULT> |
Another implementation for
Promise. |
| FuturePromise<RESULT> |
A
FutureTask that implements the Promise interface to provide completion, failure, and cancellation
callbacks. |
| SimplePromise<RESULT> |
An implementation of
Promise that can be retrofitted into any asynchronous flow:
Instantiate a SimplePromise
Interact with the SimplePromise instance in your runnable running in the background
Return the instantiated SimplePromise in the calling thread
|