Class HttpProxyConfiguration
- java.lang.Object
-
- com.atlassian.confluence.util.http.HttpProxyConfiguration
-
@Deprecated(forRemoval=true) public class HttpProxyConfiguration extends Object
Deprecated, for removal: This API element is subject to removal in a future version.since 7.0.1 will be removed in 9.0Proxy configuration for outbound HTTP connections, determined from a set of standard properties.This class itself is independent of HttpClient. See
HttpClientProxyConfiguration
for how to apply this configuration to an HttpClient instance.- Since:
- 4.1
- See Also:
fromSystemProperties()
,fromProperties(Properties)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpProxyConfiguration.ProxyAuthentication
Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Summary
Fields Modifier and Type Field Description static String
NON_PROXY_HOSTS_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.static String
NTLM_DOMAIN_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.static String
PROXY_AUTHENTICATION
Deprecated, for removal: This API element is subject to removal in a future version.static String
PROXY_HOST_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.static String
PROXY_PASSWORD_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.static String
PROXY_PORT_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.static String
PROXY_USERNAME_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static HttpProxyConfiguration
fromProperties(Properties properties)
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ProxyConfiguration using the standard properties, using the Properties object provided.static HttpProxyConfiguration
fromSystemProperties()
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ProxyConfiguration using the standard properties, reading fromSystem.getProperties()
.List<HttpProxyConfiguration.ProxyAuthentication>
getAuthentication()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the types of authentication to use in preference order.String
getHost()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the proxy host name, or null if no proxy is defined.String
getNtlmDomain()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the NTLM authentication domain of the proxy server.String
getPassword()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the proxy password, or null if the password is not set.int
getPort()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the proxy port.String
getUsername()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the proxy username, or null if the username is not set.boolean
hasBasicAuthentication()
Deprecated, for removal: This API element is subject to removal in a future version.Returns true if the configuration includes basic authentication details, i.e.boolean
hasDigestAuthentication()
Deprecated, for removal: This API element is subject to removal in a future version.Returns true if the configuration includes digest authentication details, i.e.boolean
hasNtlmAuthentication()
Deprecated, for removal: This API element is subject to removal in a future version.Returns true if the configuration includes NTLM authentication details, i.e.boolean
isProxyConfigured()
Deprecated, for removal: This API element is subject to removal in a future version.Returns true if a proxy server is configured (i.e.boolean
shouldProxy(String destinationHost)
Deprecated, for removal: This API element is subject to removal in a future version.Returns true if the proxy is configured and the host is not in the list of "non-proxy hosts".
-
-
-
Field Detail
-
PROXY_HOST_PROPERTY
public static final String PROXY_HOST_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
PROXY_PORT_PROPERTY
public static final String PROXY_PORT_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
PROXY_USERNAME_PROPERTY
public static final String PROXY_USERNAME_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
PROXY_PASSWORD_PROPERTY
public static final String PROXY_PASSWORD_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
NTLM_DOMAIN_PROPERTY
public static final String NTLM_DOMAIN_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
NON_PROXY_HOSTS_PROPERTY
public static final String NON_PROXY_HOSTS_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
PROXY_AUTHENTICATION
public static final String PROXY_AUTHENTICATION
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
-
Method Detail
-
fromSystemProperties
public static HttpProxyConfiguration fromSystemProperties()
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ProxyConfiguration using the standard properties, reading fromSystem.getProperties()
.The non-proxy hosts property is a pipe-delimited lists of hosts or domains with a wildcard at the start. For example: "server.example.org|*.example.com".
The proxy authentication property defines the preference order of authentication methods. By default, the order is HttpClient's default order: NTLM, Digest, Basic. You may need to change this if your server advertises that it supports NTLM and Basic authentication, but you only have a Basic authentication credentials. The format of this property is a comma-separated list of values from the HttpClient AuthPolicy class. For example: "basic,ntlm" will try Basic authentication then NTLM authentication.
-
fromProperties
public static HttpProxyConfiguration fromProperties(Properties properties)
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ProxyConfiguration using the standard properties, using the Properties object provided.See
fromSystemProperties()
for a discussion of the properties.- Parameters:
properties
- the properties to use for reading the proxy information
-
isProxyConfigured
public boolean isProxyConfigured()
Deprecated, for removal: This API element is subject to removal in a future version.Returns true if a proxy server is configured (i.e. the host is set), otherwise false.
-
shouldProxy
public boolean shouldProxy(String destinationHost)
Deprecated, for removal: This API element is subject to removal in a future version.Returns true if the proxy is configured and the host is not in the list of "non-proxy hosts".- See Also:
isProxyConfigured()
-
hasBasicAuthentication
public boolean hasBasicAuthentication()
Deprecated, for removal: This API element is subject to removal in a future version.Returns true if the configuration includes basic authentication details, i.e. a username.
-
hasDigestAuthentication
public boolean hasDigestAuthentication()
Deprecated, for removal: This API element is subject to removal in a future version.Returns true if the configuration includes digest authentication details, i.e. a username.
-
hasNtlmAuthentication
public boolean hasNtlmAuthentication()
Deprecated, for removal: This API element is subject to removal in a future version.Returns true if the configuration includes NTLM authentication details, i.e. a domain.
-
getAuthentication
public List<HttpProxyConfiguration.ProxyAuthentication> getAuthentication()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the types of authentication to use in preference order. The default value is NTLM, Digest, then Basic, as long as credentials are available for the appropriate type.
-
getHost
public String getHost()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the proxy host name, or null if no proxy is defined.
-
getPort
public int getPort()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the proxy port.
-
getUsername
public String getUsername()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the proxy username, or null if the username is not set.
-
getPassword
public String getPassword()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the proxy password, or null if the password is not set.
-
getNtlmDomain
public String getNtlmDomain()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the NTLM authentication domain of the proxy server.
-
-