Class SystemBootstrapConfiguration
java.lang.Object
com.github.cafapi.common.bootstrapconfigs.system.SystemBootstrapConfiguration
- All Implemented Interfaces:
BootstrapConfiguration
Provides bootstrap configuration from Java system properties and environment variables. Note that system properties will always
override if present.
-
Field Summary
FieldsFields inherited from interface com.github.cafapi.common.api.BootstrapConfiguration
CONFIG_APP_NAME, OLD_CONFIG_APP_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConfiguration
(String key) Return the value of the requested configuration parameter.boolean
Return the boolean representation of the requested configuration parameter.int
Return the integer representation of the requested configuration parameter.int
getConfigurationInteger
(String key, int min, int max) Return the integer representation of the requested configuration parameter, between the minimum and maximum integers specified.boolean
Determine if a configuration parameter has been set or not.
-
Field Details
-
ENV_MARATHON_APP_ID
- See Also:
-
-
Constructor Details
-
SystemBootstrapConfiguration
public SystemBootstrapConfiguration()
-
-
Method Details
-
isConfigurationPresent
Description copied from interface:BootstrapConfiguration
Determine if a configuration parameter has been set or not.- Specified by:
isConfigurationPresent
in interfaceBootstrapConfiguration
- Parameters:
key
- the config parameter to check- Returns:
- whether the config parameter is set or not
-
getConfiguration
Description copied from interface:BootstrapConfiguration
Return the value of the requested configuration parameter.- Specified by:
getConfiguration
in interfaceBootstrapConfiguration
- Parameters:
key
- the config parameter to lookup- Returns:
- the value of the config parameter
- Throws:
ConfigurationException
- if the configuration parameter is not set
-
getConfigurationInteger
Description copied from interface:BootstrapConfiguration
Return the integer representation of the requested configuration parameter.- Specified by:
getConfigurationInteger
in interfaceBootstrapConfiguration
- Parameters:
key
- the config parameter to lookup- Returns:
- the value of the config parameter as an integer
- Throws:
ConfigurationException
- if the configuration parameter is not set
-
getConfigurationInteger
Description copied from interface:BootstrapConfiguration
Return the integer representation of the requested configuration parameter, between the minimum and maximum integers specified.- Specified by:
getConfigurationInteger
in interfaceBootstrapConfiguration
- Parameters:
key
- the config parameter to lookupmin
- the lower bound of the integer to be returnedmax
- the upper bound of the integer to be returned- Returns:
- the value of the config parameter as an integer, between the limits specified
- Throws:
ConfigurationException
- if the configuration parameter is not set
-
getConfigurationBoolean
Description copied from interface:BootstrapConfiguration
Return the boolean representation of the requested configuration parameter.- Specified by:
getConfigurationBoolean
in interfaceBootstrapConfiguration
- Parameters:
key
- the config parameter to lookup- Returns:
- the value of the config parameter as an integer
- Throws:
ConfigurationException
- if the configuration parameter is not set
-
getServicePath
- Specified by:
getServicePath
in interfaceBootstrapConfiguration
- Returns:
- an object representing the fully qualified service path of this instance
- Throws:
ConfigurationException
- if the ServicePath cannot be acquired
-