public final class ConfigurationProvider extends Object
Configuration for the very application.| Modifier and Type | Method and Description |
|---|---|
static Configuration |
createConfiguration(ConfigurationContext context)
Creates a new configuration instance based on the given context.
|
static Configuration |
getConfiguration()
Access the current configuration.
|
static ConfigurationContext |
getConfigurationContext()
Deprecated.
Use
Configuration.getContext() instead of. |
static ConfigurationContextBuilder |
getConfigurationContextBuilder()
Create a new
ConfigurationContextBuilder instance. |
static void |
setConfiguration(Configuration config)
This method allows to replace the current default
Configuration with a new
instance. |
static void |
setConfigurationContext(ConfigurationContext context)
Deprecated.
Use #setConfiguration(Configuration) instead of.
|
public static Configuration getConfiguration()
null.public static Configuration createConfiguration(ConfigurationContext context)
context - the configuration context, not null.null.@Deprecated public static ConfigurationContext getConfigurationContext()
Configuration.getContext() instead of.@Deprecated public static void setConfigurationContext(ConfigurationContext context)
ConfigurationContext with a new
instance. This can be used to update the context with a new one, e.g. because some of the configuration
data has changed and should be updated. It is the responsibility of the ConfigurationProvider to trigger
corresponding update events for the current Configuration, so observing
listeners can do whatever is appropriate to react to any given configuration changes.context - the new ConfigurationContext to be applied.UnsupportedOperationException - if the current provider is read-only and does not support
applying a new ConfigurationContext.public static void setConfiguration(Configuration config)
Configuration with a new
instance. It is the responsibility of the ConfigurationProvider to trigger
corresponding update events for the current Configuration, so observing
listeners can do whatever is appropriate to react to any given configuration change.config - the new Configuration to be applied, not nullUnsupportedOperationException - if the current provider is read-only and
does not support
applying a new Configuration.public static ConfigurationContextBuilder getConfigurationContextBuilder()
ConfigurationContextBuilder instance. This method creates
a new builder instance that is not related to any concrete ConfigurationContext.
You can use setConfigurationContext(org.apache.tamaya.spi.ConfigurationContext) to change the
current configuration context.ConfigurationContextBuilder, never null.setConfigurationContext(org.apache.tamaya.spi.ConfigurationContext),
ConfigurationContextCopyright © 2014–2017 Apache Software Foundation. All rights reserved.