Package jadex.commons.gui.future
Class SwingIntermediateDelegationResultListener<E>
- java.lang.Object
-
- jadex.commons.gui.future.SwingIntermediateDelegationResultListener<E>
-
- All Implemented Interfaces:
IFunctionalExceptionListener,IFunctionalIntermediateFinishedListener<E>,IFunctionalIntermediateResultListener<E>,IFunctionalResultListener<java.util.Collection<E>>,IFutureCommandResultListener<java.util.Collection<E>>,IIntermediateFutureCommandResultListener<E>,IIntermediateResultListener<E>,IResultListener<java.util.Collection<E>>,IUndoneIntermediateResultListener<E>,IUndoneResultListener<java.util.Collection<E>>
public class SwingIntermediateDelegationResultListener<E> extends java.lang.Object implements IIntermediateFutureCommandResultListener<E>, IUndoneIntermediateResultListener<E>
Exception delegation listener for intermediate results called back on swing thread.
-
-
Field Summary
Fields Modifier and Type Field Description protected IntermediateFuture<E>futureThe future to which calls are delegated.protected booleanundoneThe undone flag.
-
Constructor Summary
Constructors Constructor Description SwingIntermediateDelegationResultListener(IntermediateFuture<E> future)Create a new 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.voidcustomCommandAvailable(java.lang.Object command)Called when a command is available.voidcustomExceptionOccurred(java.lang.Exception exception)Called when an exception occurred.voidcustomFinished()Declare that the future is finished.voidcustomIntermediateResultAvailable(E result)Called when an intermediate result is available.voidcustomResultAvailable(java.util.Collection<E> result)Called when the result is available.voidexceptionOccurred(java.lang.Exception exception)Called when an exception occurred.voidexceptionOccurredIfUndone(java.lang.Exception exception)Called when an exception occurred.voidfinished()Declare that the future is finished.voidfinishedIfUndone()Declare that the future is finished.voidintermediateResultAvailable(E result)Called when an intermediate result is available.voidintermediateResultAvailableIfUndone(E result)Called when an intermediate result is available.booleanisUndone()Get the undone.voidresultAvailable(java.util.Collection<E> result)Called when the result is available.voidresultAvailableIfUndone(java.util.Collection<E> result)Called when the result is available.
-
-
-
Field Detail
-
future
protected IntermediateFuture<E> future
The future to which calls are delegated.
-
undone
protected boolean undone
The undone flag.
-
-
Constructor Detail
-
SwingIntermediateDelegationResultListener
public SwingIntermediateDelegationResultListener(IntermediateFuture<E> future)
Create a new listener.
-
-
Method Detail
-
resultAvailable
public final void resultAvailable(java.util.Collection<E> result)
Called when the result is available. This method is only called for non-intermediate futures, i.e. when this method is called it is guaranteed that the intermediateResultAvailable method has not been called.- Specified by:
resultAvailablein interfaceIFunctionalResultListener<E>- Parameters:
result- The final result.
-
exceptionOccurred
public final void exceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.- Specified by:
exceptionOccurredin interfaceIFunctionalExceptionListener- Parameters:
exception- The exception.
-
intermediateResultAvailable
public final void intermediateResultAvailable(E result)
Called when an intermediate result is available.- Specified by:
intermediateResultAvailablein interfaceIFunctionalIntermediateResultListener<E>- Specified by:
intermediateResultAvailablein interfaceIIntermediateResultListener<E>- Parameters:
result- The result.
-
finished
public final void finished()
Declare that the future is finished. This method is only called for intermediate futures, i.e. when this method is called it is guaranteed that the intermediateResultAvailable method was called for all intermediate results before.- Specified by:
finishedin interfaceIFunctionalIntermediateFinishedListener<E>- Specified by:
finishedin interfaceIIntermediateResultListener<E>
-
customFinished
public void customFinished()
Declare that the future is finished.
-
customResultAvailable
public void customResultAvailable(java.util.Collection<E> result)
Called when the result is available.- Parameters:
result- The result.
-
customExceptionOccurred
public void customExceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.- Parameters:
exception- The exception.
-
customIntermediateResultAvailable
public void customIntermediateResultAvailable(E result)
Called when an intermediate result is available.- Parameters:
result- The result.
-
commandAvailable
public final void commandAvailable(java.lang.Object command)
Called when a command is available.- Specified by:
commandAvailablein interfaceIFutureCommandResultListener<E>
-
customCommandAvailable
public void customCommandAvailable(java.lang.Object command)
Called when a command is available.
-
resultAvailableIfUndone
public void resultAvailableIfUndone(java.util.Collection<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.
-
intermediateResultAvailableIfUndone
public void intermediateResultAvailableIfUndone(E result)
Called when an intermediate result is available.- Specified by:
intermediateResultAvailableIfUndonein interfaceIUndoneIntermediateResultListener<E>- Parameters:
result- The result.
-
finishedIfUndone
public void finishedIfUndone()
Declare that the future is finished. This method is only called for intermediate futures, i.e. when this method is called it is guaranteed that the intermediateResultAvailable method was called for all intermediate results before.- Specified by:
finishedIfUndonein interfaceIUndoneIntermediateResultListener<E>
-
isUndone
public boolean isUndone()
Get the undone.- Returns:
- The undone.
-
-