Package jadex.bridge
Class IntermediateComponentResultListener<E>
- java.lang.Object
-
- jadex.bridge.ComponentResultListener<java.util.Collection<E>>
-
- jadex.bridge.IntermediateComponentResultListener<E>
-
- All Implemented Interfaces:
IFutureCommandResultListener<java.util.Collection<E>>
,IIntermediateResultListener<E>
,IResultListener<java.util.Collection<E>>
,IUndoneIntermediateResultListener<E>
,IUndoneResultListener<java.util.Collection<E>>
public class IntermediateComponentResultListener<E> extends ComponentResultListener<java.util.Collection<E>> implements IIntermediateResultListener<E>, IUndoneIntermediateResultListener<E>
Intermediate listener that invokes listeners on component thread.
-
-
Field Summary
-
Fields inherited from class jadex.bridge.ComponentResultListener
access, component, listener, undone
-
-
Constructor Summary
Constructors Constructor Description IntermediateComponentResultListener(IIntermediateResultListener<E> listener, IInternalAccess component)
Create a new component result 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.void
intermediateResultAvailable(E result)
Called when an intermediate result is available.void
intermediateResultAvailableIfUndone(E result)
Called when an intermediate result is available.void
maxResultCountAvailable(int max)
Declare that the future result count is available.-
Methods inherited from class jadex.bridge.ComponentResultListener
commandAvailable, exceptionOccurred, exceptionOccurredIfUndone, resultAvailable, resultAvailableIfUndone, scheduleForward, scheduleForward
-
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, resultAvailable
-
Methods inherited from interface jadex.commons.future.IUndoneResultListener
exceptionOccurredIfUndone, resultAvailableIfUndone
-
-
-
-
Constructor Detail
-
IntermediateComponentResultListener
public IntermediateComponentResultListener(IIntermediateResultListener<E> listener, IInternalAccess component)
Create a new component result listener.- Parameters:
listener
- The listener.adapter
- The adapter.
-
-
Method Detail
-
intermediateResultAvailable
public void intermediateResultAvailable(E 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.- Specified by:
finished
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.
-
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 interfaceIIntermediateResultListener<E>
-
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>
-
-