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

public Class RedirectExec

extends Object
implements ClientExecChain
Class Inheritance
All Implemented Interfaces
org.apache.http.impl.execchain.ClientExecChain
Annotations
@Contract
threading:IMMUTABLE_CONDITIONAL
Imports
java.io.IOException, java.net.URI, java.util.List, org.apache.commons.logging.Log, .LogFactory, org.apache.http.HttpEntityEnclosingRequest, .HttpException, .HttpHost, .HttpRequest, .ProtocolException, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.auth.AuthState, org.apache.http.client.RedirectException, .RedirectStrategy, org.apache.http.client.config.RequestConfig, org.apache.http.client.methods.CloseableHttpResponse, .HttpExecutionAware, .HttpRequestWrapper, org.apache.http.client.protocol.HttpClientContext, org.apache.http.client.utils.URIUtils, org.apache.http.conn.routing.HttpRoute, .HttpRoutePlanner, org.apache.http.util.Args, .EntityUtils

Request executor in the request execution chain that is responsible for handling of request redirects.

Further responsibilities such as communication with the opposite endpoint is delegated to the next executor in the request execution chain.

Since
4.3

Field Summary

Modifier and TypeField and Description
private final Log
private final RedirectStrategy
private final ClientExecChain
private final HttpRoutePlanner

Constructor Summary

AccessConstructor and Description
public
RedirectExec(final ClientExecChain requestExecutor, final HttpRoutePlanner routePlanner, final RedirectStrategy redirectStrategy)

Method Summary

Modifier and TypeMethod and Description
public CloseableHttpResponse
execute(final HttpRoute
connection route.
route
,
final HttpRequestWrapper
current request.
request
,
final HttpClientContext
current HTTP context.
context
,
final HttpExecutionAware
receiver of notifications of blocking I/O operations.
execAware
)

Implements org.apache.http.impl.execchain.ClientExecChain.execute.

Executes th request either by transmitting it to the target server or by passing it onto the next executor in the request execution chain.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logback to summary
private final Log log
redirectStrategyback to summary
private final RedirectStrategy redirectStrategy
requestExecutorback to summary
private final ClientExecChain requestExecutor
routePlannerback to summary
private final HttpRoutePlanner routePlanner

Constructor Detail

RedirectExecback to summary
public RedirectExec(final ClientExecChain requestExecutor, final HttpRoutePlanner routePlanner, final RedirectStrategy redirectStrategy)

Method Detail

executeback to summary
public CloseableHttpResponse execute(final HttpRoute route, final HttpRequestWrapper request, final HttpClientContext context, final HttpExecutionAware execAware) throws IOException, HttpException

Implements org.apache.http.impl.execchain.ClientExecChain.execute.

Doc from org.apache.http.impl.execchain.ClientExecChain.execute.

Executes th request either by transmitting it to the target server or by passing it onto the next executor in the request execution chain.

Parameters
route:HttpRoute

connection route.

request:HttpRequestWrapper

current request.

context:HttpClientContext

current HTTP context.

execAware:HttpExecutionAware

receiver of notifications of blocking I/O operations.

Returns:CloseableHttpResponse

HTTP response either received from the opposite endpoint or generated locally.

Annotations
@Override
Exceptions
IOException:
in case of a I/O error. (this type of exceptions are potentially recoverable).
HttpException:
in case of an HTTP protocol error (usually this type of exceptions are non-recoverable).