public class FutureFunctionality
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.logging.Logger |
logger
The logger used for notification failure warnings (if any).
|
protected IResultCommand<java.util.logging.Logger,java.lang.Void> |
loggerfetcher |
protected boolean |
undone |
Constructor and Description |
---|
FutureFunctionality(IResultCommand<java.util.logging.Logger,java.lang.Void> loggerfetcher) |
FutureFunctionality(java.util.logging.Logger logger) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
addIntermediateResult(java.lang.Object result) |
java.lang.Object |
addIntermediateResultIfUndone(java.lang.Object result) |
static void |
connectDelegationFuture(Future target,
IFuture source)
Connect a delegation future with the source.
|
static Future<?> |
getDelegationFuture(java.lang.Class<?> clazz,
FutureFunctionality func) |
static <T> Future<T> |
getDelegationFuture(IFuture<T> orig,
FutureFunctionality func) |
protected java.util.logging.Logger |
getLogger()
Get the logger.
|
boolean |
isUndone()
Get the undone.
|
protected void |
logException(java.lang.Exception e,
java.lang.Exception userex,
boolean terminable,
boolean undone,
boolean async)
Log an exception.
|
void |
notifyListener(IResultListener<java.lang.Void> notify)
Notify the listener.
|
void |
pullIntermediateResult(IResultListener<java.lang.Void> notify)
Pull an intermediate result.
|
void |
sendBackwardCommand(java.lang.Object info,
IResultListener<java.lang.Void> com)
Send a backward command.
|
void |
sendForwardCommand(java.lang.Object info,
IResultListener<java.lang.Void> com)
Send a foward command.
|
java.lang.Exception |
setException(java.lang.Exception exception) |
java.lang.Exception |
setExceptionIfUndone(java.lang.Exception exception) |
void |
setFinished(java.util.Collection<java.lang.Object> results) |
void |
setFinishedIfUndone(java.util.Collection<java.lang.Object> results) |
java.lang.Object |
setFirstResult(java.lang.Object result) |
java.lang.Object |
setResult(java.lang.Object result) |
java.lang.Object |
setResultIfUndone(java.lang.Object result) |
java.lang.Object |
setSecondResult(java.lang.Object result) |
void |
startScheduledNotifications(IResultListener<java.lang.Void> notify)
Start the notifications.
|
void |
terminate(java.lang.Exception reason,
IResultListener<java.lang.Void> terminate)
Terminate the future.
|
protected java.util.logging.Logger logger
protected IResultCommand<java.util.logging.Logger,java.lang.Void> loggerfetcher
protected boolean undone
public FutureFunctionality(java.util.logging.Logger logger)
public FutureFunctionality(IResultCommand<java.util.logging.Logger,java.lang.Void> loggerfetcher)
protected java.util.logging.Logger getLogger()
protected void logException(java.lang.Exception e, java.lang.Exception userex, boolean terminable, boolean undone, boolean async)
public boolean isUndone()
public java.lang.Object addIntermediateResult(java.lang.Object result)
public java.lang.Object addIntermediateResultIfUndone(java.lang.Object result)
public void setFinished(java.util.Collection<java.lang.Object> results)
public void setFinishedIfUndone(java.util.Collection<java.lang.Object> results)
public java.lang.Object setResult(java.lang.Object result)
public java.lang.Object setResultIfUndone(java.lang.Object result)
public java.lang.Exception setException(java.lang.Exception exception)
public java.lang.Exception setExceptionIfUndone(java.lang.Exception exception)
public void terminate(java.lang.Exception reason, IResultListener<java.lang.Void> terminate)
public void sendForwardCommand(java.lang.Object info, IResultListener<java.lang.Void> com)
public void sendBackwardCommand(java.lang.Object info, IResultListener<java.lang.Void> com)
public void notifyListener(IResultListener<java.lang.Void> notify)
public void startScheduledNotifications(IResultListener<java.lang.Void> notify)
public void pullIntermediateResult(IResultListener<java.lang.Void> notify)
public java.lang.Object setFirstResult(java.lang.Object result)
public java.lang.Object setSecondResult(java.lang.Object result)
public static <T> Future<T> getDelegationFuture(IFuture<T> orig, FutureFunctionality func)
public static Future<?> getDelegationFuture(java.lang.Class<?> clazz, FutureFunctionality func)