Package jadex.commons.future
Class CollectingIntermediateResultListener<E>
- java.lang.Object
- 
- jadex.commons.future.CollectingIntermediateResultListener<E>
 
- 
- All Implemented Interfaces:
- IFunctionalExceptionListener,- IFunctionalIntermediateFinishedListener<E>,- IFunctionalIntermediateResultListener<E>,- IFunctionalResultListener<java.util.Collection<E>>,- IIntermediateResultListener<E>,- IResultListener<java.util.Collection<E>>
 
 public abstract class CollectingIntermediateResultListener<E> extends java.lang.Object implements IIntermediateResultListener<E> A listener that collects intermediate results and calls resultAvailable() on setFinished().
- 
- 
Constructor SummaryConstructors Constructor Description CollectingIntermediateResultListener()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidexceptionOccurred(java.lang.Exception exception)Called when an exception occurred.voidfinished()Declare that the future is finished.voidintermediateResultAvailable(E result)Called when an intermediate result is available.abstract voidresultAvailable(java.util.Collection<E> result)Called when the result is available.
 
- 
- 
- 
Field Detail- 
resultsprotected java.util.Collection<E> results The results.
 
- 
 - 
Method Detail- 
resultAvailablepublic abstract void resultAvailable(java.util.Collection<E> result) Called when the result is available.- Specified by:
- resultAvailablein interface- IFunctionalResultListener<E>
- Parameters:
- result- The final result.
 
 - 
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>
 
 - 
exceptionOccurredpublic abstract void exceptionOccurred(java.lang.Exception exception) Called when an exception occurred.- Specified by:
- exceptionOccurredin interface- IFunctionalExceptionListener
- Parameters:
- exception- The exception.
 
 
- 
 
-