|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.config.ConfigurationManager
public class ConfigurationManager
The configuration manager is a central place where it manages the system wide Configuration and deployment context.
During initialization, this class will check system property "archaius.default.configuration.class" and "archaius.default.configuration.factory". If the former is set, it will use the class name to instantiate it using its default no-arg constructor. If the later is set, it will call its static method getInstance(). In both cases, the returned Configuration object will be set as the system wide configuration.
| Constructor Summary | |
|---|---|
ConfigurationManager()
|
|
| Method Summary | |
|---|---|
static org.apache.commons.configuration.AbstractConfiguration |
getConfigInstance()
Get the current system wide configuration. |
static DeploymentContext |
getDeploymentContext()
|
static void |
install(org.apache.commons.configuration.AbstractConfiguration config)
Install the system wide configuration with the ConfigurationManager. |
static boolean |
isConfigurationInstalled()
|
static void |
loadCascadedPropertiesFromResources(java.lang.String configName)
Load resource configName.properties first. |
static void |
loadProperties(java.util.Properties properties)
Load the specified properties into system wide configuration |
static void |
loadPropertiesFromConfiguration(org.apache.commons.configuration.AbstractConfiguration config)
Load properties from the specified configuration into system wide configuration |
static void |
loadPropertiesFromResources(java.lang.String path)
Load properties from resource file into the system wide configuration |
static void |
setDeploymentContext(DeploymentContext context)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigurationManager()
| Method Detail |
|---|
public static void install(org.apache.commons.configuration.AbstractConfiguration config)
throws java.lang.IllegalStateException
DynamicPropertyFactory by calling DynamicPropertyFactory.initWithConfigurationSource(AbstractConfiguration).
This call can be made only once, otherwise IllegalStateException will be thrown.
java.lang.IllegalStateExceptionpublic static boolean isConfigurationInstalled()
public static org.apache.commons.configuration.AbstractConfiguration getConfigInstance()
ConcurrentCompositeConfiguration which contains a SystemConfiguration from Apache Commons
Configuration and a DynamicURLConfiguration.
public static void loadPropertiesFromResources(java.lang.String path)
throws java.io.IOException
path - path of the resource
java.io.IOException
public static void loadCascadedPropertiesFromResources(java.lang.String configName)
throws java.io.IOException
configName - prefix of the properties file name.
java.io.IOExceptionDeploymentContext.getDeploymentEnvironment()public static void loadPropertiesFromConfiguration(org.apache.commons.configuration.AbstractConfiguration config)
public static void loadProperties(java.util.Properties properties)
public static void setDeploymentContext(DeploymentContext context)
public static DeploymentContext getDeploymentContext()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||