com.ning.http.util
Class ProxyUtils
java.lang.Object
com.ning.http.util.ProxyUtils
public class ProxyUtils
- extends Object
Utilities for Proxy handling.
- Author:
- cstamas
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProxyUtils
public ProxyUtils()
avoidProxy
public 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. If
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
- Parameters:
proxyServer
- request
-
- Returns:
- true if we have to avoid proxy use (obeying non-proxy hosts settings), false otherwise.
avoidProxy
public 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. If
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
- Parameters:
proxyServer
- target
- the hostname
- Returns:
- true if we have to avoid proxy use (obeying non-proxy hosts settings), false otherwise.
Copyright © 2011. All Rights Reserved.