|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ning.http.util.ProxyUtils
public class ProxyUtils
Utilities for Proxy handling.
Field Summary | |
---|---|
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_PROTOCOL
The protocol to use. |
static String |
PROXY_USER
The username to use for authentication for the proxy server. |
Constructor Summary | |
---|---|
ProxyUtils()
|
Method Summary | |
---|---|
static boolean |
avoidProxy(ProxyServer proxyServer,
Request request)
Checks whether proxy should be used according to nonProxyHosts settings of it, or we want to go directly to target host. |
static boolean |
avoidProxy(ProxyServer proxyServer,
String target)
Checks whether proxy should be used according to nonProxyHosts settings of it, or we want to go directly to target host. |
static ProxyServer |
createProxy(Properties properties)
Creates a proxy server instance from the given properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROXY_HOST
public static final String PROXY_PORT
public static final String PROXY_PROTOCOL
ProxyServer.Protocol
enum.
public static final String PROXY_NONPROXYHOSTS
public static final String PROXY_USER
public static final String PROXY_PASSWORD
Constructor Detail |
---|
public ProxyUtils()
Method Detail |
---|
public static boolean avoidProxy(ProxyServer proxyServer, Request request)
null
proxy is passed in, this method returns true -- since there is NO proxy, we
should avoid to use it. Simple hostname pattern matching using "*" are supported, but only as prefixes.
See http://download.oracle.com/javase/1.4.2/docs/guide/net/properties.html
proxyServer
- request
-
public static boolean avoidProxy(ProxyServer proxyServer, String target)
null
proxy is passed in, this method returns true -- since there is NO proxy, we
should avoid to use it. Simple hostname pattern matching using "*" are supported, but only as prefixes.
See http://download.oracle.com/javase/1.4.2/docs/guide/net/properties.html
proxyServer
- target
- the hostname
public static ProxyServer createProxy(Properties properties)
properties
- the properties to evaluate. Must not be null.
http://download.oracle.com/javase/1.4.2/docs/guide/net/properties.html
,
PROXY_HOST
,
PROXY_PORT
,
PROXY_PROTOCOL
,
PROXY_NONPROXYHOSTS
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |