public class ConfigurationManager extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Configuration |
configuration |
protected String |
defaultFrameworkBeanName |
protected static org.apache.logging.log4j.Logger |
LOG |
protected Lock |
providerLock |
| Constructor and Description |
|---|
ConfigurationManager(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addContainerProvider(ContainerProvider provider)
adds a configuration provider to the List of ConfigurationProviders.
|
void |
clearContainerProviders() |
void |
conditionalReload()
Reloads the Configuration files if the configuration files indicate that they need to be reloaded.
|
protected Configuration |
createConfiguration(String beanName) |
void |
destroyConfiguration()
Destroy its managing Configuration instance
|
Configuration |
getConfiguration() |
List<ContainerProvider> |
getContainerProviders()
Get the current list of ConfigurationProviders.
|
void |
reload() |
void |
setConfiguration(Configuration configuration) |
void |
setContainerProviders(List<ContainerProvider> containerProviders)
Set the list of configuration providers
|
protected static final org.apache.logging.log4j.Logger LOG
protected Configuration configuration
protected Lock providerLock
protected String defaultFrameworkBeanName
public ConfigurationManager(String name)
public Configuration getConfiguration()
DefaultConfigurationprotected Configuration createConfiguration(String beanName)
public void setConfiguration(Configuration configuration)
public List<ContainerProvider> getContainerProviders()
Get the current list of ConfigurationProviders. If no custom ConfigurationProviders have been added, this method will return a list containing only the default ConfigurationProvider, XMLConfigurationProvider. If a custom ConfigurationProvider has been added, then the XmlConfigurationProvider must be added by hand.
TODO: The lazy instantiation of XmlConfigurationProvider should be refactored to be elsewhere. The behavior described above seems unintuitive.
ConfigurationProviderpublic void setContainerProviders(List<ContainerProvider> containerProviders)
containerProviders - list of ConfigurationProvider to be setpublic void addContainerProvider(ContainerProvider provider)
provider - the ConfigurationProvider to registerpublic void clearContainerProviders()
public void destroyConfiguration()
public void conditionalReload()
public void reload()
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.