@Deprecated
public class DefaultRequestDirector
extends java.lang.Object
implements org.apache.http.client.RequestDirector
RequestDirector.
The following parameters can be used to customize the behavior of this class:
CoreProtocolPNames.PROTOCOL_VERSIONCoreProtocolPNames.STRICT_TRANSFER_ENCODINGCoreProtocolPNames.HTTP_ELEMENT_CHARSETCoreProtocolPNames.USE_EXPECT_CONTINUECoreProtocolPNames.WAIT_FOR_CONTINUECoreProtocolPNames.USER_AGENTCoreConnectionPNames.SOCKET_BUFFER_SIZECoreConnectionPNames.MAX_LINE_LENGTHCoreConnectionPNames.MAX_HEADER_COUNTCoreConnectionPNames.SO_TIMEOUTCoreConnectionPNames.SO_LINGERCoreConnectionPNames.SO_REUSEADDRCoreConnectionPNames.TCP_NODELAYCoreConnectionPNames.CONNECTION_TIMEOUTCoreConnectionPNames.STALE_CONNECTION_CHECKorg.apache.http.conn.params.ConnRoutePNames#FORCED_ROUTEorg.apache.http.conn.params.ConnRoutePNames#LOCAL_ADDRESSorg.apache.http.conn.params.ConnRoutePNames#DEFAULT_PROXYorg.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNSorg.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADERAuthPNames.CREDENTIAL_CHARSETClientPNames.COOKIE_POLICYClientPNames.HANDLE_AUTHENTICATIONClientPNames.HANDLE_REDIRECTSClientPNames.MAX_REDIRECTSClientPNames.ALLOW_CIRCULAR_REDIRECTSClientPNames.VIRTUAL_HOSTClientPNames.DEFAULT_HOSTClientPNames.DEFAULT_HEADERSClientPNames.CONN_MANAGER_TIMEOUT| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.conn.ClientConnectionManager |
connManager
Deprecated.
The connection manager.
|
protected org.apache.http.protocol.HttpProcessor |
httpProcessor
Deprecated.
The HTTP protocol processor.
|
protected org.apache.http.conn.ConnectionKeepAliveStrategy |
keepAliveStrategy
Deprecated.
The keep-alive duration strategy.
|
protected org.apache.http.conn.ManagedClientConnection |
managedConn
Deprecated.
The currently allocated connection.
|
protected org.apache.http.params.HttpParams |
params
Deprecated.
The HTTP parameters.
|
protected org.apache.http.client.AuthenticationHandler |
proxyAuthHandler
Deprecated.
|
protected org.apache.http.auth.AuthState |
proxyAuthState
Deprecated.
|
protected org.apache.http.client.AuthenticationStrategy |
proxyAuthStrategy
Deprecated.
The proxy authentication handler.
|
protected org.apache.http.client.RedirectHandler |
redirectHandler
Deprecated.
|
protected org.apache.http.client.RedirectStrategy |
redirectStrategy
Deprecated.
The redirect strategy.
|
protected org.apache.http.protocol.HttpRequestExecutor |
requestExec
Deprecated.
The request executor.
|
protected org.apache.http.client.HttpRequestRetryHandler |
retryHandler
Deprecated.
The request retry handler.
|
protected ConnectionReuseStrategy |
reuseStrategy
Deprecated.
The connection re-use strategy.
|
protected org.apache.http.conn.routing.HttpRoutePlanner |
routePlanner
Deprecated.
The route planner.
|
protected org.apache.http.client.AuthenticationHandler |
targetAuthHandler
Deprecated.
|
protected org.apache.http.auth.AuthState |
targetAuthState
Deprecated.
|
protected org.apache.http.client.AuthenticationStrategy |
targetAuthStrategy
Deprecated.
The target authentication handler.
|
protected org.apache.http.client.UserTokenHandler |
userTokenHandler
Deprecated.
The user token handler.
|
| Constructor and Description |
|---|
DefaultRequestDirector(org.apache.http.protocol.HttpRequestExecutor requestExec,
org.apache.http.conn.ClientConnectionManager conman,
ConnectionReuseStrategy reustrat,
org.apache.http.conn.ConnectionKeepAliveStrategy kastrat,
org.apache.http.conn.routing.HttpRoutePlanner rouplan,
org.apache.http.protocol.HttpProcessor httpProcessor,
org.apache.http.client.HttpRequestRetryHandler retryHandler,
org.apache.http.client.RedirectHandler redirectHandler,
org.apache.http.client.AuthenticationHandler targetAuthHandler,
org.apache.http.client.AuthenticationHandler proxyAuthHandler,
org.apache.http.client.UserTokenHandler userTokenHandler,
org.apache.http.params.HttpParams params)
Deprecated.
|
DefaultRequestDirector(Log log,
org.apache.http.protocol.HttpRequestExecutor requestExec,
org.apache.http.conn.ClientConnectionManager conman,
ConnectionReuseStrategy reustrat,
org.apache.http.conn.ConnectionKeepAliveStrategy kastrat,
org.apache.http.conn.routing.HttpRoutePlanner rouplan,
org.apache.http.protocol.HttpProcessor httpProcessor,
org.apache.http.client.HttpRequestRetryHandler retryHandler,
org.apache.http.client.RedirectStrategy redirectStrategy,
org.apache.http.client.AuthenticationHandler targetAuthHandler,
org.apache.http.client.AuthenticationHandler proxyAuthHandler,
org.apache.http.client.UserTokenHandler userTokenHandler,
org.apache.http.params.HttpParams params)
Deprecated.
|
DefaultRequestDirector(Log log,
org.apache.http.protocol.HttpRequestExecutor requestExec,
org.apache.http.conn.ClientConnectionManager conman,
ConnectionReuseStrategy reustrat,
org.apache.http.conn.ConnectionKeepAliveStrategy kastrat,
org.apache.http.conn.routing.HttpRoutePlanner rouplan,
org.apache.http.protocol.HttpProcessor httpProcessor,
org.apache.http.client.HttpRequestRetryHandler retryHandler,
org.apache.http.client.RedirectStrategy redirectStrategy,
org.apache.http.client.AuthenticationStrategy targetAuthStrategy,
org.apache.http.client.AuthenticationStrategy proxyAuthStrategy,
org.apache.http.client.UserTokenHandler userTokenHandler,
org.apache.http.params.HttpParams params)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected HttpRequest |
createConnectRequest(org.apache.http.conn.routing.HttpRoute route,
org.apache.http.protocol.HttpContext context)
Deprecated.
Creates the CONNECT request for tunnelling.
|
protected boolean |
createTunnelToProxy(org.apache.http.conn.routing.HttpRoute route,
int hop,
org.apache.http.protocol.HttpContext context)
Deprecated.
Creates a tunnel to an intermediate proxy.
|
protected boolean |
createTunnelToTarget(org.apache.http.conn.routing.HttpRoute route,
org.apache.http.protocol.HttpContext context)
Deprecated.
Creates a tunnel to the target server.
|
protected org.apache.http.conn.routing.HttpRoute |
determineRoute(HttpHost targetHost,
HttpRequest request,
org.apache.http.protocol.HttpContext context)
Deprecated.
Determines the route for a request.
|
protected void |
establishRoute(org.apache.http.conn.routing.HttpRoute route,
org.apache.http.protocol.HttpContext context)
Deprecated.
Establishes the target route.
|
HttpResponse |
execute(HttpHost targetHost,
HttpRequest request,
org.apache.http.protocol.HttpContext context)
Deprecated.
|
protected RoutedRequest |
handleResponse(RoutedRequest roureq,
HttpResponse response,
org.apache.http.protocol.HttpContext context)
Deprecated.
Analyzes a response to check need for a followup.
|
protected void |
releaseConnection()
Deprecated.
Returns the connection back to the connection manager
and prepares for retrieving a new connection during
the next request.
|
protected void |
rewriteRequestURI(RequestWrapper request,
org.apache.http.conn.routing.HttpRoute route)
Deprecated.
|
protected final org.apache.http.conn.ClientConnectionManager connManager
protected final org.apache.http.conn.routing.HttpRoutePlanner routePlanner
protected final ConnectionReuseStrategy reuseStrategy
protected final org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy
protected final org.apache.http.protocol.HttpRequestExecutor requestExec
protected final org.apache.http.protocol.HttpProcessor httpProcessor
protected final org.apache.http.client.HttpRequestRetryHandler retryHandler
@Deprecated protected final org.apache.http.client.RedirectHandler redirectHandler
protected final org.apache.http.client.RedirectStrategy redirectStrategy
@Deprecated protected final org.apache.http.client.AuthenticationHandler targetAuthHandler
protected final org.apache.http.client.AuthenticationStrategy targetAuthStrategy
@Deprecated protected final org.apache.http.client.AuthenticationHandler proxyAuthHandler
protected final org.apache.http.client.AuthenticationStrategy proxyAuthStrategy
protected final org.apache.http.client.UserTokenHandler userTokenHandler
protected final org.apache.http.params.HttpParams params
protected org.apache.http.conn.ManagedClientConnection managedConn
protected final org.apache.http.auth.AuthState targetAuthState
protected final org.apache.http.auth.AuthState proxyAuthState
@Deprecated
public DefaultRequestDirector(org.apache.http.protocol.HttpRequestExecutor requestExec,
org.apache.http.conn.ClientConnectionManager conman,
ConnectionReuseStrategy reustrat,
org.apache.http.conn.ConnectionKeepAliveStrategy kastrat,
org.apache.http.conn.routing.HttpRoutePlanner rouplan,
org.apache.http.protocol.HttpProcessor httpProcessor,
org.apache.http.client.HttpRequestRetryHandler retryHandler,
org.apache.http.client.RedirectHandler redirectHandler,
org.apache.http.client.AuthenticationHandler targetAuthHandler,
org.apache.http.client.AuthenticationHandler proxyAuthHandler,
org.apache.http.client.UserTokenHandler userTokenHandler,
org.apache.http.params.HttpParams params)
@Deprecated public DefaultRequestDirector(Log log, org.apache.http.protocol.HttpRequestExecutor requestExec, org.apache.http.conn.ClientConnectionManager conman, ConnectionReuseStrategy reustrat, org.apache.http.conn.ConnectionKeepAliveStrategy kastrat, org.apache.http.conn.routing.HttpRoutePlanner rouplan, org.apache.http.protocol.HttpProcessor httpProcessor, org.apache.http.client.HttpRequestRetryHandler retryHandler, org.apache.http.client.RedirectStrategy redirectStrategy, org.apache.http.client.AuthenticationHandler targetAuthHandler, org.apache.http.client.AuthenticationHandler proxyAuthHandler, org.apache.http.client.UserTokenHandler userTokenHandler, org.apache.http.params.HttpParams params)
public DefaultRequestDirector(Log log, org.apache.http.protocol.HttpRequestExecutor requestExec, org.apache.http.conn.ClientConnectionManager conman, ConnectionReuseStrategy reustrat, org.apache.http.conn.ConnectionKeepAliveStrategy kastrat, org.apache.http.conn.routing.HttpRoutePlanner rouplan, org.apache.http.protocol.HttpProcessor httpProcessor, org.apache.http.client.HttpRequestRetryHandler retryHandler, org.apache.http.client.RedirectStrategy redirectStrategy, org.apache.http.client.AuthenticationStrategy targetAuthStrategy, org.apache.http.client.AuthenticationStrategy proxyAuthStrategy, org.apache.http.client.UserTokenHandler userTokenHandler, org.apache.http.params.HttpParams params)
protected void rewriteRequestURI(RequestWrapper request, org.apache.http.conn.routing.HttpRoute route) throws ProtocolException
ProtocolExceptionpublic HttpResponse execute(HttpHost targetHost, HttpRequest request, org.apache.http.protocol.HttpContext context) throws HttpException, java.io.IOException
execute in interface org.apache.http.client.RequestDirectorHttpExceptionjava.io.IOExceptionprotected void releaseConnection()
protected org.apache.http.conn.routing.HttpRoute determineRoute(HttpHost targetHost, HttpRequest request, org.apache.http.protocol.HttpContext context) throws HttpException
execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext)
to determine the route for either the original or a followup request.targetHost - 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 execution,
never nullHttpException - in case of a problemprotected void establishRoute(org.apache.http.conn.routing.HttpRoute route,
org.apache.http.protocol.HttpContext context)
throws HttpException,
java.io.IOException
route - the route to establishcontext - the context for the request executionHttpException - in case of a problemjava.io.IOException - in case of an IO problemprotected boolean createTunnelToTarget(org.apache.http.conn.routing.HttpRoute route,
org.apache.http.protocol.HttpContext context)
throws HttpException,
java.io.IOException
route - the route to establishcontext - the context for request executiontrue if the tunnelled route is secure,
false otherwise.
The implementation here always returns false,
but derived classes may override.HttpException - in case of a problemjava.io.IOException - in case of an IO problemprotected boolean createTunnelToProxy(org.apache.http.conn.routing.HttpRoute route,
int hop,
org.apache.http.protocol.HttpContext context)
throws HttpException,
java.io.IOException
route - the route to establishhop - the hop in the route to establish now.
route.getHopTarget(hop)
will return the proxy to tunnel to.context - the context for request executiontrue if the partially tunnelled connection
is secure, false otherwise.HttpException - in case of a problemjava.io.IOException - in case of an IO problemprotected HttpRequest createConnectRequest(org.apache.http.conn.routing.HttpRoute route, org.apache.http.protocol.HttpContext context)
createTunnelToTarget.route - the route to establishcontext - the context for request executionprotected RoutedRequest handleResponse(RoutedRequest roureq, HttpResponse response, org.apache.http.protocol.HttpContext context) throws HttpException, java.io.IOException
roureq - the request and route.response - the response to analayzecontext - the context used for the current request executionnull if the response should be returned as isHttpException - in case of a problemjava.io.IOException - in case of an IO problem