Class ServicePoolAgent
- java.lang.Object
- 
- jadex.platform.service.servicepool.ServicePoolAgent
 
- 
- All Implemented Interfaces:
- IServicePoolService
 
 public class ServicePoolAgent extends java.lang.Object implements IServicePoolService The service pool agent can be used to handle services in a pooled manner. Via its service pool service interface new service types can be registered (and removed). For each registered service the agent will create a proxy service that is found via search. Incoming service invocations are routed towards the concrete handler agents that are either already in the pool or are created up to a creation limit.
- 
- 
Field SummaryFields Modifier and Type Field Description protected IInternalAccessagentThe agent.protected java.util.Map<java.lang.Class<?>,ServiceHandler>servicetypesThe registered service types.
 - 
Constructor SummaryConstructors Constructor Description ServicePoolAgent()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<java.lang.Void>addServiceType(java.lang.Class<?> servicetype, IPoolStrategy strategy, java.lang.String componentmodel)Add a new service type and a strategy.IFuture<java.lang.Void>addServiceType(java.lang.Class<?> servicetype, IPoolStrategy strategy, java.lang.String componentmodel, CreationInfo info, PublishInfo pi)Add a new service type and a strategy.IFuture<java.lang.Void>addServiceType(java.lang.Class<?> servicetype, IPoolStrategy strategy, java.lang.String componentmodel, CreationInfo info, PublishInfo pi, ServiceScope scope)Add a new service type and a strategy.IFuture<java.lang.Void>addServiceType(java.lang.Class<?> servicetype, java.lang.String componentmodel)Add a new service type and a strategy.IFuture<java.lang.Void>addServiceType(java.lang.Class<?> servicetype, java.lang.String componentmodel, CreationInfo info)Add a new service type and a strategy.IFuture<java.lang.Void>agentCreated()Called once after agent creation.protected IPoolStrategygetDefaultStrategy()IFuture<java.lang.Void>removeServiceType(java.lang.Class<?> servicetype)Remove a service type.
 
- 
- 
- 
Field Detail- 
agentprotected IInternalAccess agent The agent.
 - 
servicetypesprotected java.util.Map<java.lang.Class<?>,ServiceHandler> servicetypes The registered service types.
 
- 
 - 
Method Detail- 
agentCreatedpublic IFuture<java.lang.Void> agentCreated() Called once after agent creation.
 - 
addServiceTypepublic IFuture<java.lang.Void> addServiceType(java.lang.Class<?> servicetype, java.lang.String componentmodel) Add a new service type and a strategy.- Specified by:
- addServiceTypein interface- IServicePoolService
- Parameters:
- servicetype- The service type.
- componentmodel- The component model.
 
 - 
addServiceTypepublic IFuture<java.lang.Void> addServiceType(java.lang.Class<?> servicetype, java.lang.String componentmodel, CreationInfo info) Add a new service type and a strategy.- Specified by:
- addServiceTypein interface- IServicePoolService
- Parameters:
- servicetype- The service type.
- componentmodel- The component model.
- info- The creation info.
 
 - 
addServiceTypepublic IFuture<java.lang.Void> addServiceType(java.lang.Class<?> servicetype, IPoolStrategy strategy, java.lang.String componentmodel) Add a new service type and a strategy.- Specified by:
- addServiceTypein interface- IServicePoolService
- Parameters:
- servicetype- The service type.
- strategy- The service pool strategy.
- componentmodel- The component model.
 
 - 
addServiceTypepublic IFuture<java.lang.Void> addServiceType(java.lang.Class<?> servicetype, IPoolStrategy strategy, java.lang.String componentmodel, CreationInfo info, PublishInfo pi) Add a new service type and a strategy.- Parameters:
- servicetype- The service type.
- strategy- The service pool strategy.
 
 - 
addServiceTypepublic IFuture<java.lang.Void> addServiceType(java.lang.Class<?> servicetype, IPoolStrategy strategy, java.lang.String componentmodel, CreationInfo info, PublishInfo pi, ServiceScope scope) Add a new service type and a strategy.- Specified by:
- addServiceTypein interface- IServicePoolService
- Parameters:
- servicetype- The service type.
- strategy- The service pool strategy.
- componentmodel- The component model.
- info- The worker creation info.
- pi- The worker publish info.
- scope- The service publication scope.
 
 - 
removeServiceTypepublic IFuture<java.lang.Void> removeServiceType(java.lang.Class<?> servicetype) Remove a service type.- Specified by:
- removeServiceTypein interface- IServicePoolService
- Parameters:
- servicetype- The service type.
 
 - 
getDefaultStrategyprotected IPoolStrategy getDefaultStrategy() 
 
- 
 
-