public enum ProxyEnvironmentSetting extends Enum<ProxyEnvironmentSetting> implements SystemSetting
| Enum Constant and Description |
|---|
HTTP_PROXY |
HTTPS_PROXY |
NO_PROXY |
| Modifier and Type | Method and 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 from
System.getProperty(String) and System.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.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetBooleanValue, getBooleanValueOrThrow, getIntegerValue, getIntegerValueOrThrow, getNonDefaultStringValue, getStringValueFromEnvironmentVariable, getStringValueOrThrowpublic static final ProxyEnvironmentSetting HTTP_PROXY
public static final ProxyEnvironmentSetting HTTPS_PROXY
public static final ProxyEnvironmentSetting NO_PROXY
public static ProxyEnvironmentSetting[] values()
for (ProxyEnvironmentSetting c : ProxyEnvironmentSetting.values()) System.out.println(c);
public static ProxyEnvironmentSetting valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic Optional<String> getStringValue()
SystemSettingSystem.getProperty(String) and System.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 over System.getenv(String) if both are specified.getStringValue in interface SystemSettingOptional.empty() if the values were not set, or the security manager did not
allow reading the setting.public String property()
SystemSettingproperty in interface SystemSettingpublic String environmentVariable()
SystemSettingenvironmentVariable in interface SystemSettingpublic String defaultValue()
SystemSettingdefaultValue in interface SystemSettingCopyright © 2023. All rights reserved.