Package jadex.bridge
Class ComponentResultListener<E>
- java.lang.Object
 - 
- jadex.bridge.ComponentResultListener<E>
 
 
- 
- All Implemented Interfaces:
 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(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 Static 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.static voidscheduleForward(IExternalAccess access, IInternalAccess component, java.lang.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(java.lang.Runnable notification)Execute a listener notification on the component. 
 - 
 
- 
- 
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.
 
 - 
 
- 
Method Detail
- 
resultAvailable
public void resultAvailable(E result)
Called when the result is available.- Specified by:
 resultAvailablein interfaceIResultListener<E>- Parameters:
 result- The result.
 
- 
exceptionOccurred
public void exceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.- Specified by:
 exceptionOccurredin interfaceIResultListener<E>- 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>
 
- 
scheduleForward
protected void scheduleForward(java.lang.Runnable notification)
Execute a listener notification on the component. 
- 
scheduleForward
public static void scheduleForward(IExternalAccess access, IInternalAccess component, java.lang.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. 
 - 
 
 -