public abstract class AbstractServiceManager extends java.lang.Object implements ServiceManager
ServiceManager
implementation which stores the registered
ServiceFactory
objects into a Map
, using the name as the key.Constructor and Description |
---|
AbstractServiceManager() |
Modifier and Type | Method and Description |
---|---|
void |
addServiceFactory(ServiceFactory serviceFactory)
Adds a new
ServiceFactory to the registry. |
Service |
createService(DynObject serviceParameters)
Creates a new
Service . |
DynObject |
createServiceParameters(java.lang.String serviceName)
Creates the parameters for the
Service created by the factory
with the given name. |
protected java.lang.String |
getName() |
protected abstract java.lang.String |
getRegistryDescription() |
protected abstract java.lang.String |
getRegistryKey() |
java.util.List |
getServiceFactories() |
protected ServiceFactory |
getServiceFactory(java.lang.String serviceName) |
public void addServiceFactory(ServiceFactory serviceFactory)
ServiceManager
ServiceFactory
to the registry.addServiceFactory
in interface ServiceManager
serviceFactory
- to addprotected java.lang.String getName()
protected abstract java.lang.String getRegistryKey()
protected abstract java.lang.String getRegistryDescription()
public Service createService(DynObject serviceParameters) throws ServiceException
ServiceManager
Service
.createService
in interface ServiceManager
serviceParameters
- for the Service
Service
ServiceException
- if the parameters are not valid or there is an error creating
the Provider
public DynObject createServiceParameters(java.lang.String serviceName) throws ServiceException
ServiceManager
Service
created by the factory
with the given name.createServiceParameters
in interface ServiceManager
serviceName
- name of the factory to create the Service
ServiceException
protected ServiceFactory getServiceFactory(java.lang.String serviceName) throws ParametersException, NotRegisteredException
public java.util.List getServiceFactories()