public class SmallRyeConfigProviderResolver extends ConfigProviderResolver
Modifier and Type | Field and Description |
---|---|
static SmallRyeConfigProviderResolver |
INSTANCE |
Constructor and Description |
---|
SmallRyeConfigProviderResolver() |
Modifier and Type | Method and Description |
---|---|
ConfigBuilder |
getBuilder()
Create a fresh
ConfigBuilder instance. |
Config |
getConfig() |
Config |
getConfig(ClassLoader classLoader) |
void |
registerConfig(Config config,
ClassLoader classLoader)
Register a given
Config within the Application (or Module) identified by the given ClassLoader. |
void |
releaseConfig(Config config)
A
Config normally gets released if the Application it is associated with gets destroyed. |
instance, setInstance
public static final SmallRyeConfigProviderResolver INSTANCE
public Config getConfig()
getConfig
in class ConfigProviderResolver
ConfigProvider.getConfig()
public Config getConfig(ClassLoader classLoader)
getConfig
in class ConfigProviderResolver
classLoader
- the classloaderConfigProvider.getConfig(ClassLoader)
public ConfigBuilder getBuilder()
ConfigProviderResolver
ConfigBuilder
instance.
This ConfigBuilder will initially contain no ConfigSource
. The other ConfigSource
will have
to be added manually or discovered by calling ConfigBuilder.addDiscoveredSources()
.
This ConfigBuilder will initially contain default Converters
. Any other converters will need to
be added manually.
The ConfigProvider will not manage the Config instance internallygetBuilder
in class ConfigProviderResolver
public void registerConfig(Config config, ClassLoader classLoader)
ConfigProviderResolver
Config
within the Application (or Module) identified by the given ClassLoader.
If the ClassLoader is null
then the current Application will be used.registerConfig
in class ConfigProviderResolver
config
- which should get registeredclassLoader
- which identifies the Application or Module the given Config should get associated with.public void releaseConfig(Config config)
ConfigProviderResolver
Config
normally gets released if the Application it is associated with gets destroyed.
Invoke this method if you like to destroy the Config prematurely.
If the given Config is associated within an Application then it will be unregistered.releaseConfig
in class ConfigProviderResolver
config
- the config to be releasedCopyright © 2020 JBoss by Red Hat. All rights reserved.