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 SummaryFields 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 SummaryConstructors Constructor Description SequentialMultiplexDistributor()
 - 
Method SummaryAll 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.SimpleMultiplexDistributorperformCall
 
- 
 
- 
- 
- 
Method Detail- 
initpublic 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 interface- IMultiplexDistributor
- Overrides:
- initin class- SimpleMultiplexDistributor
 
 - 
addServicepublic void addService(IService service) Add a new service.- Specified by:
- addServicein interface- IMultiplexDistributor
- Overrides:
- addServicein class- SimpleMultiplexDistributor
- Parameters:
- service- The service.
 
 - 
serviceSearchFinishedpublic void serviceSearchFinished() Notify that the search has finished.- Specified by:
- serviceSearchFinishedin interface- IMultiplexDistributor
- Overrides:
- serviceSearchFinishedin class- SimpleMultiplexDistributor
 
 - 
getArgumentIteratorprotected java.util.Iterator<java.lang.Object[]> getArgumentIterator() Get the argument iterator.
 - 
getArgumentspublic java.lang.Object[] getArguments() Get the arguments for a call.- Overrides:
- getArgumentsin class- SimpleMultiplexDistributor
- Returns:
- The arguments.
 
 - 
hasArgumentspublic boolean hasArguments() Test if has arguments.- Returns:
- True if has args.
 
 - 
getFreeServiceprotected IFuture<IService> getFreeService(IService service) Get the service for a call.- Returns:
- The service.
 
 - 
freeServiceprotected void freeService(IService service) 
 - 
checkPerformCallpublic void checkPerformCall(IService service) Check perform call.- Overrides:
- checkPerformCallin class- SimpleMultiplexDistributor
 
 
- 
 
-