Package jadex.future
Class UnlimitedIntermediateDelegationResultListener<E>
java.lang.Object
jadex.future.UnlimitedIntermediateDelegationResultListener<E>
- All Implemented Interfaces:
IIntermediateResultListener<E>,IResultListener<Collection<E>>
public class UnlimitedIntermediateDelegationResultListener<E>
extends Object
implements IIntermediateResultListener<E>
Listener that forwards results but not finished events.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new UnlimitedIntermediateDelegationResultListener. -
Method Summary
Modifier and TypeMethodDescriptionvoidexceptionOccurred(Exception exception) Called when an exception occurred.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(Collection<E> results) Called when the result is available.
-
Field Details
-
delegate
The delegate future.
-
-
Constructor Details
-
UnlimitedIntermediateDelegationResultListener
Create a new UnlimitedIntermediateDelegationResultListener.
-
-
Method Details
-
intermediateResultAvailable
Called when an intermediate result is available.- Specified by:
intermediateResultAvailablein 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:
finishedin interfaceIIntermediateResultListener<E>
-
resultAvailable
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 interfaceIResultListener<E>- Parameters:
results- The final result.
-
exceptionOccurred
Called when an exception occurred.- Specified by:
exceptionOccurredin interfaceIResultListener<E>- Parameters:
exception- The exception.
-
maxResultCountAvailable
public void maxResultCountAvailable(int max) Declare 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.- Specified by:
maxResultCountAvailablein interfaceIIntermediateResultListener<E>
-