Class MultiServiceInvocationHandler.IntermediateMethodResultListener<T>
- java.lang.Object
-
- jadex.bridge.service.component.multiinvoke.MultiServiceInvocationHandler.IntermediateMethodResultListener<T>
-
- All Implemented Interfaces:
IIntermediateResultListener<T>
,IResultListener<java.util.Collection<T>>
- Enclosing class:
- MultiServiceInvocationHandler
public class MultiServiceInvocationHandler.IntermediateMethodResultListener<T> extends java.lang.Object implements IIntermediateResultListener<T>
Listener that invokes service methods and delegates the results.
-
-
Field Summary
Fields Modifier and Type Field Description protected IMultiplexDistributor
muldis
The call distributor.
-
Constructor Summary
Constructors Constructor Description IntermediateMethodResultListener(Future fut, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.reflect.Method muxmethod)
Create a new listener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
exceptionOccurred(java.lang.Exception exception)
Called when an exception has occurred.void
finished()
Called when all services have been found.void
intermediateResultAvailable(T result)
Called when a service has been found.void
maxResultCountAvailable(int max)
Declare that the future result count is available.void
resultAvailable(java.util.Collection<T> result)
Called when services have been found.
-
-
-
Field Detail
-
muldis
protected IMultiplexDistributor muldis
The call distributor.
-
-
Constructor Detail
-
IntermediateMethodResultListener
public IntermediateMethodResultListener(Future fut, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.reflect.Method muxmethod)
Create a new listener.
-
-
Method Detail
-
intermediateResultAvailable
public void intermediateResultAvailable(T result)
Called when a service has been found.- Specified by:
intermediateResultAvailable
in interfaceIIntermediateResultListener<T>
- Parameters:
result
- The result.
-
finished
public void finished()
Called when all services have been found.- Specified by:
finished
in interfaceIIntermediateResultListener<T>
-
resultAvailable
public void resultAvailable(java.util.Collection<T> result)
Called when services have been found.- Specified by:
resultAvailable
in interfaceIResultListener<T>
- Parameters:
result
- The result.
-
exceptionOccurred
public void exceptionOccurred(java.lang.Exception exception)
Called when an exception has occurred.- Specified by:
exceptionOccurred
in interfaceIResultListener<T>
- Parameters:
exception
- The exception.
-
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<T>
-
-