Top Description Fields Constructors Methods
org.apache.http.impl.conn

public Class DefaultRoutePlanner

extends Object
implements HttpRoutePlanner
Class Inheritance
All Implemented Interfaces
org.apache.http.conn.routing.HttpRoutePlanner
Known Direct Subclasses
org.apache.http.impl.conn.SystemDefaultRoutePlanner, org.apache.http.impl.conn.DefaultProxyRoutePlanner
Annotations
@Contract
threading:IMMUTABLE_CONDITIONAL
Imports
java.net.InetAddress, org.apache.http.HttpException, .HttpHost, .HttpRequest, .ProtocolException, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.client.config.RequestConfig, org.apache.http.client.protocol.HttpClientContext, org.apache.http.conn.SchemePortResolver, .UnsupportedSchemeException, org.apache.http.conn.routing.HttpRoute, .HttpRoutePlanner, org.apache.http.protocol.HttpContext, org.apache.http.util.Args

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 HttpHost
determineProxy(final HttpHost target, final HttpRequest request, final HttpContext context)

This implementation returns null.

public HttpRoute
determineRoute(final HttpHost
the target host for the request. Implementations may accept null if they can still determine a route, for example to a default target or by inspecting the request.
host
,
final HttpRequest
the request to execute
request
,
final HttpContext
the context to use for the subsequent execution. Implementations may accept null.
context
)

Implements org.apache.http.conn.routing.HttpRoutePlanner.determineRoute.

Determines the route for a request.
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

determineProxyback to summary
protected HttpHost determineProxy(final HttpHost target, final HttpRequest request, final HttpContext context) throws HttpException

This implementation returns null.

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

Implements org.apache.http.conn.routing.HttpRoutePlanner.determineRoute.

Doc from org.apache.http.conn.routing.HttpRoutePlanner.determineRoute.

Determines the route for a request.

Parameters
host:HttpHost

the target host for the request. Implementations may accept null if they can still determine a route, for example to a default target or by inspecting the request.

request:HttpRequest

the request to execute

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