@Contract(threading=IMMUTABLE_CONDITIONAL) public class SystemDefaultRoutePlanner extends DefaultRoutePlanner
HttpRoutePlanner
implementation
based on ProxySelector
. By default, this class will pick up
the proxy settings of the JVM, either from system properties
or from the browser running the application.Modifier and Type | Field and Description |
---|---|
private java.net.ProxySelector |
proxySelector |
Constructor and Description |
---|
SystemDefaultRoutePlanner(java.net.ProxySelector proxySelector) |
SystemDefaultRoutePlanner(SchemePortResolver schemePortResolver,
java.net.ProxySelector proxySelector) |
Modifier and Type | Method and Description |
---|---|
private java.net.Proxy |
chooseProxy(java.util.List<java.net.Proxy> proxies) |
protected org.apache.http.HttpHost |
determineProxy(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request,
org.apache.http.protocol.HttpContext context)
This implementation returns null.
|
private java.lang.String |
getHost(java.net.InetSocketAddress isa) |
determineRoute
public SystemDefaultRoutePlanner(SchemePortResolver schemePortResolver, java.net.ProxySelector proxySelector)
proxySelector
- the proxy selector, or null
for the system defaultpublic SystemDefaultRoutePlanner(java.net.ProxySelector proxySelector)
proxySelector
- the proxy selector, or null
for the system defaultprotected org.apache.http.HttpHost determineProxy(org.apache.http.HttpHost target, org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context) throws org.apache.http.HttpException
DefaultRoutePlanner
determineProxy
in class DefaultRoutePlanner
org.apache.http.HttpException
- may be thrown if overriddenprivate java.lang.String getHost(java.net.InetSocketAddress isa)
private java.net.Proxy chooseProxy(java.util.List<java.net.Proxy> proxies)