public interface ListenableFuture<T> extends Future<T>
Future interface with the capability to accept completion
callbacks. If the future has already completed when the callback is added, the
callback will be triggered immediately.
Inspired by com.google.common.util.concurrent.ListenableFuture.
| Modifier and Type | Method and Description |
|---|---|
void |
addCallback(ListenableFutureCallback<? super T> callback)
Registers the given callback to this
ListenableFuture. |
void addCallback(ListenableFutureCallback<? super T> callback)
ListenableFuture. The callback will
be triggered when this Future is complete or, if it is already complete,
immediately.callback - the callback to register