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

public Class ProtocolExec

extends Object
implements ClientExecChain
Class Inheritance
All Implemented Interfaces
org.apache.http.impl.execchain.ClientExecChain
Annotations
@Contract
threading:IMMUTABLE_CONDITIONAL
@SuppressWarnings:deprecation
Imports
java.io.IOException, java.net.URI, .URISyntaxException, org.apache.commons.logging.Log, .LogFactory, org.apache.http.HttpException, .HttpHost, .HttpRequest, .ProtocolException, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.auth.AuthScope, .UsernamePasswordCredentials, org.apache.http.client.CredentialsProvider, org.apache.http.client.methods.CloseableHttpResponse, .HttpExecutionAware, .HttpRequestWrapper, .HttpUriRequest, org.apache.http.client.params.ClientPNames, org.apache.http.client.protocol.HttpClientContext, org.apache.http.client.utils.URIUtils, org.apache.http.conn.routing.HttpRoute, org.apache.http.impl.client.BasicCredentialsProvider, org.apache.http.params.HttpParams, org.apache.http.protocol.HttpCoreContext, .HttpProcessor, org.apache.http.util.Args

Request executor in the request execution chain that is responsible for implementation of HTTP specification requirements. Internally this executor relies on a HttpProcessor to populate requisite HTTP request headers, process HTTP response headers and update session state in HttpClientContext.

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 HttpProcessor
private final Log
private final ClientExecChain

Constructor Summary

AccessConstructor and Description
public
ProtocolExec(final ClientExecChain requestExecutor, final HttpProcessor httpProcessor)

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.
pack-priv void
rewriteRequestURI(final HttpRequestWrapper request, final HttpRoute route, final boolean normalizeUri)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

httpProcessorback to summary
private final HttpProcessor httpProcessor
logback to summary
private final Log log
requestExecutorback to summary
private final ClientExecChain requestExecutor

Constructor Detail

ProtocolExecback to summary
public ProtocolExec(final ClientExecChain requestExecutor, final HttpProcessor httpProcessor)

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).
rewriteRequestURIback to summary
pack-priv void rewriteRequestURI(final HttpRequestWrapper request, final HttpRoute route, final boolean normalizeUri) throws ProtocolException