Package jadex.future
Class IntermediateEmptyResultListener<E>
java.lang.Object
jadex.future.IntermediateEmptyResultListener<E>
- All Implemented Interfaces:
IIntermediateResultListener<E>
,IResultListener<Collection<E>>
public class IntermediateEmptyResultListener<E>
extends Object
implements IIntermediateResultListener<E>
Empty implementation of the intermediate result listener.
Allows for omitting methods if not used.
Consider using instead of @code new IIntermediateResultListener<>()
-
Constructor Summary
Constructors -
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> result) Called when the result is available.
-
Constructor Details
-
IntermediateEmptyResultListener
public IntermediateEmptyResultListener()
-
-
Method Details
-
intermediateResultAvailable
Description copied from interface:IIntermediateResultListener
Called when an intermediate result is available.- Specified by:
intermediateResultAvailable
in interfaceIIntermediateResultListener<E>
- Parameters:
result
- The result.
-
resultAvailable
Description copied from interface:IResultListener
Called when the result is available.- Specified by:
resultAvailable
in interfaceIResultListener<E>
- Parameters:
result
- The result.
-
exceptionOccurred
Description copied from interface:IResultListener
Called when an exception occurred.- Specified by:
exceptionOccurred
in interfaceIResultListener<E>
- Parameters:
exception
- The exception.
-
finished
public void finished()Description copied from interface:IIntermediateResultListener
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>
-
maxResultCountAvailable
public void maxResultCountAvailable(int max) Description copied from interface:IIntermediateResultListener
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 except an exception occurs.- Specified by:
maxResultCountAvailable
in interfaceIIntermediateResultListener<E>
-