Class FutureFunctionality
- java.lang.Object
 - 
- jadex.bridge.service.component.interceptors.FutureFunctionality
 
 
- 
- Direct Known Subclasses:
 ComponentFutureFunctionality
public class FutureFunctionality extends java.lang.ObjectDefault future functionality. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDROP_INTERMEDIATE_RESULTMarker for an intermediate result to be dropped.protected java.util.logging.LoggerloggerThe logger used for notification failure warnings (if any).protected IResultCommand<java.util.logging.Logger,java.lang.Void>loggerfetcherprotected booleanundone 
- 
Constructor Summary
Constructors Constructor Description FutureFunctionality(IResultCommand<java.util.logging.Logger,java.lang.Void> loggerfetcher)FutureFunctionality(java.util.logging.Logger logger) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidconnectDelegationFuture(Future target, IFuture source)Connect a delegation future with the source.static <T> Future<T>getDelegationFuture(IFuture<T> orig, FutureFunctionality func)static Future<?>getDelegationFuture(java.lang.Class<?> clazz, FutureFunctionality func)protected java.util.logging.LoggergetLogger()Get the logger.voidhandleAfterIntermediateResult(java.lang.Object result)Perform code after an intermediate result has been added.voidhandleBackwardCommand(java.lang.Object info)Optionally augment backward command behavior.voidhandleException(java.lang.Exception exception)Optionally augment exception behavior.voidhandleFinished(java.util.Collection<java.lang.Object> results)Optionally alter finished behavior.java.lang.ObjecthandleIntermediateResult(java.lang.Object result)Optionally alter a result.voidhandlePull()Optionally augment pull behavior.java.lang.ObjecthandleResult(java.lang.Object result)Optionally alter a result.voidhandleTerminated(java.lang.Exception reason)Optionally augment termination behavior.booleanisUndone(boolean undone)Optionally alter the undone flag.protected voidlogException(java.lang.Exception e, java.lang.Exception userex, boolean terminable, boolean undone, boolean async)Log an exception.voidscheduleBackward(ICommand<java.lang.Void> code)Schedule backward in result direction, i.e.<T> voidscheduleForward(ICommand<T> code, T arg)Schedule forward in result direction, i.e. 
 - 
 
- 
- 
Field Detail
- 
DROP_INTERMEDIATE_RESULT
public static final java.lang.String DROP_INTERMEDIATE_RESULT
Marker for an intermediate result to be dropped.- See Also:
 - Constant Field Values
 
 
- 
logger
protected java.util.logging.Logger logger
The logger used for notification failure warnings (if any). 
- 
loggerfetcher
protected IResultCommand<java.util.logging.Logger,java.lang.Void> loggerfetcher
 
- 
undone
protected boolean undone
 
 - 
 
- 
Constructor Detail
- 
FutureFunctionality
public FutureFunctionality(java.util.logging.Logger logger)
 
- 
FutureFunctionality
public FutureFunctionality(IResultCommand<java.util.logging.Logger,java.lang.Void> loggerfetcher)
 
 - 
 
- 
Method Detail
- 
getLogger
protected java.util.logging.Logger getLogger()
Get the logger. 
- 
logException
protected void logException(java.lang.Exception e, java.lang.Exception userex, boolean terminable, boolean undone, boolean async)Log an exception. 
- 
scheduleForward
public <T> void scheduleForward(ICommand<T> code, T arg)
Schedule forward in result direction, i.e. from callee to caller, e.g. update timer to avoid timeouts. 
- 
scheduleBackward
public void scheduleBackward(ICommand<java.lang.Void> code)
Schedule backward in result direction, i.e. from caller to callee, e.g. future termination. 
- 
isUndone
public boolean isUndone(boolean undone)
Optionally alter the undone flag. 
- 
handleResult
public java.lang.Object handleResult(java.lang.Object result) throws java.lang.ExceptionOptionally alter a result.- Throws:
 java.lang.Exception
 
- 
handleIntermediateResult
public java.lang.Object handleIntermediateResult(java.lang.Object result) throws java.lang.ExceptionOptionally alter a result.- Throws:
 java.lang.Exception
 
- 
handleAfterIntermediateResult
public void handleAfterIntermediateResult(java.lang.Object result) throws java.lang.ExceptionPerform code after an intermediate result has been added.- Throws:
 java.lang.Exception
 
- 
handleFinished
public void handleFinished(java.util.Collection<java.lang.Object> results) throws java.lang.ExceptionOptionally alter finished behavior.- Throws:
 java.lang.Exception
 
- 
handleException
public void handleException(java.lang.Exception exception)
Optionally augment exception behavior. 
- 
handleTerminated
public void handleTerminated(java.lang.Exception reason)
Optionally augment termination behavior. 
- 
handleBackwardCommand
public void handleBackwardCommand(java.lang.Object info)
Optionally augment backward command behavior. 
- 
handlePull
public void handlePull()
Optionally augment pull behavior. 
- 
getDelegationFuture
public static <T> Future<T> getDelegationFuture(IFuture<T> orig, FutureFunctionality func)
 
- 
getDelegationFuture
public static Future<?> getDelegationFuture(java.lang.Class<?> clazz, FutureFunctionality func)
 
 - 
 
 -