public class XmlParsingConfigurationRegistry extends Object implements ConfigurationRegistry
ConfigurationRegistry
that obtains its initial set of configurations
by parsing an XML document.Constructor and Description |
---|
XmlParsingConfigurationRegistry(String configResource) |
Modifier and Type | Method and Description |
---|---|
String |
getConfigResource() |
Configuration |
getConfiguration(String configName)
Gets a
clone of the Configuration
registered under the given name. |
Set<String> |
getConfigurationNames()
Gets the names of all registered configurations.
|
void |
registerConfiguration(String configName,
Configuration config)
Register the given configuration under the given name.
|
void |
start() |
void |
stop() |
void |
unregisterConfiguration(String configName)
Unregisters the named configuration.
|
public XmlParsingConfigurationRegistry(String configResource)
public void stop()
public String getConfigResource()
public Set<String> getConfigurationNames()
ConfigurationRegistry
getConfigurationNames
in interface ConfigurationRegistry
public void registerConfiguration(String configName, Configuration config) throws CloneNotSupportedException
ConfigurationRegistry
registerConfiguration
in interface ConfigurationRegistry
configName
- the name of the configurationconfig
- the configurationCloneNotSupportedException
public void unregisterConfiguration(String configName)
ConfigurationRegistry
unregisterConfiguration
in interface ConfigurationRegistry
configName
- the name of the configurationpublic Configuration getConfiguration(String configName)
ConfigurationRegistry
clone
of the Configuration
registered under the given name.
The returned object is a clone of the internally held configuration,
so any changes made to it by the caller will not affect the internal
state of this registry.getConfiguration
in interface ConfigurationRegistry
configName
- the name of the configurationConfiguration
. Will not be null
.Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.