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, wait
getPropertyNames
public Map<String,String> getProperties()
ConfigSource
getProperties
in interface ConfigSource
public int getOrdinal()
ConfigSource
Some 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 ConfigSource
public String getValue(String name)
ConfigSource
getValue
in interface ConfigSource
name
- the property namepublic String getName()
ConfigSource
getName
in interface ConfigSource
Copyright © 2019 JBoss by Red Hat. All rights reserved.