Class SequentialMultiplexDistributor
- java.lang.Object
 - 
- jadex.bridge.service.component.multiinvoke.SimpleMultiplexDistributor
 - 
- jadex.bridge.service.component.multiinvoke.SequentialMultiplexDistributor
 
 
 
- 
- All Implemented Interfaces:
 IMultiplexDistributor
public class SequentialMultiplexDistributor extends SimpleMultiplexDistributor
Sequential call distributor. It determines: - which services are called: services are called as long as arguments are available - with which arguments: each argument array once - when finished: after all arguments have been used 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected java.util.List<IService>busyservicesThe list of busy services.protected java.util.List<IService>freeservicesThe list of free services.protected java.util.Iterator<java.lang.Object[]>itargsThe arguments.protected java.util.List<Future<IService>>waitingcallsThe waiting for service calls. 
- 
Constructor Summary
Constructors Constructor Description SequentialMultiplexDistributor() 
- 
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.protected voidfreeService(IService service)protected java.util.Iterator<java.lang.Object[]>getArgumentIterator()Get the argument iterator.java.lang.Object[]getArguments()Get the arguments for a call.protected IFuture<IService>getFreeService(IService service)Get the service for a call.booleanhasArguments()Test if has arguments.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.voidserviceSearchFinished()Notify that the search has finished.- 
Methods inherited from class jadex.bridge.service.component.multiinvoke.SimpleMultiplexDistributor
performCall 
 - 
 
 - 
 
- 
- 
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- Overrides:
 initin classSimpleMultiplexDistributor
 
- 
addService
public void addService(IService service)
Add a new service.- Specified by:
 addServicein interfaceIMultiplexDistributor- Overrides:
 addServicein classSimpleMultiplexDistributor- Parameters:
 service- The service.
 
- 
serviceSearchFinished
public void serviceSearchFinished()
Notify that the search has finished.- Specified by:
 serviceSearchFinishedin interfaceIMultiplexDistributor- Overrides:
 serviceSearchFinishedin classSimpleMultiplexDistributor
 
- 
getArgumentIterator
protected java.util.Iterator<java.lang.Object[]> getArgumentIterator()
Get the argument iterator. 
- 
getArguments
public java.lang.Object[] getArguments()
Get the arguments for a call.- Overrides:
 getArgumentsin classSimpleMultiplexDistributor- Returns:
 - The arguments.
 
 
- 
hasArguments
public boolean hasArguments()
Test if has arguments.- Returns:
 - True if has args.
 
 
- 
getFreeService
protected IFuture<IService> getFreeService(IService service)
Get the service for a call.- Returns:
 - The service.
 
 
- 
freeService
protected void freeService(IService service)
 
- 
checkPerformCall
public void checkPerformCall(IService service)
Check perform call.- Overrides:
 checkPerformCallin classSimpleMultiplexDistributor
 
 - 
 
 -