Interface SystemSetting
- All Known Implementing Classes:
- EnvironmentTokenSystemSettings,- EnvironmentTokenSystemSettings,- JavaSystemSetting,- ProfileFileSystemSetting,- ProxyEnvironmentSetting,- ProxySystemSetting,- S3SystemSetting,- SdkSystemSetting,- TracingSystemSetting
An interface implemented by enums in other packages in order to define the system settings the want loaded. An enum
 is expected to implement this interface, and then have values loaded from the 
System using methods like
 getStringValue().- 
Method SummaryModifier and TypeMethodDescriptionThe default value of the setting (or empty if there is no default).The environment variable of the setting (or null if there is no environment variable for this setting).Attempt to load a system setting fromSystem.getProperty(String)andSystem.getenv(String).default BooleanLoad the requested system setting as per the documentation ingetBooleanValue(), throwing an exception if the value was not set and had no default.Attempt to load a system setting fromSystem.getProperty(String)andSystem.getenv(String).default IntegerLoad the requested system setting as per the documentation ingetIntegerValue(), throwing an exception if the value was not set and had no default.Attempt to load a system setting fromSystem.getProperty(String)andSystem.getenv(String).Attempt to load a system setting fromSystem.getProperty(String)andSystem.getenv(String).Attempt to load a system setting fromSystem.getenv(String).default StringLoad the requested system setting as per the documentation ingetStringValue(), throwing an exception if the value was not set and had no default.property()The system property of the setting (or null if there is no property for this setting).
- 
Method Details- 
propertyString property()The system property of the setting (or null if there is no property for this setting).
- 
environmentVariableString environmentVariable()The environment variable of the setting (or null if there is no environment variable for this setting).
- 
defaultValueString defaultValue()The default value of the setting (or empty if there is no default). This value will be applied if the customer did not specify a setting.
- 
getStringValueAttempt to load a system setting fromSystem.getProperty(String)andSystem.getenv(String). This should be used in favor of those methods because the SDK should support both methods of configuration.System.getProperty(String)takes precedent overSystem.getenv(String)if both are specified.- Returns:
- The requested setting, or Optional.empty()if the values were not set, or the security manager did not allow reading the setting.
 
- 
getStringValueFromEnvironmentVariableAttempt to load a system setting fromSystem.getenv(String). This should NOT BE USED, so checkstyle will complain about using it. The only reason this is made available is for when we ABSOLUTELY CANNOT support a system property for a specific setting. That should be the exception, NOT the rule. We should almost always provide a system property alternative for all environment variables.- Returns:
- The requested setting, or Optional.empty()if the values were not set, or the security manager did not allow reading the setting.
 
- 
getNonDefaultStringValueAttempt to load a system setting fromSystem.getProperty(String)andSystem.getenv(String). This should be used in favor of those methods because the SDK should support both methods of configuration.System.getProperty(String)takes precedent overSystem.getenv(String)if both are specified.Similar to getStringValue(), but does not fall back to the default value.- Returns:
- The requested setting, or Optional.empty()if the values were not set, or the security manager did not allow reading the setting.
 
- 
getStringValueOrThrowLoad the requested system setting as per the documentation ingetStringValue(), throwing an exception if the value was not set and had no default.- Returns:
- The requested setting.
 
- 
getIntegerValueAttempt to load a system setting fromSystem.getProperty(String)andSystem.getenv(String). This should be used in favor of those methods because the SDK should support both methods of configuration. The result will be converted to an integer.System.getProperty(String)takes precedent overSystem.getenv(String)if both are specified.- Returns:
- The requested setting, or Optional.empty()if the values were not set, or the security manager did not allow reading the setting.
 
- 
getIntegerValueOrThrowLoad the requested system setting as per the documentation ingetIntegerValue(), throwing an exception if the value was not set and had no default.- Returns:
- The requested setting.
 
- 
getBooleanValueAttempt to load a system setting fromSystem.getProperty(String)andSystem.getenv(String). This should be used in favor of those methods because the SDK should support both methods of configuration. The result will be converted to a boolean.System.getProperty(String)takes precedent overSystem.getenv(String)if both are specified.- Returns:
- The requested setting, or Optional.empty()if the values were not set, or the security manager did not allow reading the setting.
 
- 
getBooleanValueOrThrowLoad the requested system setting as per the documentation ingetBooleanValue(), throwing an exception if the value was not set and had no default.- Returns:
- The requested setting.
 
 
-