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 TypeMethodDescriptionvoid
exceptionOccurred
(Exception exception) Called when an exception occurred.void
finished()
Declare that the future is finished.void
intermediateResultAvailable
(E result) Called when an intermediate result is available.void
maxResultCountAvailable
(int max) Declare that the future result count is available.void
resultAvailable
(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:
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 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:
resultAvailable
in interfaceIResultListener<E>
- Parameters:
results
- The final result.
-
exceptionOccurred
Called when an exception occurred.- Specified by:
exceptionOccurred
in 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:
maxResultCountAvailable
in interfaceIIntermediateResultListener<E>
-