Top Description Methods
org.apache.http.conn.routing

public Interface HttpRoutePlanner

Known Direct Implementers
org.apache.http.impl.conn.DefaultHttpRoutePlanner, org.apache.http.impl.conn.DefaultRoutePlanner, org.apache.http.impl.conn.ProxySelectorRoutePlanner
Imports
org.apache.http.HttpException, .HttpHost, .HttpRequest, org.apache.http.protocol.HttpContext

Encapsulates logic to compute a HttpRoute to a target host. Implementations may for example be based on parameters, or on the standard Java system properties.

Implementations of this interface must be thread-safe. Access to shared data must be synchronized as methods of this interface may be executed from multiple threads.

Since
4.0

Method Summary

Modifier and TypeMethod and Description
public HttpRoute

Returns:

the route that the request should take
determineRoute
(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.
target
,
HttpRequest
the request to execute
request
,
HttpContext
the context to use for the subsequent execution. Implementations may accept null.
context
)

Determines the route for a request.

Method Detail

determineRouteback to summary
public HttpRoute determineRoute(HttpHost target, HttpRequest request, HttpContext context) throws HttpException

Determines the route for a request.

Parameters
target: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

Exceptions
HttpException:
in case of a problem