public final class ProxyUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PROXY_HOST
The host to use as proxy.
|
static String |
PROXY_NONPROXYHOSTS
A specification of non-proxy hosts.
|
static String |
PROXY_PASSWORD
The password to use for authentication for the proxy server.
|
static String |
PROXY_PORT
The port to use for the proxy.
|
static String |
PROXY_USER
The username to use for authentication for the proxy server.
|
| Modifier and Type | Method and Description |
|---|---|
static ProxyServerSelector |
createProxyServerSelector(Properties properties)
Creates a proxy server instance from the given properties.
|
static ProxyServerSelector |
createProxyServerSelector(ProxySelector proxySelector)
Create a proxy server selector based on the passed in JDK proxy selector.
|
static ProxyServerSelector |
createProxyServerSelector(ProxyServer proxyServer)
Create a proxy server selector that always selects a single proxy server.
|
static ProxyServerSelector |
getJdkDefaultProxyServerSelector()
Get a proxy server selector based on the JDK default proxy selector.
|
static ProxyServer |
getProxyServer(AsyncHttpClientConfig config,
Request request) |
public static final String PROXY_HOST
public static final String PROXY_PORT
public static final String PROXY_NONPROXYHOSTS
public static final String PROXY_USER
public static final String PROXY_PASSWORD
public static ProxyServer getProxyServer(AsyncHttpClientConfig config, Request request)
config - the global configrequest - the requestpublic static ProxyServerSelector createProxyServerSelector(Properties properties)
properties - the properties to evaluate. Must not be null.PROXY_HOST,
PROXY_PORT,
PROXY_NONPROXYHOSTSpublic static ProxyServerSelector getJdkDefaultProxyServerSelector()
public static ProxyServerSelector createProxyServerSelector(ProxySelector proxySelector)
proxySelector - The proxy selector to use. Must not be null.public static ProxyServerSelector createProxyServerSelector(ProxyServer proxyServer)
proxyServer - The proxy server to select.Copyright © 2016. All Rights Reserved.