Deprecated
Do not use.
RequestDirector.
The following parameters can be used to customize the behavior of this class:
org.apache.http.params.CoreProtocolPNames#PROTOCOL_VERSION org.apache.http.params.CoreProtocolPNames#STRICT_TRANSFER_ENCODING org.apache.http.params.CoreProtocolPNames#HTTP_ELEMENT_CHARSET org.apache.http.params.CoreProtocolPNames#USE_EXPECT_CONTINUE org.apache.http.params.CoreProtocolPNames#WAIT_FOR_CONTINUE org.apache.http.params.CoreProtocolPNames#USER_AGENT org.apache.http.params.CoreConnectionPNames#SOCKET_BUFFER_SIZE org.apache.http.params.CoreConnectionPNames#MAX_LINE_LENGTH org.apache.http.params.CoreConnectionPNames#MAX_HEADER_COUNT org.apache.http.params.CoreConnectionPNames#SO_TIMEOUT org.apache.http.params.CoreConnectionPNames#SO_LINGER org.apache.http.params.CoreConnectionPNames#SO_REUSEADDR org.apache.http.params.CoreConnectionPNames#TCP_NODELAY org.apache.http.params.CoreConnectionPNames#CONNECTION_TIMEOUT org.apache.http.params.CoreConnectionPNames#STALE_CONNECTION_CHECK org.apache.http.conn.params.ConnRoutePNames#FORCED_ROUTE org.apache.http.conn.params.ConnRoutePNames#LOCAL_ADDRESS org.apache.http.conn.params.ConnRoutePNames#DEFAULT_PROXY org.apache.http.cookie.params.CookieSpecPNames#DATE_PATTERNS org.apache.http.cookie.params.CookieSpecPNames#SINGLE_COOKIE_HEADER org.apache.http.auth.params.AuthPNames#CREDENTIAL_CHARSET org.apache.http.client.params.ClientPNames#COOKIE_POLICY org.apache.http.client.params.ClientPNames#HANDLE_AUTHENTICATION org.apache.http.client.params.ClientPNames#HANDLE_REDIRECTS org.apache.http.client.params.ClientPNames#MAX_REDIRECTS org.apache.http.client.params.ClientPNames#ALLOW_CIRCULAR_REDIRECTS org.apache.http.client.params.ClientPNames#VIRTUAL_HOST org.apache.http.client.params.ClientPNames#DEFAULT_HOST org.apache.http.client.params.ClientPNames#DEFAULT_HEADERS org.apache.http.client.params.ClientPNames#CONN_MANAGER_TIMEOUT | Modifier and Type | Field and Description |
|---|---|
| private final HttpAuthenticator | authenticator
Deprecated
as a consequence of
HttpAuthenticator being deprecated.
|
| protected final ClientConnectionManager | connManager
The connection manager. |
| private int | |
| protected final HttpProcessor | httpProcessor
The HTTP protocol processor. |
| protected final ConnectionKeepAliveStrategy | keepAliveStrategy
The keep-alive duration strategy. |
| private final Log | |
| protected ManagedClientConnection | managedConn
The currently allocated connection. |
| private final int | |
| protected final HttpParams | params
The HTTP parameters. |
| protected final AuthenticationHandler | proxyAuthHandler
The proxy authentication handler. |
| protected final AuthState | |
| protected final AuthenticationStrategy | proxyAuthStrategy
The proxy authentication handler. |
| private int | |
| protected final RedirectHandler | redirectHandler
The redirect handler. |
| protected final RedirectStrategy | redirectStrategy
The redirect strategy. |
| protected final HttpRequestExecutor | requestExec
The request executor. |
| protected final HttpRequestRetryHandler | retryHandler
The request retry handler. |
| protected final ConnectionReuseStrategy | reuseStrategy
The connection re-use strategy. |
| protected final HttpRoutePlanner | routePlanner
The route planner. |
| protected final AuthenticationHandler | targetAuthHandler
The target authentication handler. |
| protected final AuthState | |
| protected final AuthenticationStrategy | targetAuthStrategy
The target authentication handler. |
| protected final UserTokenHandler | userTokenHandler
The user token handler. |
| private HttpHost |
| Access | Constructor and Description |
|---|---|
| public | DefaultRequestDirector(final HttpRequestExecutor requestExec, final ClientConnectionManager conman, final ConnectionReuseStrategy reustrat, final ConnectionKeepAliveStrategy kastrat, final HttpRoutePlanner rouplan, final HttpProcessor httpProcessor, final HttpRequestRetryHandler retryHandler, final RedirectHandler redirectHandler, final AuthenticationHandler targetAuthHandler, final AuthenticationHandler proxyAuthHandler, final UserTokenHandler userTokenHandler, final HttpParams params)
Deprecated
as a consequence of
ClientConnectionManager, RedirectHandler, AuthenticationHandler and HttpParams being deprecated.
|
| public | DefaultRequestDirector(final Log log, final HttpRequestExecutor requestExec, final ClientConnectionManager conman, final ConnectionReuseStrategy reustrat, final ConnectionKeepAliveStrategy kastrat, final HttpRoutePlanner rouplan, final HttpProcessor httpProcessor, final HttpRequestRetryHandler retryHandler, final RedirectStrategy redirectStrategy, final AuthenticationHandler targetAuthHandler, final AuthenticationHandler proxyAuthHandler, final UserTokenHandler userTokenHandler, final HttpParams params)
Deprecated
as a consequence of
ClientConnectionManager, AuthenticationHandler and HttpParams being deprecated.
|
| public | DefaultRequestDirector(final Log log, final HttpRequestExecutor requestExec, final ClientConnectionManager conman, final ConnectionReuseStrategy reustrat, final ConnectionKeepAliveStrategy kastrat, final HttpRoutePlanner rouplan, final HttpProcessor httpProcessor, final HttpRequestRetryHandler retryHandler, final RedirectStrategy redirectStrategy, final AuthenticationStrategy targetAuthStrategy, final AuthenticationStrategy proxyAuthStrategy, final UserTokenHandler userTokenHandler, final HttpParams params)
Deprecated
as a consequence of
ClientConnectionManager and HttpParams being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| protected HttpRequest | Returns: the CONNECT request for tunnellingthe route to establish route, final HttpContext the context for request execution context)Creates the CONNECT request for tunnelling. |
| protected boolean | Returns: true if the partially tunnelled connection
is secure, false otherwise.the route to establish route, final int the hop in the route to establish now.
hop, final HttpContext route.getHopTarget(hop)
will return the proxy to tunnel to.the context for request execution context)Creates a tunnel to an intermediate proxy. |
| protected boolean | Returns: true if the tunnelled route is secure,
false otherwise.
The implementation here always returns false,
but derived classes may override.the route to establish route, final HttpContext the context for request execution context)Creates a tunnel to the target server. |
| protected HttpRoute | Returns: the route the request should takethe target host for the request.
Implementations may accept targetHost, final HttpRequest null
if they can still determine a route, for example
to a default target or by inspecting the request.the request to execute request, final HttpContext the context to use for the execution,
never context)nullDetermines the route for a request. |
| protected void | establishRoute(final HttpRoute
the route to establish route, final HttpContext the context for the request execution context)Establishes the target route. |
| public HttpResponse | execute(final HttpHost
the target host for the request.
Implementations may accept targetHost, final HttpRequest null
if they can still determine a route, for example
to a default target or by inspecting the request.the request to execute request, final HttpContext the context for executing the request context)Implements org. |
| protected RoutedRequest | Returns: the followup request and route if there is a followup, ornull if the response should be returned as isthe request and route. roureq, final HttpResponse the response to analayze response, final HttpContext the context used for the current request execution context)
Deprecated
as a consequence of
Analyzes a response to check need for a followup.
RoutedRequest being deprecated.
|
| protected void | releaseConnection()
Returns the connection back to the connection manager and prepares for retrieving a new connection during the next request. |
| protected void | rewriteRequestURI(final RequestWrapper request, final HttpRoute route)
Deprecated
as a consequence of
RequestWrapper being deprecated.
|
| private void | tryConnect(final RoutedRequest req, final HttpContext context)
Deprecated
as a consequence of
Establish connection either directly or through a tunnel and retry in case of
a recoverable I/O failure
RoutedRequest being deprecated.
|
| private HttpResponse | tryExecute(final RoutedRequest req, final HttpContext context)
Deprecated
as a consequence of
Execute request and retry in case of a recoverable I/O failure
RoutedRequest being deprecated.
|
| private RequestWrapper | wrapRequest(final HttpRequest request)
Deprecated
as a consequence of
RequestWrapper being deprecated.
|
| authenticator | back to summary |
|---|---|
| private final HttpAuthenticator authenticator
Deprecated as a consequence of | |
| connManager | back to summary |
|---|---|
| protected final ClientConnectionManager connManager
Deprecated as a consequence of The connection manager. | |
| execCount | back to summary |
|---|---|
| private int execCount | |
| httpProcessor | back to summary |
|---|---|
| protected final HttpProcessor httpProcessor The HTTP protocol processor. | |
| keepAliveStrategy | back to summary |
|---|---|
| protected final ConnectionKeepAliveStrategy keepAliveStrategy The keep-alive duration strategy. | |
| log | back to summary |
|---|---|
| private final Log log | |
| managedConn | back to summary |
|---|---|
| protected ManagedClientConnection managedConn
Deprecated as a consequence of The currently allocated connection. | |
| maxRedirects | back to summary |
|---|---|
| private final int maxRedirects | |
| params | back to summary |
|---|---|
| protected final HttpParams params
Deprecated as a consequence of The HTTP parameters. | |
| proxyAuthHandler | back to summary |
|---|---|
| protected final AuthenticationHandler proxyAuthHandler
Deprecated as a consequence of The proxy authentication handler. | |
| proxyAuthState | back to summary |
|---|---|
| protected final AuthState proxyAuthState | |
| proxyAuthStrategy | back to summary |
|---|---|
| protected final AuthenticationStrategy proxyAuthStrategy The proxy authentication handler. | |
| redirectCount | back to summary |
|---|---|
| private int redirectCount | |
| redirectHandler | back to summary |
|---|---|
| protected final RedirectHandler redirectHandler
Deprecated as a consequence of The redirect handler. | |
| redirectStrategy | back to summary |
|---|---|
| protected final RedirectStrategy redirectStrategy The redirect strategy. | |
| requestExec | back to summary |
|---|---|
| protected final HttpRequestExecutor requestExec The request executor. | |
| retryHandler | back to summary |
|---|---|
| protected final HttpRequestRetryHandler retryHandler The request retry handler. | |
| reuseStrategy | back to summary |
|---|---|
| protected final ConnectionReuseStrategy reuseStrategy The connection re-use strategy. | |
| routePlanner | back to summary |
|---|---|
| protected final HttpRoutePlanner routePlanner The route planner. | |
| targetAuthHandler | back to summary |
|---|---|
| protected final AuthenticationHandler targetAuthHandler
Deprecated as a consequence of The target authentication handler. | |
| targetAuthState | back to summary |
|---|---|
| protected final AuthState targetAuthState | |
| targetAuthStrategy | back to summary |
|---|---|
| protected final AuthenticationStrategy targetAuthStrategy The target authentication handler. | |
| userTokenHandler | back to summary |
|---|---|
| protected final UserTokenHandler userTokenHandler The user token handler. | |
| virtualHost | back to summary |
|---|---|
| private HttpHost virtualHost | |
| DefaultRequestDirector | back to summary |
|---|---|
| public DefaultRequestDirector(final HttpRequestExecutor requestExec, final ClientConnectionManager conman, final ConnectionReuseStrategy reustrat, final ConnectionKeepAliveStrategy kastrat, final HttpRoutePlanner rouplan, final HttpProcessor httpProcessor, final HttpRequestRetryHandler retryHandler, final RedirectHandler redirectHandler, final AuthenticationHandler targetAuthHandler, final AuthenticationHandler proxyAuthHandler, final UserTokenHandler userTokenHandler, final HttpParams params)
Deprecated as a consequence of | |
| DefaultRequestDirector | back to summary |
|---|---|
| public DefaultRequestDirector(final Log log, final HttpRequestExecutor requestExec, final ClientConnectionManager conman, final ConnectionReuseStrategy reustrat, final ConnectionKeepAliveStrategy kastrat, final HttpRoutePlanner rouplan, final HttpProcessor httpProcessor, final HttpRequestRetryHandler retryHandler, final RedirectStrategy redirectStrategy, final AuthenticationHandler targetAuthHandler, final AuthenticationHandler proxyAuthHandler, final UserTokenHandler userTokenHandler, final HttpParams params)
Deprecated as a consequence of | |
| DefaultRequestDirector | back to summary |
|---|---|
| public DefaultRequestDirector(final Log log, final HttpRequestExecutor requestExec, final ClientConnectionManager conman, final ConnectionReuseStrategy reustrat, final ConnectionKeepAliveStrategy kastrat, final HttpRoutePlanner rouplan, final HttpProcessor httpProcessor, final HttpRequestRetryHandler retryHandler, final RedirectStrategy redirectStrategy, final AuthenticationStrategy targetAuthStrategy, final AuthenticationStrategy proxyAuthStrategy, final UserTokenHandler userTokenHandler, final HttpParams params)
Deprecated as a consequence of
| |
| abortConnection | back to summary |
|---|---|
| private void abortConnection() Shuts down the connection.
This method is called from a | |
| createConnectRequest | back to summary |
|---|---|
| protected HttpRequest createConnectRequest(final HttpRoute route, final HttpContext context) Creates the CONNECT request for tunnelling.
Called by
| |
| createTunnelToProxy | back to summary |
|---|---|
| protected boolean createTunnelToProxy(final HttpRoute route, final int hop, final HttpContext context) throws HttpException, IOException Creates a tunnel to an intermediate proxy. This method is not implemented in this class. It just throws an exception here.
| |
| createTunnelToTarget | back to summary |
|---|---|
| protected boolean createTunnelToTarget(final HttpRoute route, final HttpContext context) throws HttpException, IOException Creates a tunnel to the target server. The connection must be established to the (last) proxy. A CONNECT request for tunnelling through the proxy will be created and sent, the response received and checked. This method does not update the connection with information about the tunnel, that is left to the caller.
| |
| determineRoute | back to summary |
|---|---|
| protected HttpRoute determineRoute(final HttpHost targetHost, final HttpRequest request, final HttpContext context) throws HttpException Determines the route for a request.
Called by
| |
| establishRoute | back to summary |
|---|---|
| protected void establishRoute(final HttpRoute route, final HttpContext context) throws HttpException, IOException Establishes the target route.
| |
| execute | back to summary |
|---|---|
| public HttpResponse execute(final HttpHost targetHost, final HttpRequest request, final HttpContext context) throws HttpException, IOException Implements org. Doc from org. Executes a request. Note For the time being, a new director is instantiated for each request.
This is the same behavior as for
| |
| handleResponse | back to summary |
|---|---|
| protected RoutedRequest handleResponse(final RoutedRequest roureq, final HttpResponse response, final HttpContext context) throws HttpException, IOException
Deprecated as a consequence of Analyzes a response to check need for a followup.
| |
| releaseConnection | back to summary |
|---|---|
| protected void releaseConnection() Returns the connection back to the connection manager and prepares for retrieving a new connection during the next request. | |
| rewriteRequestURI | back to summary |
|---|---|
| protected void rewriteRequestURI(final RequestWrapper request, final HttpRoute route) throws ProtocolException
Deprecated as a consequence of | |
| tryConnect | back to summary |
|---|---|
| private void tryConnect(final RoutedRequest req, final HttpContext context) throws HttpException, IOException
Deprecated as a consequence of Establish connection either directly or through a tunnel and retry in case of a recoverable I/O failure | |
| tryExecute | back to summary |
|---|---|
| private HttpResponse tryExecute(final RoutedRequest req, final HttpContext context) throws HttpException, IOException
Deprecated as a consequence of Execute request and retry in case of a recoverable I/O failure | |
| wrapRequest | back to summary |
|---|---|
| private RequestWrapper wrapRequest(final HttpRequest request) throws ProtocolException
Deprecated as a consequence of | |