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 SummaryFields 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 SummaryConstructors Constructor Description SimpleMultiplexDistributor()
 - 
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.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- 
methodprotected java.lang.reflect.Method method The method.
 - 
argsprotected java.lang.Object[] args The arguments.
 - 
resultsprotected IntermediateFuture<java.lang.Object> results The results.
 - 
convprotected IParameterConverter conv The parameter converter.
 
- 
 - 
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
 
 - 
addServicepublic void addService(IService service) Add a new service.- Specified by:
- addServicein interface- IMultiplexDistributor
- Parameters:
- service- The service.
 
 - 
serviceSearchFinishedpublic void serviceSearchFinished() Notify that the search has finished.- Specified by:
- serviceSearchFinishedin interface- IMultiplexDistributor
 
 - 
getArgumentspublic java.lang.Object[] getArguments() Get the arguments for a call.- Returns:
- The arguments.
 
 - 
checkPerformCallpublic void checkPerformCall(IService service) Check perform call.
 - 
performCallpublic 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
 
 
- 
 
-