public abstract class AbstractProviderManager extends Object implements ProviderManager_WithGetFactories
ProviderManager
implementation which stores the registered
ProviderFactory
objects into a Map
, using the name as the
key.Constructor and Description |
---|
AbstractProviderManager() |
Modifier and Type | Method and Description |
---|---|
void |
addProviderFactory(ProviderFactory providerFactory)
Adds a new
ProviderFactory to the registry. |
Provider |
createProvider(DynObject serviceParameters,
ProviderServices providerServices)
Creates a new
Provider . |
DynObject |
createServiceParameters(String serviceName)
Creates the parameters for the
Provider created by the factory
with the given name. |
List |
getProviderFactories() |
ProviderFactory |
getProviderFactory(String serviceName) |
protected abstract String |
getRegistryDescription() |
protected abstract String |
getRegistryKey() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createProviderServices
public void addProviderFactory(ProviderFactory providerFactory)
ProviderManager
ProviderFactory
to the registry.addProviderFactory
in interface ProviderManager
providerFactory
- to addprotected abstract String getRegistryKey()
protected abstract String getRegistryDescription()
public Provider createProvider(DynObject serviceParameters, ProviderServices providerServices) throws ServiceException
ProviderManager
Provider
.createProvider
in interface ProviderManager
serviceParameters
- for the Provider
providerServices
- to be used by the Provider
Provider
ServiceException
- if the parameters are not valid or there is an error creating
the Provider
public DynObject createServiceParameters(String serviceName) throws ServiceException
ProviderManager
Provider
created by the factory
with the given name.createServiceParameters
in interface ProviderManager
serviceName
- name of the factory to create the Provider
ServiceException
public ProviderFactory getProviderFactory(String serviceName) throws ParametersException, NotRegisteredException
getProviderFactory
in interface ProviderManager_WithGetFactories
ParametersException
NotRegisteredException
public List getProviderFactories()
getProviderFactories
in interface ProviderManager_WithGetFactories