java.util.concurrent.Future<T>
, ActionFuture<T>
, ActionListener<T>
, ListenableActionFuture<T>
public class PlainListenableActionFuture<T> extends AdapterActionFuture<T,T> implements ListenableActionFuture<T>
Modifier | Constructor | Description |
---|---|---|
protected |
PlainListenableActionFuture() |
Modifier and Type | Method | Description |
---|---|---|
void |
addListener(ActionListener<T> listener) |
Add an action listener to be invoked when a response has received.
|
protected T |
convert(T listenerResponse) |
|
protected void |
done() |
|
static <T> PlainListenableActionFuture<T> |
newDispatchingListenableFuture(ThreadPool threadPool) |
This method returns a listenable future.
|
static <T> PlainListenableActionFuture<T> |
newListenableFuture() |
This method returns a listenable future.
|
actionGet, actionGet, actionGet, actionGet, actionGet
actionGet, actionGet, actionGet, actionGet, actionGet, onFailure, onResponse
cancel, get, get, interruptTask, isCancelled, isDone, set, setException
public static <T> PlainListenableActionFuture<T> newListenableFuture()
T
- the result of the futurepublic static <T> PlainListenableActionFuture<T> newDispatchingListenableFuture(ThreadPool threadPool)
T
- the result of the futurethreadPool
- the thread pool used to execute listenerspublic void addListener(ActionListener<T> listener)
ListenableActionFuture
addListener
in interface ListenableActionFuture<T>
protected void done()
done
in class BaseFuture<T>