Top Description Fields Constructors Methods
org.apache.hc.client5.http.impl.routing

public Class DefaultRoutePlanner

extends Object
implements HttpRoutePlanner
Class Inheritance
All Implemented Interfaces
org.apache.hc.client5.http.routing.HttpRoutePlanner
Known Direct Subclasses
org.apache.hc.client5.http.impl.routing.SystemDefaultRoutePlanner, org.apache.hc.client5.http.impl.routing.DefaultProxyRoutePlanner
Annotations
@Contract
threading:STATELESS
Imports
java.net.InetAddress, org.apache.hc.client5.http.HttpRoute, .SchemePortResolver, org.apache.hc.client5.http.config.RequestConfig, org.apache.hc.client5.http.impl.DefaultSchemePortResolver, org.apache.hc.client5.http.protocol.HttpClientContext, org.apache.hc.client5.http.routing.HttpRoutePlanner, .RoutingSupport, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.HttpException, .HttpHost, .ProtocolException, .URIScheme, org.apache.hc.core5.http.protocol.HttpContext

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

Modifier and TypeField and Description
private final SchemePortResolver

Constructor Summary

AccessConstructor and Description
public
DefaultRoutePlanner(final SchemePortResolver schemePortResolver)

Method Summary

Modifier and TypeMethod and Description
protected InetAddress
determineLocalAddress(final HttpHost firstHop, final HttpContext context)

This implementation returns null.

protected HttpHost
determineProxy(final HttpHost target, final HttpContext context)

This implementation returns null.

public final HttpRoute
determineRoute(final HttpHost
the target host for the request.
host
,
final HttpContext
the context to use for the subsequent execution. Implementations may accept null.
context
)

Implements org.apache.hc.client5.http.routing.HttpRoutePlanner.determineRoute.

Determines the route for the given host.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

schemePortResolverback to summary
private final SchemePortResolver schemePortResolver

Constructor Detail

DefaultRoutePlannerback to summary
public DefaultRoutePlanner(final SchemePortResolver schemePortResolver)

Method Detail

determineLocalAddressback to summary
protected InetAddress determineLocalAddress(final HttpHost firstHop, final HttpContext context) throws HttpException

This implementation returns null.

Exceptions
HttpException:
may be thrown if overridden
determineProxyback to summary
protected HttpHost determineProxy(final HttpHost target, final HttpContext context) throws HttpException

This implementation returns null.

Exceptions
HttpException:
may be thrown if overridden
determineRouteback to summary
public final HttpRoute determineRoute(final HttpHost host, final HttpContext context) throws HttpException

Implements org.apache.hc.client5.http.routing.HttpRoutePlanner.determineRoute.

Doc from org.apache.hc.client5.http.routing.HttpRoutePlanner.determineRoute.

Determines the route for the given host.

Parameters
host:HttpHost

the target host for the request.

context:HttpContext

the context to use for the subsequent execution. Implementations may accept null.

Returns:HttpRoute

the route that the request should take

Annotations
@Override
Exceptions
HttpException:
in case of a problem