Deprecated
(4.3) use SystemDefaultRoutePlanner
HttpRoutePlanner.
This implementation is based on java.net.ProxySelector .
By default, it will pick up the proxy settings of the JVM, either
from system properties or from the browser running the application.
Additionally, it interprets some
parameters,
though not the DEFAULT_PROXY.
The following parameters can be used to customize the behavior of this class:
| Modifier and Type | Field and Description |
|---|---|
| protected ProxySelector | proxySelector
The proxy selector to use, or |
| protected final SchemeRegistry | schemeRegistry
The scheme registry. |
| Access | Constructor and Description |
|---|---|
| public | ProxySelectorRoutePlanner(final SchemeRegistry
the scheme registry schreg, final ProxySelector the proxy selector, or
prosel)null for the system default
Deprecated
as a consequence of
Creates a new proxy selector route planner.
SchemeRegistry being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| protected Proxy | Returns: a proxy typethe list of proxies to choose from,
never proxies, final HttpHost null or emptythe planned target, never target, final HttpRequest nullthe request to be sent, never request, final HttpContext nullthe context, or context)nullChooses a proxy from a list of available proxies. |
| protected HttpHost | Returns: the proxy to use, ornull for a direct routethe planned target, never target, final HttpRequest nullthe request to be sent, never request, final HttpContext nullthe context, or context)nullDetermines a proxy for the given target. |
| public HttpRoute | determineRoute(final HttpHost
the target host for the request.
Implementations may accept target, final HttpRequest null
if they can still determine a route, for example
to a default target or by inspecting the request.the request to execute request, final HttpContext the context to use for the subsequent execution.
Implementations may accept context)null.Implements org. |
| protected String | Returns: a host string, either as a symbolic name or as a literal IP address string(TODO: determine format for IPv6 addresses, with or without [brackets]) the socket address isa)Obtains a host from an |
| public ProxySelector | Returns: the proxy selector, ornull for the system defaultObtains the proxy selector to use. |
| public void | setProxySelector(final ProxySelector
the proxy selector, or
prosel)null to use the system defaultSets the proxy selector to use. |
| proxySelector | back to summary |
|---|---|
| protected ProxySelector proxySelector The proxy selector to use, or | |
| schemeRegistry | back to summary |
|---|---|
| protected final SchemeRegistry schemeRegistry
Deprecated as a consequence of The scheme registry. | |
| ProxySelectorRoutePlanner | back to summary |
|---|---|
| public ProxySelectorRoutePlanner(final SchemeRegistry schreg, final ProxySelector prosel)
Deprecated as a consequence of Creates a new proxy selector route planner.
| |
| chooseProxy | back to summary |
|---|---|
| protected Proxy chooseProxy(final List<Proxy> proxies, final HttpHost target, final HttpRequest request, final HttpContext context) Chooses a proxy from a list of available proxies.
The default implementation just picks the first non-SOCKS proxy
from the list. If there are only SOCKS proxies,
| |
| determineProxy | back to summary |
|---|---|
| protected HttpHost determineProxy(final HttpHost target, final HttpRequest request, final HttpContext context) throws HttpException Determines a proxy for the given target.
| |
| determineRoute | back to summary |
|---|---|
| public HttpRoute determineRoute(final HttpHost target, final HttpRequest request, final HttpContext context) throws HttpException Implements org. Doc from org. Determines the route for a request.
| |
| getHost | back to summary |
|---|---|
| protected String getHost(final InetSocketAddress isa) Obtains a host from an
| |
| getProxySelector | back to summary |
|---|---|
| public ProxySelector getProxySelector() Obtains the proxy selector to use.
| |
| setProxySelector | back to summary |
|---|---|
| public void setProxySelector(final ProxySelector prosel) Sets the proxy selector to use.
| |