Top Description Fields Constructors Methods
org.apache.hc.client5.http.impl.classic

public final Class ProtocolExec

extends Object
implements ExecChainHandler
Class Inheritance
All Implemented Interfaces
org.apache.hc.client5.http.classic.ExecChainHandler
Annotations
@Contract
threading:STATELESS
@Internal
Imports
java.io.IOException, java.util.Iterator, org.apache.hc.client5.http.AuthenticationStrategy, .HttpRoute, .SchemePortResolver, org.apache.hc.client5.http.auth.AuthExchange, .ChallengeType, org.apache.hc.client5.http.classic.ExecChain, .ExecChainHandler, .ExecRuntime, org.apache.hc.client5.http.config.RequestConfig, org.apache.hc.client5.http.impl.DefaultSchemePortResolver, .RequestSupport, org.apache.hc.client5.http.impl.auth.AuthCacheKeeper, .HttpAuthenticator, org.apache.hc.client5.http.protocol.HttpClientContext, org.apache.hc.core5.annotation.Contract, .Internal, .ThreadingBehavior, org.apache.hc.core5.http.ClassicHttpRequest, .ClassicHttpResponse, .Header, .HttpEntity, .HttpException, .HttpHeaders, .HttpHost, .HttpResponse, .Method, .ProtocolException, org.apache.hc.core5.http.io.entity.EntityUtils, org.apache.hc.core5.http.io.support.ClassicRequestBuilder, org.apache.hc.core5.net.URIAuthority, org.apache.hc.core5.util.Args, org.slf4j.Logger, .LoggerFactory

Request execution handler in the classic request execution chain that is responsible for implementation of HTTP specification requirements.

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 AuthCacheKeeper
private final HttpAuthenticator
private static final Logger
private final AuthenticationStrategy
private final SchemePortResolver
private final AuthenticationStrategy

Constructor Summary

AccessConstructor and Description
public
ProtocolExec(final AuthenticationStrategy targetAuthStrategy, final AuthenticationStrategy proxyAuthStrategy, final SchemePortResolver schemePortResolver, final boolean authCachingDisabled)

Method Summary

Modifier and TypeMethod and Description
public ClassicHttpResponse
execute(final ClassicHttpRequest
the actual request.
userRequest
,
final ExecChain.Scope
the execution scope .
scope
,
final ExecChain
the next element in the request execution chain.
chain
)

Implements org.apache.hc.client5.http.classic.ExecChainHandler.execute.

Executes the actual HTTP request.
private boolean
needAuthentication(final AuthExchange targetAuthExchange, final AuthExchange proxyAuthExchange, final HttpHost proxy, final HttpHost target, final String pathPrefix, final HttpResponse response, final HttpClientContext context)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

authCacheKeeperback to summary
private final AuthCacheKeeper authCacheKeeper
authenticatorback to summary
private final HttpAuthenticator authenticator
LOGback to summary
private static final Logger LOG
proxyAuthStrategyback to summary
private final AuthenticationStrategy proxyAuthStrategy
schemePortResolverback to summary
private final SchemePortResolver schemePortResolver
targetAuthStrategyback to summary
private final AuthenticationStrategy targetAuthStrategy

Constructor Detail

ProtocolExecback to summary
public ProtocolExec(final AuthenticationStrategy targetAuthStrategy, final AuthenticationStrategy proxyAuthStrategy, final SchemePortResolver schemePortResolver, final boolean authCachingDisabled)

Method Detail

executeback to summary
public ClassicHttpResponse execute(final ClassicHttpRequest userRequest, final ExecChain.Scope scope, final ExecChain chain) throws IOException, HttpException

Implements org.apache.hc.client5.http.classic.ExecChainHandler.execute.

Doc from org.apache.hc.client5.http.classic.ExecChainHandler.execute.

Executes the actual HTTP request. The handler can choose to return a response message or delegate request execution to the next element in the execution chain.

Parameters
userRequest:ClassicHttpRequest

the actual request.

scope:ExecChain.Scope

the execution scope .

chain:ExecChain

the next element in the request execution chain.

Annotations
@Override
needAuthenticationback to summary
private boolean needAuthentication(final AuthExchange targetAuthExchange, final AuthExchange proxyAuthExchange, final HttpHost proxy, final HttpHost target, final String pathPrefix, final HttpResponse response, final HttpClientContext context)