Package jadex.commons.gui.future
Class SwingExceptionDelegationResultListener<E,T>
- java.lang.Object
-
- jadex.commons.gui.future.SwingExceptionDelegationResultListener<E,T>
-
- All Implemented Interfaces:
IFutureCommandResultListener<E>
,IResultListener<E>
,IUndoneResultListener<E>
public abstract class SwingExceptionDelegationResultListener<E,T> extends java.lang.Object implements IUndoneResultListener<E>, IFutureCommandResultListener<E>
Delegation result listener that calls customResultAvailable and customExceptionOccurred on swing thread.
-
-
Constructor Summary
Constructors Constructor Description SwingExceptionDelegationResultListener(Future<T> future)
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.void
customCommandAvailable(java.lang.Object command)
Called when a command is available.void
customExceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.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 interfaceIResultListener<E>
- Parameters:
result
- The result.
-
exceptionOccurred
public final void exceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.- Specified by:
exceptionOccurred
in interfaceIResultListener<E>
- Parameters:
exception
- The exception.
-
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
-
customExceptionOccurred
public void customExceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.- Parameters:
exception
- The exception.
-
commandAvailable
public final void commandAvailable(java.lang.Object command)
Called when a command is available.- Specified by:
commandAvailable
in interfaceIFutureCommandResultListener<E>
-
customCommandAvailable
public void customCommandAvailable(java.lang.Object command)
Called when a command is available.
-
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.
-
-