Class DefaultRoutePlanner
java.lang.Object
org.apache.hc.client5.http.impl.routing.DefaultRoutePlanner
- All Implemented Interfaces:
HttpRoutePlanner
- Direct Known Subclasses:
DefaultProxyRoutePlanner
,SystemDefaultRoutePlanner
@Contract(threading=STATELESS)
public class DefaultRoutePlanner
extends Object
implements HttpRoutePlanner
Default implementation of an
HttpRoutePlanner
. It will not make use of
any Java system properties, nor of system or browser proxy settings.- Since:
- 4.3
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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.final HttpRoute
determineRoute
(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.protocol.HttpContext context) Determines the route for the given host.
-
Field Details
-
schemePortResolver
-
-
Constructor Details
-
DefaultRoutePlanner
-
-
Method Details
-
determineRoute
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 Description copied from interface:HttpRoutePlanner
Determines the route for the given host.- Specified by:
determineRoute
in interfaceHttpRoutePlanner
- Parameters:
host
- the target host for the request.context
- the context to use for the subsequent execution. Implementations may acceptnull
.- Returns:
- the route that the request should take
- Throws:
org.apache.hc.core5.http.HttpException
- in case of a problem
-
determineProxy
protected 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 This implementation returns null.- Throws:
org.apache.hc.core5.http.HttpException
- may be thrown if overridden
-
determineLocalAddress
protected InetAddress determineLocalAddress(org.apache.hc.core5.http.HttpHost firstHop, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException This implementation returns null.- Throws:
org.apache.hc.core5.http.HttpException
- may be thrown if overridden
-