Package org.openstreetmap.josm.io
Enum ProxyPolicy
- java.lang.Object
-
- java.lang.Enum<ProxyPolicy>
-
- org.openstreetmap.josm.io.ProxyPolicy
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ProxyPolicy>
public enum ProxyPolicy extends java.lang.Enum<ProxyPolicy>
The proxy policy is how JOSM will use proxy information.- Since:
- 12805 (extracted from
ProxyPreferencesPanel
)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NO_PROXY
No proxy: JOSM will access Internet resources directlyUSE_HTTP_PROXY
Use HTTP proxy: JOSM will use the given HTTP proxy, configured manuallyUSE_SOCKS_PROXY
Use HTTP proxy: JOSM will use the given SOCKS proxyUSE_SYSTEM_SETTINGS
Use system settings: JOSM will use system proxy settings
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
policyName
-
Constructor Summary
Constructors Modifier Constructor Description private
ProxyPolicy(java.lang.String policyName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProxyPolicy
fromName(java.lang.String policyName)
Retrieves a proxy policy from its name found in preferences.java.lang.String
getName()
Replies the policy name, to be stored in proxy preferences.static ProxyPolicy
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ProxyPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NO_PROXY
public static final ProxyPolicy NO_PROXY
No proxy: JOSM will access Internet resources directly
-
USE_SYSTEM_SETTINGS
public static final ProxyPolicy USE_SYSTEM_SETTINGS
Use system settings: JOSM will use system proxy settings
-
USE_HTTP_PROXY
public static final ProxyPolicy USE_HTTP_PROXY
Use HTTP proxy: JOSM will use the given HTTP proxy, configured manually
-
USE_SOCKS_PROXY
public static final ProxyPolicy USE_SOCKS_PROXY
Use HTTP proxy: JOSM will use the given SOCKS proxy
-
-
Field Detail
-
policyName
private final java.lang.String policyName
-
-
Constructor Detail
-
ProxyPolicy
private ProxyPolicy(java.lang.String policyName)
-
-
Method Detail
-
values
public static ProxyPolicy[] 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 (ProxyPolicy c : ProxyPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ProxyPolicy valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getName
public java.lang.String getName()
Replies the policy name, to be stored in proxy preferences.- Returns:
- the policy unique name
-
fromName
public static ProxyPolicy fromName(java.lang.String policyName)
Retrieves a proxy policy from its name found in preferences.- Parameters:
policyName
- The policy name- Returns:
- The proxy policy matching the given name, or
null
-
-