Package jadex.future
Class IntermediateDefaultResultListener<E>
- All Implemented Interfaces:
IFutureCommandResultListener<Collection<E>>,IIntermediateResultListener<E>,IResultListener<Collection<E>>
public class IntermediateDefaultResultListener<E>
extends DefaultResultListener<Collection<E>>
implements IIntermediateResultListener<E>
The default listener for just printing out result information.
Is used as fallback when no other listener is available.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new listener.Create a new listener. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinished()Declare that the future is finished.voidintermediateResultAvailable(E result) Called when an intermediate result is available.voidmaxResultCountAvailable(int max) Declare that the future result count is available.voidresultAvailable(Collection<E> result) Called when the result is available.Methods inherited from class jadex.future.DefaultResultListener
commandAvailable, exceptionOccurredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jadex.future.IResultListener
exceptionOccurred
-
Constructor Details
-
IntermediateDefaultResultListener
public IntermediateDefaultResultListener()Create a new listener. -
IntermediateDefaultResultListener
Create a new listener.- Parameters:
logger- The logger.
-
-
Method Details
-
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>
-
resultAvailable
Called when the result is available.- Specified by:
resultAvailablein interfaceIResultListener<E>- Parameters:
result- The result.
-
maxResultCountAvailable
public void maxResultCountAvailable(int max) Description copied from interface:IIntermediateResultListenerDeclare 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:
maxResultCountAvailablein interfaceIIntermediateResultListener<E>
-