Package software.amazon.awssdk.utils
Enum ProxyEnvironmentSetting
- java.lang.Object
-
- java.lang.Enum<ProxyEnvironmentSetting>
-
- software.amazon.awssdk.utils.ProxyEnvironmentSetting
-
- All Implemented Interfaces:
Serializable
,Comparable<ProxyEnvironmentSetting>
,SystemSetting
public enum ProxyEnvironmentSetting extends Enum<ProxyEnvironmentSetting> implements SystemSetting
An enumeration representing environment settings related to proxy configuration. Instances of this enum are used to define and access proxy configuration settings obtained from environment variables.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HTTP_PROXY
HTTPS_PROXY
NO_PROXY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
defaultValue()
The default value of the setting (or empty if there is no default).String
environmentVariable()
The environment variable of the setting (or null if there is no environment variable for this setting).Optional<String>
getStringValue()
Attempt to load a system setting fromSystem.getProperty(String)
andSystem.getenv(String)
.String
property()
The system property of the setting (or null if there is no property for this setting).static ProxyEnvironmentSetting
valueOf(String name)
Returns the enum constant of this type with the specified name.static ProxyEnvironmentSetting[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface software.amazon.awssdk.utils.SystemSetting
getBooleanValue, getBooleanValueOrThrow, getIntegerValue, getIntegerValueOrThrow, getNonDefaultStringValue, getStringValueOrThrow
-
-
-
-
Enum Constant Detail
-
HTTP_PROXY
public static final ProxyEnvironmentSetting HTTP_PROXY
-
HTTPS_PROXY
public static final ProxyEnvironmentSetting HTTPS_PROXY
-
NO_PROXY
public static final ProxyEnvironmentSetting NO_PROXY
-
-
Method Detail
-
values
public static ProxyEnvironmentSetting[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ProxyEnvironmentSetting c : ProxyEnvironmentSetting.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ProxyEnvironmentSetting valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getStringValue
public Optional<String> getStringValue()
Description copied from interface:SystemSetting
Attempt 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.- Specified by:
getStringValue
in interfaceSystemSetting
- Returns:
- The requested setting, or
Optional.empty()
if the values were not set, or the security manager did not allow reading the setting.
-
property
public String property()
Description copied from interface:SystemSetting
The system property of the setting (or null if there is no property for this setting).- Specified by:
property
in interfaceSystemSetting
-
environmentVariable
public String environmentVariable()
Description copied from interface:SystemSetting
The environment variable of the setting (or null if there is no environment variable for this setting).- Specified by:
environmentVariable
in interfaceSystemSetting
-
defaultValue
public String defaultValue()
Description copied from interface:SystemSetting
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.- Specified by:
defaultValue
in interfaceSystemSetting
-
-