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

public final Class ConnectExec

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, org.apache.hc.client5.http.AuthenticationStrategy, .HttpRoute, .RouteTracker, .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.TunnelRefusedException, org.apache.hc.client5.http.impl.auth.AuthCacheKeeper, .HttpAuthenticator, org.apache.hc.client5.http.impl.routing.BasicRouteDirector, org.apache.hc.client5.http.protocol.HttpClientContext, org.apache.hc.client5.http.routing.HttpRouteDirector, org.apache.hc.core5.annotation.Contract, .Internal, .ThreadingBehavior, org.apache.hc.core5.http.ClassicHttpRequest, .ClassicHttpResponse, .ConnectionReuseStrategy, .HttpEntity, .HttpException, .HttpHeaders, .HttpHost, .HttpRequest, .HttpStatus, .HttpVersion, .Method, org.apache.hc.core5.http.io.entity.EntityUtils, org.apache.hc.core5.http.message.BasicClassicHttpRequest, .StatusLine, org.apache.hc.core5.http.protocol.HttpProcessor, org.apache.hc.core5.util.Args, org.slf4j.Logger, .LoggerFactory

Request execution handler in the classic request execution chain that is responsible for establishing connection to the target origin server as specified by the current connection route.
Since
5.0

Field Summary

Modifier and TypeField and Description
private final AuthCacheKeeper
private final HttpAuthenticator
private static final Logger
private final AuthenticationStrategy
private final HttpProcessor
private final ConnectionReuseStrategy
private final HttpRouteDirector

Constructor Summary

AccessConstructor and Description
public
ConnectExec(final ConnectionReuseStrategy reuseStrategy, final HttpProcessor proxyHttpProcessor, final AuthenticationStrategy proxyAuthStrategy, final SchemePortResolver schemePortResolver, final boolean authCachingDisabled)

Method Summary

Modifier and TypeMethod and Description
private boolean
createTunnelToProxy(final HttpRoute route, final int hop, final HttpClientContext context)

Creates a tunnel to an intermediate proxy.

private boolean
createTunnelToTarget(final String exchangeId, final HttpRoute route, final HttpRequest request, final ExecRuntime execRuntime, final HttpClientContext context)

Creates a tunnel to the target server.

public ClassicHttpResponse
execute(final ClassicHttpRequest
the actual request.
request
,
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.
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
proxyHttpProcessorback to summary
private final HttpProcessor proxyHttpProcessor
reuseStrategyback to summary
private final ConnectionReuseStrategy reuseStrategy
routeDirectorback to summary
private final HttpRouteDirector routeDirector

Constructor Detail

ConnectExecback to summary
public ConnectExec(final ConnectionReuseStrategy reuseStrategy, final HttpProcessor proxyHttpProcessor, final AuthenticationStrategy proxyAuthStrategy, final SchemePortResolver schemePortResolver, final boolean authCachingDisabled)

Method Detail

createTunnelToProxyback to summary
private boolean createTunnelToProxy(final HttpRoute route, final int hop, final HttpClientContext context) throws HttpException

Creates a tunnel to an intermediate proxy. This method is not implemented in this class. It just throws an exception here.

createTunnelToTargetback to summary
private boolean createTunnelToTarget(final String exchangeId, final HttpRoute route, final HttpRequest request, final ExecRuntime execRuntime, final HttpClientContext 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 processChallenge the connection with information about the tunnel, that is left to the caller.

executeback to summary
public ClassicHttpResponse execute(final ClassicHttpRequest request, 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
request:ClassicHttpRequest

the actual request.

scope:ExecChain.Scope

the execution scope .

chain:ExecChain

the next element in the request execution chain.

Annotations
@Override