Package jadex.commons.future
Class IntermediateDefaultResultListener<E>
- java.lang.Object
-
- jadex.commons.future.DefaultResultListener<java.util.Collection<E>>
-
- jadex.commons.future.IntermediateDefaultResultListener<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 IntermediateDefaultResultListener<E> extends DefaultResultListener<java.util.Collection<E>> implements IIntermediateResultListener<E>
The default listener for just printing out result information. Is used as fallback when no other listener is available.
-
-
Constructor Summary
Constructors Constructor Description IntermediateDefaultResultListener()
Create a new listener.IntermediateDefaultResultListener(java.util.logging.Logger logger)
Create a new listener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finished()
Declare that the future is finished.void
intermediateResultAvailable(E result)
Called when an intermediate result is available.void
resultAvailable(java.util.Collection<E> result)
Called when the result is available.-
Methods inherited from class jadex.commons.future.DefaultResultListener
commandAvailable, exceptionOccurred
-
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
-
-
-
-
Constructor Detail
-
IntermediateDefaultResultListener
public IntermediateDefaultResultListener()
Create a new listener.- Parameters:
logger
- The logger.
-
IntermediateDefaultResultListener
public IntermediateDefaultResultListener(java.util.logging.Logger logger)
Create a new listener.- Parameters:
logger
- The logger.
-
-
Method Detail
-
intermediateResultAvailable
public void intermediateResultAvailable(E result)
Called when an intermediate result is available.- Specified by:
intermediateResultAvailable
in interfaceIFunctionalIntermediateResultListener<E>
- Specified by:
intermediateResultAvailable
in interfaceIIntermediateResultListener<E>
- Parameters:
result
- The result.
-
finished
public 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:
finished
in interfaceIFunctionalIntermediateFinishedListener<E>
- Specified by:
finished
in interfaceIIntermediateResultListener<E>
-
resultAvailable
public void resultAvailable(java.util.Collection<E> result)
Called when the result is available.- Specified by:
resultAvailable
in interfaceIFunctionalResultListener<E>
- Parameters:
result
- The result.
-
-