Package jadex.commons.gui.future
Class SwingIntermediateDefaultResultListener<E>
- java.lang.Object
-
- jadex.commons.future.DefaultResultListener<E>
-
- jadex.commons.gui.future.SwingDefaultResultListener<java.util.Collection<E>>
-
- jadex.commons.gui.future.SwingIntermediateDefaultResultListener<E>
-
- All Implemented Interfaces:
IFunctionalExceptionListener,IFunctionalIntermediateFinishedListener<E>,IFunctionalIntermediateResultListener<E>,IFunctionalResultListener<java.util.Collection<E>>,IFutureCommandResultListener<java.util.Collection<E>>,IIntermediateResultListener<E>,IResultListener<java.util.Collection<E>>
public abstract class SwingIntermediateDefaultResultListener<E> extends SwingDefaultResultListener<java.util.Collection<E>> implements IIntermediateResultListener<E>
Default implementation of intermediate result listener with methods called on swing thread.
-
-
Field Summary
-
Fields inherited from class jadex.commons.gui.future.SwingDefaultResultListener
customExceptionListener, customResultListener, parent
-
-
Constructor Summary
Constructors Constructor Description SwingIntermediateDefaultResultListener()Create a new listener.SwingIntermediateDefaultResultListener(java.awt.Component parent)Create a new listener.SwingIntermediateDefaultResultListener(java.util.logging.Logger logger)Create a new listener.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcustomFinished()Declare that the future is finished.abstract voidcustomIntermediateResultAvailable(E result)Called when an intermediate result is available.voidcustomResultAvailable(java.util.Collection<E> result)Overwritten to call intermediate and finished methods.voidfinished()Call customFinished() on swing thread.voidintermediateResultAvailable(E result)Call customIntermediateResultAvailable() on swing thread.-
Methods inherited from class jadex.commons.gui.future.SwingDefaultResultListener
commandAvailable, customCommandAvailable, customExceptionOccurred, exceptionOccurred, resultAvailable, unblock
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jadex.commons.future.IFunctionalExceptionListener
exceptionOccurred
-
Methods inherited from interface jadex.commons.future.IFunctionalResultListener
resultAvailable
-
-
-
-
Constructor Detail
-
SwingIntermediateDefaultResultListener
public SwingIntermediateDefaultResultListener()
Create a new listener.
-
SwingIntermediateDefaultResultListener
public SwingIntermediateDefaultResultListener(java.awt.Component parent)
Create a new listener.- Parameters:
parent- The parent component (when errors should be shown as dialog).
-
SwingIntermediateDefaultResultListener
public SwingIntermediateDefaultResultListener(java.util.logging.Logger logger)
Create a new listener.- Parameters:
logger- The logger.
-
-
Method Detail
-
customIntermediateResultAvailable
public abstract void customIntermediateResultAvailable(E result)
Called when an intermediate result is available.- Parameters:
result- The result.
-
customFinished
public void customFinished()
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.
-
intermediateResultAvailable
public final void intermediateResultAvailable(E result)
Call customIntermediateResultAvailable() on swing thread.- Specified by:
intermediateResultAvailablein interfaceIFunctionalIntermediateResultListener<E>- Specified by:
intermediateResultAvailablein interfaceIIntermediateResultListener<E>- Parameters:
result- The result.
-
finished
public final void finished()
Call customFinished() on swing thread.- Specified by:
finishedin interfaceIFunctionalIntermediateFinishedListener<E>- Specified by:
finishedin interfaceIIntermediateResultListener<E>
-
customResultAvailable
public void customResultAvailable(java.util.Collection<E> result)
Overwritten to call intermediate and finished methods.- Overrides:
customResultAvailablein classSwingDefaultResultListener<java.util.Collection<E>>- Parameters:
result- The result.
-
-