Package jadex.commons.future
Class DefaultTuple2ResultListener<E,F>
- java.lang.Object
-
- jadex.commons.future.DefaultTuple2ResultListener<E,F>
-
- All Implemented Interfaces:
IIntermediateResultListener<TupleResult>
,IResultListener<java.util.Collection<TupleResult>>
,ITuple2ResultListener<E,F>
public abstract class DefaultTuple2ResultListener<E,F> extends java.lang.Object implements ITuple2ResultListener<E,F>
Default tuple2 result listener that implements the (obsolete) methods - resultAvailable - intermediateResultAvailable - finished - resultCountAvailable
-
-
Constructor Summary
Constructors Constructor Description DefaultTuple2ResultListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finished()
Declare that the future is finished.void
intermediateResultAvailable(TupleResult result)
Called when an intermediate result is available.void
maxResultCountAvailable(int count)
Declare that the future result count is available.void
resultAvailable(java.util.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.commons.future.IResultListener
exceptionOccurred
-
Methods inherited from interface jadex.commons.future.ITuple2ResultListener
firstResultAvailable, secondResultAvailable
-
-
-
-
Method Detail
-
resultAvailable
public void resultAvailable(java.util.Collection<TupleResult> result)
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
public void intermediateResultAvailable(TupleResult result)
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>
-
-