public interface ConfigurationProviderSpi
Configuration
instances in a system. In SE this may be a true singleton containing exact one Configuration
instance, whereas in Java EE and other more complex environments instances may be returned depending the current
runtime context.| Modifier and Type | Method | Description |
|---|---|---|
Configuration |
createConfiguration(ConfigurationContext context) |
Create a
Configuration instance using the given context. |
default Configuration |
getConfiguration() |
Deprecated.
Use
getConfiguration(ClassLoader) instead of. |
Configuration |
getConfiguration(ClassLoader classLoader) |
Access the current
Configuration. |
ConfigurationBuilder |
getConfigurationBuilder() |
Creates a new
ConfigurationBuilder instance. |
default boolean |
isConfigurationSettable(ClassLoader classloader) |
Method that allows to determine if a new
Configuration can be applied
programmatically. |
Configuration |
releaseConfiguration(ClassLoader classloader) |
This method allows to release a
Configuration for a classloader. |
void |
setConfiguration(Configuration config,
ClassLoader classloader) |
This method allows to replace the current
Configuration with a new
instance. |
Configuration getConfiguration(ClassLoader classLoader)
Configuration.classLoader - the classloader to be used.Configuration instance, never null.@Deprecated default Configuration getConfiguration()
getConfiguration(ClassLoader) instead of.Configuration.Configuration instance, never null.Configuration createConfiguration(ConfigurationContext context)
Configuration instance using the given context. The configuration
created hereby must respect the artifacts provided by its context (property sources,
filters, converters, policies etc), including their ordering and significance.context - the context to be used, not null.ConfigurationBuilder getConfigurationBuilder()
ConfigurationBuilder instance.ConfigurationBuilder, never null.void setConfiguration(Configuration config, ClassLoader classloader)
Configuration with a new
instance. This can be used to update the configuration with a new one, e.g. because some of the
data has changed and must be updated. It is the responsibility of the ConfigurationProvider to trigger
corresponding update events for the current Configuration.config - the new Configuration to be applied.classloader - the classloader to be used.UnsupportedOperationException - if the current provider is read-only.Configuration releaseConfiguration(ClassLoader classloader)
Configuration for a classloader.
This can be used to refresh the configuration with a new one, e.g. because some of the
data has changed and must be updated.classloader - the classloader to be used.null.UnsupportedOperationException - if the current provider is read-only.default boolean isConfigurationSettable(ClassLoader classloader)
Configuration can be applied
programmatically.classloader - the target classloadersetConfiguration(org.apache.tamaya.Configuration, ClassLoader) is supported
by the current implementation.setConfiguration(org.apache.tamaya.Configuration, ClassLoader classloader)Copyright © 2014–2019 Apache Software Foundation. All rights reserved.