@ThreadSafe public class DefaultHttpRoutePlanner extends java.lang.Object implements HttpRoutePlanner
HttpRoutePlanner. This implementation
is based on parameters.
It will not make use of any Java system properties, nor of system or
browser proxy settings.
The following parameters can be used to customize the behavior of this class:
| 限定符和类型 | 字段和说明 |
|---|---|
protected SchemeRegistry |
schemeRegistry
The scheme registry.
|
| 构造器和说明 |
|---|
DefaultHttpRoutePlanner(SchemeRegistry schreg)
Creates a new default route planner.
|
| 限定符和类型 | 方法和说明 |
|---|---|
HttpRoute |
determineRoute(HttpHost target,
HttpRequest request,
HttpContext context)
Determines the route for a request.
|
protected final SchemeRegistry schemeRegistry
public DefaultHttpRoutePlanner(SchemeRegistry schreg)
schreg - the scheme registrypublic HttpRoute determineRoute(HttpHost target, HttpRequest request, HttpContext context) throws HttpException
HttpRoutePlannerdetermineRoute 在接口中 HttpRoutePlannertarget - 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 - the request to executecontext - the context to use for the subsequent execution.
Implementations may accept null.HttpException - in case of a problem