Package jadex.execution.future
Class FutureFunctionality
java.lang.Object
jadex.execution.future.FutureFunctionality
- Direct Known Subclasses:
ComponentFutureFunctionality
Default future functionality.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFutureFunctionality(jadex.common.IResultCommand<Logger, Void> loggerfetcher) FutureFunctionality(Logger logger) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> jadex.future.Future<T> getDelegationFuture(jadex.future.IFuture<T> orig, FutureFunctionality func) static jadex.future.Future<?> getDelegationFuture(Class<?> clazz, FutureFunctionality func) jadex.future.Future<?> protected LoggerGet the logger.voidhandleAfterIntermediateResult(Object result) Perform code after an intermediate result has been added.voidhandleBackwardCommand(Object info) Optionally augment backward command behavior.voidhandleException(Exception exception) Optionally augment exception behavior.voidhandleFinished(Collection<Object> results) Optionally alter finished behavior.handleIntermediateResult(Object result) Optionally alter a result.voidOptionally augment pull behavior.handleResult(Object result) Optionally alter a result.voidhandleTerminated(Exception reason) Optionally augment termination behavior.booleanisUndone(boolean undone) Optionally alter the undone flag.protected voidlogException(Exception e, Exception userex, boolean terminable, boolean undone, boolean async) Log an exception.voidscheduleBackward(jadex.common.ICommand<Void> code) Schedule backward in result direction, i.e.<T> voidscheduleForward(jadex.common.ICommand<T> code, T arg) Schedule forward in result direction, i.e.voidsetFuture(jadex.future.Future<?> future)
-
Field Details
-
DROP_INTERMEDIATE_RESULT
Marker for an intermediate result to be dropped.- See Also:
-
logger
The logger used for notification failure warnings (if any). -
loggerfetcher
-
undone
protected boolean undone -
future
protected jadex.future.Future<?> future
-
-
Constructor Details
-
FutureFunctionality
public FutureFunctionality() -
FutureFunctionality
-
FutureFunctionality
-
-
Method Details
-
getFuture
public jadex.future.Future<?> getFuture() -
setFuture
public void setFuture(jadex.future.Future<?> future) -
getLogger
Get the logger. -
logException
protected void logException(Exception e, Exception userex, boolean terminable, boolean undone, boolean async) Log an exception. -
scheduleForward
public <T> void scheduleForward(jadex.common.ICommand<T> code, T arg) Schedule forward in result direction, i.e. from callee to caller, e.g. update timer to avoid timeouts. -
scheduleBackward
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
Optionally alter a result.- Throws:
Exception
-
handleIntermediateResult
Optionally alter a result.- Throws:
Exception
-
handleAfterIntermediateResult
Perform code after an intermediate result has been added.- Throws:
Exception
-
handleFinished
Optionally alter finished behavior.- Throws:
Exception
-
handleException
Optionally augment exception behavior. -
handleTerminated
Optionally augment termination behavior. -
handleBackwardCommand
Optionally augment backward command behavior. -
handlePull
public void handlePull()Optionally augment pull behavior. -
getDelegationFuture
public static <T> jadex.future.Future<T> getDelegationFuture(jadex.future.IFuture<T> orig, FutureFunctionality func) -
getDelegationFuture
-