public class TerminableFuture<E> extends Future<E> implements ITerminableFuture<E>
IForwardCommandFuture.Type
DEBUG, EMPTY, NO_STACK_COMPACTION, STACK
Constructor and Description |
---|
TerminableFuture()
Create a new future.
|
TerminableFuture(ITerminationCommand terminate)
Create a future that is already done.
|
Modifier and Type | Method and Description |
---|---|
void |
addBackwardCommand(IFilter<Object> filter,
ICommand<Object> command)
Add a backward command with a filter.
|
void |
removeBackwardCommand(ICommand<Object> command)
Add a command with a filter.
|
void |
sendBackwardCommand(Object info)
Send a backward command in direction of the source.
|
void |
terminate()
Terminate the future.
|
void |
terminate(Exception reason)
Terminate the future and supply a custom reason.
|
abortGet, addForwardCommand, addResultListener, get, get, get, get, getEmptyFuture, getException, isDone, removeForwardCommand, sendForwardCommand, setException, setExceptionIfUndone, setResult, setResultIfUndone
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addResultListener, get, get, get, get, getException, isDone
public TerminableFuture()
public TerminableFuture(ITerminationCommand terminate)
result
- The result, if any.public void terminate()
terminate
in interface ITerminableFuture<E>
public void terminate(Exception reason)
terminate
in interface ITerminableFuture<E>
public void sendBackwardCommand(Object info)
sendBackwardCommand
in interface IBackwardCommandFuture
info
- The command info.public void addBackwardCommand(IFilter<Object> filter, ICommand<Object> command)
Copyright © 2013. All Rights Reserved.