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.booleanReturn the boolean representation of the requested configuration parameter.intReturn the integer representation of the requested configuration parameter.intgetConfigurationInteger(String key, int min, int max) Return the integer representation of the requested configuration parameter, between the minimum and maximum integers specified.booleanDetermine 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:BootstrapConfigurationDetermine if a configuration parameter has been set or not.- Specified by:
isConfigurationPresentin interfaceBootstrapConfiguration- Parameters:
key- the config parameter to check- Returns:
- whether the config parameter is set or not
-
getConfiguration
Description copied from interface:BootstrapConfigurationReturn the value of the requested configuration parameter.- Specified by:
getConfigurationin 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:BootstrapConfigurationReturn the integer representation of the requested configuration parameter.- Specified by:
getConfigurationIntegerin 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:BootstrapConfigurationReturn the integer representation of the requested configuration parameter, between the minimum and maximum integers specified.- Specified by:
getConfigurationIntegerin 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:BootstrapConfigurationReturn the boolean representation of the requested configuration parameter.- Specified by:
getConfigurationBooleanin 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:
getServicePathin interfaceBootstrapConfiguration- Returns:
- an object representing the fully qualified service path of this instance
- Throws:
ConfigurationException- if the ServicePath cannot be acquired
-