public class BasicExternalConfigSupplierRegistry extends java.lang.Object implements ExternalConfigSupplierRegistry
ExternalConfigSupplier
instances to be registered, each with a unique name, for future
(deferred) lookup of configuration values.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEMO_SAMPLE_PROVIDER |
static java.lang.String |
DEMO_SAMPLE_PROVIDER_PASSWORD_KEY |
static java.lang.String |
DEMO_SAMPLE_PROVIDER_PASSWORD_VALUE |
Constructor and Description |
---|
BasicExternalConfigSupplierRegistry(ManagementContext mgmt) |
Modifier and Type | Method and Description |
---|---|
void |
addProvider(java.lang.String name,
ExternalConfigSupplier supplier) |
java.lang.String |
getConfig(java.lang.String providerName,
java.lang.String key)
Searches the named
ExternalConfigSupplier for the config value associated with the specified key. |
void |
removeProvider(java.lang.String name) |
public static final java.lang.String DEMO_SAMPLE_PROVIDER
public static final java.lang.String DEMO_SAMPLE_PROVIDER_PASSWORD_KEY
public static final java.lang.String DEMO_SAMPLE_PROVIDER_PASSWORD_VALUE
public BasicExternalConfigSupplierRegistry(ManagementContext mgmt)
public void addProvider(java.lang.String name, ExternalConfigSupplier supplier)
addProvider
in interface ExternalConfigSupplierRegistry
public void removeProvider(java.lang.String name)
removeProvider
in interface ExternalConfigSupplierRegistry
public java.lang.String getConfig(java.lang.String providerName, java.lang.String key)
ExternalConfigSupplierRegistry
ExternalConfigSupplier
for the config value associated with the specified key.
Quietly returns null
if no config exists for the specified key.
Throws IllegalArgumentException
if no ExternalConfigSupplier
exists for the passed name.getConfig
in interface ExternalConfigSupplierRegistry