@Contract(threading=STATELESS) public class DefaultRoutePlanner extends Object implements HttpRoutePlanner
HttpRoutePlanner
. It will not make use of
any Java system properties, nor of system or browser proxy settings.Constructor and Description |
---|
DefaultRoutePlanner(SchemePortResolver schemePortResolver) |
Modifier and Type | Method and Description |
---|---|
protected InetAddress |
determineLocalAddress(org.apache.hc.core5.http.HttpHost firstHop,
org.apache.hc.core5.http.protocol.HttpContext context)
This implementation returns null.
|
protected org.apache.hc.core5.http.HttpHost |
determineProxy(org.apache.hc.core5.http.HttpHost target,
org.apache.hc.core5.http.protocol.HttpContext context)
This implementation returns null.
|
HttpRoute |
determineRoute(org.apache.hc.core5.http.HttpHost host,
org.apache.hc.core5.http.protocol.HttpContext context)
Determines the route for the given host.
|
HttpRoute |
determineRoute(org.apache.hc.core5.http.HttpHost host,
org.apache.hc.core5.http.HttpRequest request,
org.apache.hc.core5.http.protocol.HttpContext context)
Determines the route for the given host.
|
public DefaultRoutePlanner(SchemePortResolver schemePortResolver)
public final HttpRoute determineRoute(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException
HttpRoutePlanner
determineRoute
in interface HttpRoutePlanner
host
- the target host for the request.request
- the request message. Can be null
if not given / known.context
- the context to use for the subsequent execution.
Implementations may accept null
.org.apache.hc.core5.http.HttpException
public final HttpRoute determineRoute(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException
HttpRoutePlanner
determineRoute
in interface HttpRoutePlanner
host
- the target host for the request.context
- the context to use for the subsequent execution.
Implementations may accept null
.org.apache.hc.core5.http.HttpException
- in case of a problemprotected org.apache.hc.core5.http.HttpHost determineProxy(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException
org.apache.hc.core5.http.HttpException
- may be thrown if overriddenprotected InetAddress determineLocalAddress(org.apache.hc.core5.http.HttpHost firstHop, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException
org.apache.hc.core5.http.HttpException
- may be thrown if overriddenCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.