public class PlainListenableActionFuture<T> extends AdapterActionFuture<T,T> implements ListenableActionFuture<T>
Modifier | Constructor and Description |
---|---|
protected |
PlainListenableActionFuture() |
Modifier and Type | Method and 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, onFailure, onResponse
cancel, get, get, interruptTask, isCancelled, isDone, set, setException
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
actionGet, actionGet, actionGet, actionGet, actionGet
onFailure, onResponse, toBiConsumer, wrap, wrap
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>