Package jadex.execution.future
Class ComponentResultListener<E>
java.lang.Object
jadex.execution.future.ComponentResultListener<E>
- All Implemented Interfaces:
jadex.future.IFutureCommandResultListener<E>,jadex.future.IResultListener<E>,jadex.future.IUndoneResultListener<E>
- Direct Known Subclasses:
IntermediateComponentResultListener
public class ComponentResultListener<E>
extends Object
implements jadex.future.IResultListener<E>, jadex.future.IFutureCommandResultListener<E>, jadex.future.IUndoneResultListener<E>
The result listener for executing listener invocations as a component step.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionComponentResultListener(jadex.future.IResultListener<E> listener, jadex.core.IComponent component) Create a new component result listener.ComponentResultListener(jadex.future.IResultListener<E> listener, jadex.core.IExternalAccess access) Create a new component result listener. -
Method Summary
Modifier and TypeMethodDescriptionvoidcommandAvailable(Object command) Called when a command is available.voidexceptionOccurred(Exception exception) Called when an exception occurred.voidexceptionOccurredIfUndone(Exception exception) Called when an exception occurred.voidresultAvailable(E result) Called when the result is available.voidresultAvailableIfUndone(E result) Called when the result is available.static jadex.future.IFuture<Void>scheduleForward(jadex.core.IExternalAccess access, jadex.core.IComponent component, Runnable notification) Execute a listener notification on the component using either an external access or the internal one and robustly use the rescue thread for the notification, when the component is terminated.protected voidscheduleForward(Runnable notification) Execute a listener notification on the component.
-
Field Details
-
listener
The result listener. -
component
protected jadex.core.IComponent componentThe component. -
access
protected jadex.core.IExternalAccess accessThe external access. -
undone
protected boolean undoneThe undone flag.
-
-
Constructor Details
-
ComponentResultListener
public ComponentResultListener(jadex.future.IResultListener<E> listener, jadex.core.IComponent component) Create a new component result listener.- Parameters:
listener- The listener.adapter- The adapter.
-
ComponentResultListener
public ComponentResultListener(jadex.future.IResultListener<E> listener, jadex.core.IExternalAccess access) Create a new component result listener.- Parameters:
listener- The listener.adapter- The adapter.
-
-
Method Details
-
resultAvailable
Called when the result is available.- Specified by:
resultAvailablein interfacejadex.future.IResultListener<E>- Parameters:
result- The result.
-
exceptionOccurred
Called when an exception occurred.- Specified by:
exceptionOccurredin interfacejadex.future.IResultListener<E>- Parameters:
exception- The exception.
-
resultAvailableIfUndone
Called when the result is available.- Specified by:
resultAvailableIfUndonein interfacejadex.future.IUndoneResultListener<E>- Parameters:
result- The result.
-
exceptionOccurredIfUndone
Called when an exception occurred.- Specified by:
exceptionOccurredIfUndonein interfacejadex.future.IUndoneResultListener<E>- Parameters:
exception- The exception.
-
commandAvailable
Called when a command is available.- Specified by:
commandAvailablein interfacejadex.future.IFutureCommandResultListener<E>
-
scheduleForward
Execute a listener notification on the component. -
scheduleForward
public static jadex.future.IFuture<Void> scheduleForward(jadex.core.IExternalAccess access, jadex.core.IComponent component, Runnable notification) Execute a listener notification on the component using either an external access or the internal one and robustly use the rescue thread for the notification, when the component is terminated.
-