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 |
---|---|
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.
|
void |
handleFinished(java.util.Collection<java.lang.Object> results)
Optionally alter finished behavior.
|
java.lang.Object |
handleIntermediateResult(java.lang.Object result)
Optionally alter a result.
|
java.lang.Object |
handleResult(java.lang.Object result)
Optionally alter a result.
|
void |
handleTerminated(java.lang.Exception reason)
Optionally augment termination behavior.
|
boolean |
isUndone(boolean undone)
Optionally alter the undone flag.
|
protected void |
logException(java.lang.Exception e,
java.lang.Exception userex,
boolean terminable,
boolean undone,
boolean async)
Log an exception.
|
void |
scheduleBackward(ICommand<java.lang.Void> code)
Schedule backward in result direction,
i.e.
|
void |
scheduleForward(ICommand<java.lang.Void> code)
Schedule forward in result direction,
i.e.
|
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 void scheduleForward(ICommand<java.lang.Void> code)
public void scheduleBackward(ICommand<java.lang.Void> code)
public boolean isUndone(boolean undone)
public java.lang.Object handleResult(java.lang.Object result) throws java.lang.Exception
java.lang.Exception
public java.lang.Object handleIntermediateResult(java.lang.Object result) throws java.lang.Exception
java.lang.Exception
public void handleFinished(java.util.Collection<java.lang.Object> results) throws java.lang.Exception
java.lang.Exception
public void handleTerminated(java.lang.Exception reason)
public static <T> Future<T> getDelegationFuture(IFuture<T> orig, FutureFunctionality func)
public static Future<?> getDelegationFuture(java.lang.Class<?> clazz, FutureFunctionality func)