Class SimpleMultiplexDistributor
- java.lang.Object
 - 
- jadex.bridge.service.component.multiinvoke.SimpleMultiplexDistributor
 
 
- 
- All Implemented Interfaces:
 IMultiplexDistributor
- Direct Known Subclasses:
 SequentialMultiplexDistributor
public class SimpleMultiplexDistributor extends java.lang.Object implements IMultiplexDistributor
Simple multiplex call distributor. It determines: - which services are called: all services found one time - with which arguments: all with the same single argument set - when finished: after each service has been called once 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object[]argsThe arguments.protected IParameterConverterconvThe parameter converter.protected IFilter<Tuple2<IService,java.lang.Object[]>>filterThe service filter.protected java.lang.reflect.MethodmethodThe method.protected IntermediateFuture<java.lang.Object>resultsThe results. 
- 
Constructor Summary
Constructors Constructor Description SimpleMultiplexDistributor() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddService(IService service)Add a new service.voidcheckPerformCall(IService service)Check perform call.java.lang.Object[]getArguments()Get the arguments for a call.IIntermediateFuture<java.lang.Object>init(java.lang.reflect.Method method, java.lang.Object[] args, IFilter<Tuple2<IService,java.lang.Object[]>> filter, IParameterConverter conv)Start the distributor.java.lang.ObjectperformCall(IService service, java.lang.Object[] args)Perform a call on given service with given arguments.voidserviceSearchFinished()Notify that the search has finished. 
 - 
 
- 
- 
Field Detail
- 
method
protected java.lang.reflect.Method method
The method. 
- 
args
protected java.lang.Object[] args
The arguments. 
- 
results
protected IntermediateFuture<java.lang.Object> results
The results. 
- 
conv
protected IParameterConverter conv
The parameter converter. 
 - 
 
- 
Method Detail
- 
init
public IIntermediateFuture<java.lang.Object> init(java.lang.reflect.Method method, java.lang.Object[] args, IFilter<Tuple2<IService,java.lang.Object[]>> filter, IParameterConverter conv)
Start the distributor.- Specified by:
 initin interfaceIMultiplexDistributor
 
- 
addService
public void addService(IService service)
Add a new service.- Specified by:
 addServicein interfaceIMultiplexDistributor- Parameters:
 service- The service.
 
- 
serviceSearchFinished
public void serviceSearchFinished()
Notify that the search has finished.- Specified by:
 serviceSearchFinishedin interfaceIMultiplexDistributor
 
- 
getArguments
public java.lang.Object[] getArguments()
Get the arguments for a call.- Returns:
 - The arguments.
 
 
- 
checkPerformCall
public void checkPerformCall(IService service)
Check perform call. 
- 
performCall
public java.lang.Object performCall(IService service, java.lang.Object[] args) throws java.lang.Exception
Perform a call on given service with given arguments.- Throws:
 java.lang.Exception
 
 - 
 
 -