public class EnvConfigSource extends Object implements ConfigSource, Serializable
CONFIG_ORDINAL, DEFAULT_ORDINAL| Modifier and Type | Method and Description |
|---|---|
String |
getName()
The name of the config might be used for logging or analysis of configured values.
|
int |
getOrdinal()
Return the ordinal for this config source.
|
Map<String,String> |
getProperties()
Return the properties in this config source
|
String |
getValue(String name)
Return the value for the specified property in this config source.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPropertyNamespublic Map<String,String> getProperties()
ConfigSourcegetProperties in interface ConfigSourcepublic int getOrdinal()
ConfigSourceSome operating systems allow only alphabetic characters or an underscore(_), in environment variables.
Other characters such as ., /, etc may be disallowed.
In order to set a value for a config property that has a name containing such disallowed characters from an environment variable,
the following rules are used.
This ConfigSource searches for potentially 3 environment variables with a given property name (e.g. "com.ACME.size"):
"com.ACME.size")"com_ACME_size")"COM_ACME_SIZE")The first environment variable that is found is returned by this ConfigSource.
getOrdinal in interface ConfigSourcepublic String getValue(String name)
ConfigSourcegetValue in interface ConfigSourcename - the property namepublic String getName()
ConfigSourcegetName in interface ConfigSourceCopyright © 2019 JBoss by Red Hat. All rights reserved.