public abstract class AbstractServiceManager extends 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(String serviceName)
Creates the parameters for the
Service created by the factory
with the given name. |
protected String |
getName() |
protected abstract String |
getRegistryDescription() |
protected abstract String |
getRegistryKey() |
List |
getServiceFactories() |
public void addServiceFactory(ServiceFactory serviceFactory)
ServiceManager
ServiceFactory
to the registry.addServiceFactory
in interface ServiceManager
serviceFactory
- to addprotected String getName()
protected abstract String getRegistryKey()
protected abstract 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(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
public List getServiceFactories()