public class TerminableFuture<E> extends Future<E> implements ITerminableFuture<E>
IForwardCommandFuture.TypeDEBUG, 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 |
setTerminationCommand(ITerminationCommand terminate)
Set the termination command.
|
void |
terminate()
Terminate the future.
|
void |
terminate(Exception reason)
Terminate the future and supply a custom reason.
|
abortGet, addForwardCommand, addResultListener, addResultListener, addResultListener, get, get, get, get, getEmptyFuture, getException, isDone, removeForwardCommand, sendForwardCommand, setException, setExceptionIfUndone, setResult, setResultIfUndoneequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddResultListener, addResultListener, addResultListener, get, get, get, get, getException, isDonepublic 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 IBackwardCommandFutureinfo - The command info.public void addBackwardCommand(IFilter<Object> filter, ICommand<Object> command)
public void removeBackwardCommand(ICommand<Object> command)
public void setTerminationCommand(ITerminationCommand terminate)
terminate - The termination command.Copyright © 2015. All Rights Reserved.