Package jadex.bridge
Class TimeoutIntermediateResultListener<E>
- java.lang.Object
-
- jadex.bridge.TimeoutResultListener<java.util.Collection<E>>
-
- jadex.bridge.TimeoutIntermediateResultListener<E>
-
- All Implemented Interfaces:
IFunctionalExceptionListener
,IFunctionalIntermediateFinishedListener<E>
,IFunctionalIntermediateResultCountListener
,IFunctionalIntermediateResultListener<E>
,IFunctionalResultListener<java.util.Collection<E>>
,IFutureCommandResultListener<java.util.Collection<E>>
,IIntermediateResultListener<E>
,IResultListener<java.util.Collection<E>>
,IUndoneIntermediateResultListener<E>
,IUndoneResultListener<java.util.Collection<E>>
public class TimeoutIntermediateResultListener<E> extends TimeoutResultListener<java.util.Collection<E>> implements IIntermediateResultListener<E>, IUndoneIntermediateResultListener<E>
-
-
Constructor Summary
Constructors Constructor Description TimeoutIntermediateResultListener(long timeout, IExternalAccess exta)
Create a new listener.TimeoutIntermediateResultListener(long timeout, IExternalAccess exta, boolean realtime, java.lang.Object message, IIntermediateResultListener<E> listener)
Create a new listener.TimeoutIntermediateResultListener(long timeout, IExternalAccess exta, IIntermediateResultListener<E> listener)
Create a new listener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finished()
Declare that the future is finished.void
finishedIfUndone()
Declare that the future is finished.protected IIntermediateResultListener<E>
getIntermediateResultListener()
void
intermediateResultAvailable(E result)
Called when an intermediate result is available.void
intermediateResultAvailableIfUndone(E result)
Called when an intermediate result is available.boolean
isUndone()
Get the undone.void
maxResultCountAvailable(int max)
Declare that the future result count is available.-
Methods inherited from class jadex.bridge.TimeoutResultListener
cancel, commandAvailable, createTimerTask, exceptionOccurred, exceptionOccurredIfUndone, initTimer, resultAvailable, resultAvailableIfUndone, timeoutOccurred
-
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.IFunctionalExceptionListener
exceptionOccurred
-
Methods inherited from interface jadex.commons.future.IFunctionalResultListener
resultAvailable
-
Methods inherited from interface jadex.commons.future.IUndoneResultListener
exceptionOccurredIfUndone, resultAvailableIfUndone
-
-
-
-
Constructor Detail
-
TimeoutIntermediateResultListener
public TimeoutIntermediateResultListener(long timeout, IExternalAccess exta)
Create a new listener.
-
TimeoutIntermediateResultListener
public TimeoutIntermediateResultListener(long timeout, IExternalAccess exta, IIntermediateResultListener<E> listener)
Create a new listener.
-
TimeoutIntermediateResultListener
public TimeoutIntermediateResultListener(long timeout, IExternalAccess exta, boolean realtime, java.lang.Object message, IIntermediateResultListener<E> listener)
Create a new listener.
-
-
Method Detail
-
getIntermediateResultListener
protected IIntermediateResultListener<E> getIntermediateResultListener()
-
intermediateResultAvailable
public void intermediateResultAvailable(E result)
Called when an intermediate result is available.- Specified by:
intermediateResultAvailable
in interfaceIFunctionalIntermediateResultListener<E>
- 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 interfaceIFunctionalIntermediateFinishedListener<E>
- 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 interfaceIFunctionalIntermediateResultCountListener
- Specified by:
maxResultCountAvailable
in interfaceIIntermediateResultListener<E>
-
intermediateResultAvailableIfUndone
public void intermediateResultAvailableIfUndone(E result)
Called when an intermediate result is available.- Specified by:
intermediateResultAvailableIfUndone
in interfaceIUndoneIntermediateResultListener<E>
- Parameters:
result
- The result.
-
finishedIfUndone
public void finishedIfUndone()
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:
finishedIfUndone
in interfaceIUndoneIntermediateResultListener<E>
-
isUndone
public boolean isUndone()
Get the undone.- Returns:
- The undone.
-
-