Package jadex.commons.gui.future
Class SwingIntermediateResultListener<E>
- java.lang.Object
- 
- jadex.commons.gui.future.SwingIntermediateResultListener<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 SwingIntermediateResultListener<E> extends java.lang.Object implements IIntermediateFutureCommandResultListener<E>, IUndoneIntermediateResultListener<E> 
- 
- 
Field SummaryFields Modifier and Type Field Description protected IIntermediateResultListener<E>listenerThe delegation listener.protected booleanundoneThe undone flag.
 - 
Constructor SummaryConstructors Constructor Description SwingIntermediateResultListener(IFunctionalResultListener<E> intermediateListener)Create a new listener with functional interfaces.SwingIntermediateResultListener(IFunctionalResultListener<E> intermediateListener, IFunctionalResultListener<java.lang.Void> finishedListener)Create a new listener with functional interfaces.SwingIntermediateResultListener(IFunctionalResultListener<E> intermediateListener, IFunctionalResultListener<java.lang.Void> finishedListener, IFunctionalExceptionListener exceptionListener)Create a new listener with functional interfaces.SwingIntermediateResultListener(IIntermediateResultListener<E> listener)Create a new listener.
 - 
Method SummaryAll 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- 
listenerprotected IIntermediateResultListener<E> listener The delegation listener.
 - 
undoneprotected boolean undone The undone flag.
 
- 
 - 
Constructor Detail- 
SwingIntermediateResultListenerpublic SwingIntermediateResultListener(IFunctionalResultListener<E> intermediateListener) Create a new listener with functional interfaces.- Parameters:
- intermediateListener- The intermediate listener.
 
 - 
SwingIntermediateResultListenerpublic SwingIntermediateResultListener(IFunctionalResultListener<E> intermediateListener, IFunctionalResultListener<java.lang.Void> finishedListener) Create a new listener with functional interfaces.- Parameters:
- intermediateListener- The intermediate listener.
- finishedListener- The finished listener, called when no more intermediate results will arrive.
 
 - 
SwingIntermediateResultListenerpublic SwingIntermediateResultListener(IFunctionalResultListener<E> intermediateListener, IFunctionalResultListener<java.lang.Void> finishedListener, IFunctionalExceptionListener exceptionListener) Create a new listener with functional interfaces.- Parameters:
- intermediateListener- The intermediate listener.
- finishedListener- The finished listener, called when no more intermediate results will arrive.
- exceptionListener- The listener that is called on exceptions.
 
 - 
SwingIntermediateResultListenerpublic SwingIntermediateResultListener(IIntermediateResultListener<E> listener) Create a new listener.
 
- 
 - 
Method Detail- 
resultAvailablepublic 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 interface- IFunctionalResultListener<E>
- Parameters:
- result- The final result.
 
 - 
exceptionOccurredpublic void exceptionOccurred(java.lang.Exception exception) Called when an exception occurred.- Specified by:
- exceptionOccurredin interface- IFunctionalExceptionListener
- Parameters:
- exception- The exception.
 
 - 
intermediateResultAvailablepublic void intermediateResultAvailable(E result) Called when an intermediate result is available.- Specified by:
- intermediateResultAvailablein interface- IFunctionalIntermediateResultListener<E>
- Specified by:
- intermediateResultAvailablein interface- IIntermediateResultListener<E>
- Parameters:
- result- The result.
 
 - 
finishedpublic 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 interface- IFunctionalIntermediateFinishedListener<E>
- Specified by:
- finishedin interface- IIntermediateResultListener<E>
 
 - 
customFinishedpublic void customFinished() Declare that the future is finished.
 - 
customResultAvailablepublic void customResultAvailable(java.util.Collection<E> result) Called when the result is available.- Parameters:
- result- The result.
 
 - 
customExceptionOccurredpublic void customExceptionOccurred(java.lang.Exception exception) Called when an exception occurred.- Parameters:
- exception- The exception.
 
 - 
customIntermediateResultAvailablepublic void customIntermediateResultAvailable(E result) Called when an intermediate result is available.- Parameters:
- result- The result.
 
 - 
commandAvailablepublic final void commandAvailable(java.lang.Object command) Called when a command is available.- Specified by:
- commandAvailablein interface- IFutureCommandResultListener<E>
 
 - 
customCommandAvailablepublic void customCommandAvailable(java.lang.Object command) Called when a command is available.
 - 
resultAvailableIfUndonepublic void resultAvailableIfUndone(java.util.Collection<E> result) Called when the result is available.- Specified by:
- resultAvailableIfUndonein interface- IUndoneResultListener<E>
- Parameters:
- result- The result.
 
 - 
exceptionOccurredIfUndonepublic void exceptionOccurredIfUndone(java.lang.Exception exception) Called when an exception occurred.- Specified by:
- exceptionOccurredIfUndonein interface- IUndoneResultListener<E>
- Parameters:
- exception- The exception.
 
 - 
intermediateResultAvailableIfUndonepublic void intermediateResultAvailableIfUndone(E result) Called when an intermediate result is available.- Specified by:
- intermediateResultAvailableIfUndonein interface- IUndoneIntermediateResultListener<E>
- Parameters:
- result- The result.
 
 - 
finishedIfUndonepublic 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 interface- IUndoneIntermediateResultListener<E>
 
 - 
isUndonepublic boolean isUndone() Get the undone.- Returns:
- The undone.
 
 
- 
 
-