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>,- IFunctionalIntermediateResultCountListener,- IFunctionalIntermediateResultListener<E>,- IFunctionalResultListener<java.util.Collection<E>>,- IFutureCommandResultListener<java.util.Collection<E>>,- IIntermediateResultListener<E>,- IResultListener<java.util.Collection<E>>
 
 public 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 SummaryConstructors Constructor Description IntermediateDefaultResultListener()Create a new listener.IntermediateDefaultResultListener(java.util.logging.Logger logger)Create a new listener.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinished()Declare that the future is finished.voidintermediateResultAvailable(E result)Called when an intermediate result is available.voidmaxResultCountAvailable(int max)Declare that the future result count is available.voidresultAvailable(java.util.Collection<E> result)Called when the result is available.- 
Methods inherited from class jadex.commons.future.DefaultResultListenercommandAvailable, exceptionOccurred
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface jadex.commons.future.IFunctionalExceptionListenerexceptionOccurred
 
- 
 
- 
- 
- 
Constructor Detail- 
IntermediateDefaultResultListenerpublic IntermediateDefaultResultListener() Create a new listener.- Parameters:
- logger- The logger.
 
 - 
IntermediateDefaultResultListenerpublic IntermediateDefaultResultListener(java.util.logging.Logger logger) Create a new listener.- Parameters:
- logger- The logger.
 
 
- 
 - 
Method Detail- 
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>
 
 - 
resultAvailablepublic void resultAvailable(java.util.Collection<E> result) Called when the result is available.- Specified by:
- resultAvailablein interface- IFunctionalResultListener<E>
- Parameters:
- result- The result.
 
 - 
maxResultCountAvailablepublic void maxResultCountAvailable(int max) Description copied from interface:IIntermediateResultListenerDeclare that the future result count is available. This method is only called for intermediate futures, i.e. when this method is called it is guaranteed that the intermediateResultAvailable method will be called as often as the result count indicates except an exception occurs.- Specified by:
- maxResultCountAvailablein interface- IFunctionalIntermediateResultCountListener
- Specified by:
- maxResultCountAvailablein interface- IIntermediateResultListener<E>
 
 
- 
 
-