Package jadex.bridge
Class ComponentResultListener<E>
- java.lang.Object
-
- jadex.bridge.ComponentResultListener<E>
-
- All Implemented Interfaces:
IFunctionalExceptionListener,IFunctionalResultListener<E>,IFutureCommandResultListener<E>,IResultListener<E>,IUndoneResultListener<E>
- Direct Known Subclasses:
IntermediateComponentResultListener
public class ComponentResultListener<E> extends java.lang.Object implements IResultListener<E>, IFutureCommandResultListener<E>, IUndoneResultListener<E>
The result listener for executing listener invocations as a component step.
-
-
Field Summary
Fields Modifier and Type Field Description protected IExternalAccessaccessThe external access.protected IInternalAccesscomponentThe component.protected IResultListener<E>listenerThe result listener.protected booleanundoneThe undone flag.
-
Constructor Summary
Constructors Constructor Description ComponentResultListener(IFunctionalResultListener<E> listener, IFunctionalExceptionListener exceptionListener, IExternalAccess access)Create a new component result listener.ComponentResultListener(IFunctionalResultListener<E> listener, IFunctionalExceptionListener exceptionListener, IInternalAccess component)Create a new component result listener.ComponentResultListener(IResultListener<E> listener, IExternalAccess access)Create a new component result listener.ComponentResultListener(IResultListener<E> listener, IInternalAccess component)Create a new component result listener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommandAvailable(java.lang.Object command)Called when a command is available.voidexceptionOccurred(java.lang.Exception exception)Called when an exception occurred.voidexceptionOccurredIfUndone(java.lang.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.
-
-
-
Field Detail
-
listener
protected IResultListener<E> listener
The result listener.
-
component
protected IInternalAccess component
The component.
-
access
protected IExternalAccess access
The external access.
-
undone
protected boolean undone
The undone flag.
-
-
Constructor Detail
-
ComponentResultListener
public ComponentResultListener(IResultListener<E> listener, IInternalAccess component)
Create a new component result listener.- Parameters:
listener- The listener.adapter- The adapter.
-
ComponentResultListener
public ComponentResultListener(IResultListener<E> listener, IExternalAccess access)
Create a new component result listener.- Parameters:
listener- The listener.adapter- The adapter.
-
ComponentResultListener
public ComponentResultListener(IFunctionalResultListener<E> listener, IFunctionalExceptionListener exceptionListener, IExternalAccess access)
Create a new component result listener.- Parameters:
listener- The functional listener.exceptionListener- The functional exception listener. Maybenull, which will lead to default exception logging.access- External access of the component to schedule the listener methods on.
-
ComponentResultListener
public ComponentResultListener(IFunctionalResultListener<E> listener, IFunctionalExceptionListener exceptionListener, IInternalAccess component)
Create a new component result listener.- Parameters:
listener- The functional listener.exceptionListener- The functional exception listener. Maybenull, which will lead to default exception logging.adapter- The adapter. to schedule the listener methods on.
-
-
Method Detail
-
resultAvailable
public void resultAvailable(E result)
Called when the result is available.- Specified by:
resultAvailablein interfaceIFunctionalResultListener<E>- Parameters:
result- The result.
-
exceptionOccurred
public void exceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.- Specified by:
exceptionOccurredin interfaceIFunctionalExceptionListener- Parameters:
exception- The exception.
-
resultAvailableIfUndone
public void resultAvailableIfUndone(E result)
Called when the result is available.- Specified by:
resultAvailableIfUndonein interfaceIUndoneResultListener<E>- Parameters:
result- The result.
-
exceptionOccurredIfUndone
public void exceptionOccurredIfUndone(java.lang.Exception exception)
Called when an exception occurred.- Specified by:
exceptionOccurredIfUndonein interfaceIUndoneResultListener<E>- Parameters:
exception- The exception.
-
commandAvailable
public void commandAvailable(java.lang.Object command)
Called when a command is available.- Specified by:
commandAvailablein interfaceIFutureCommandResultListener<E>
-
-