Package jadex.future
Class DefaultTuple2ResultListener<E,F>
java.lang.Object
jadex.future.DefaultTuple2ResultListener<E,F>
- All Implemented Interfaces:
IIntermediateResultListener<TupleResult>
,IResultListener<Collection<TupleResult>>
,ITuple2ResultListener<E,
F>
public abstract class DefaultTuple2ResultListener<E,F>
extends Object
implements ITuple2ResultListener<E,F>
Default tuple2 result listener that implements the
(obsolete) methods
- resultAvailable
- intermediateResultAvailable
- finished
- resultCountAvailable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
finished()
Declare that the future is finished.void
Called when an intermediate result is available.void
maxResultCountAvailable
(int count) Declare that the future result count is available.void
resultAvailable
(Collection<TupleResult> result) Called when the result is available.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jadex.future.IResultListener
exceptionOccurred
Methods inherited from interface jadex.future.ITuple2ResultListener
firstResultAvailable, secondResultAvailable
-
Constructor Details
-
DefaultTuple2ResultListener
public DefaultTuple2ResultListener()
-
-
Method Details
-
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:
result
- The final result.
-
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>
-
maxResultCountAvailable
public void maxResultCountAvailable(int count) 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>
-