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 TypeMethodDescriptionvoidfinished()Declare that the future is finished.voidCalled when an intermediate result is available.voidmaxResultCountAvailable(int count) Declare that the future result count is available.voidresultAvailable(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, waitMethods inherited from interface jadex.future.IResultListener
exceptionOccurredMethods 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:
resultAvailablein interfaceIResultListener<E>- Parameters:
result- The final result.
-
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>
-
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:
maxResultCountAvailablein interfaceIIntermediateResultListener<E>
-