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

public Class RetryExec

extends Object
implements ClientExecChain
Class Inheritance
All Implemented Interfaces
org.apache.http.impl.execchain.ClientExecChain
Annotations
@Contract
threading:IMMUTABLE_CONDITIONAL
Imports
java.io.IOException, org.apache.commons.logging.Log, .LogFactory, org.apache.http.Header, .HttpException, .NoHttpResponseException, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.client.HttpRequestRetryHandler, .NonRepeatableRequestException, org.apache.http.client.methods.CloseableHttpResponse, .HttpExecutionAware, .HttpRequestWrapper, org.apache.http.client.protocol.HttpClientContext, org.apache.http.conn.routing.HttpRoute, org.apache.http.util.Args

Request executor in the request execution chain that is responsible for making a decision whether a request failed due to an I/O error should be re-executed.

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 ClientExecChain
private final HttpRequestRetryHandler

Constructor Summary

AccessConstructor and Description
public
RetryExec(final ClientExecChain requestExecutor, final HttpRequestRetryHandler retryHandler)

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
requestExecutorback to summary
private final ClientExecChain requestExecutor
retryHandlerback to summary
private final HttpRequestRetryHandler retryHandler

Constructor Detail

RetryExecback to summary
public RetryExec(final ClientExecChain requestExecutor, final HttpRequestRetryHandler retryHandler)

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).