Package jadex.commons.future
Class ExceptionDelegationResultListener<E,T>
- java.lang.Object
-
- jadex.commons.future.ExceptionDelegationResultListener<E,T>
-
- All Implemented Interfaces:
IFunctionalExceptionListener
,IFunctionalResultListener<E>
,IFutureCommandResultListener<E>
,IResultListener<E>
,IUndoneResultListener<E>
- Direct Known Subclasses:
IntervalBehavior.StepResultListener
public abstract class ExceptionDelegationResultListener<E,T> extends java.lang.Object implements IResultListener<E>, IFutureCommandResultListener<E>, IUndoneResultListener<E>
Result listener that delegates calls to a future.
-
-
Constructor Summary
Constructors Constructor Description ExceptionDelegationResultListener(Future<T> future)
Create a new listener.ExceptionDelegationResultListener(Future<T> future, boolean undone)
Create a new listener.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
commandAvailable(java.lang.Object command)
Called when a command is available.abstract void
customResultAvailable(E result)
Called when the result is available.void
exceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.void
exceptionOccurredIfUndone(java.lang.Exception exception)
Called when an exception occurred.boolean
isUndone()
Get the undone.void
resultAvailable(E result)
Called when the result is available.void
resultAvailableIfUndone(E result)
Called when the result is available.
-
-
-
Method Detail
-
resultAvailable
public final void resultAvailable(E result)
Called when the result is available.- Specified by:
resultAvailable
in interfaceIFunctionalResultListener<E>
- Parameters:
result
- The result.
-
customResultAvailable
public abstract void customResultAvailable(E result) throws java.lang.Exception
Called when the result is available.- Parameters:
result
- The result.- Throws:
java.lang.Exception
-
exceptionOccurred
public void exceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.- Specified by:
exceptionOccurred
in interfaceIFunctionalExceptionListener
- Parameters:
exception
- The exception.
-
resultAvailableIfUndone
public void resultAvailableIfUndone(E result)
Called when the result is available.- Specified by:
resultAvailableIfUndone
in interfaceIUndoneResultListener<E>
- Parameters:
result
- The result.
-
exceptionOccurredIfUndone
public void exceptionOccurredIfUndone(java.lang.Exception exception)
Called when an exception occurred.- Specified by:
exceptionOccurredIfUndone
in interfaceIUndoneResultListener<E>
- Parameters:
exception
- The exception.
-
isUndone
public boolean isUndone()
Get the undone.- Returns:
- The undone.
-
commandAvailable
public void commandAvailable(java.lang.Object command)
Called when a command is available.- Specified by:
commandAvailable
in interfaceIFutureCommandResultListener<E>
-
-