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

public final Class AsyncConnectExec

extends Object
implements AsyncExecChainHandler
Class Inheritance
All Implemented Interfaces
org.apache.hc.client5.http.async.AsyncExecChainHandler
Annotations
@Contract
threading:STATELESS
@Internal
Imports
java.io.IOException, .InterruptedIOException, java.nio.ByteBuffer, java.util.List, java.util.concurrent.atomic.AtomicReference, org.apache.hc.client5.http.AuthenticationStrategy, .HttpRoute, .RouteTracker, .SchemePortResolver, org.apache.hc.client5.http.async.AsyncExecCallback, .AsyncExecChain, .AsyncExecChainHandler, .AsyncExecRuntime, org.apache.hc.client5.http.auth.AuthExchange, .ChallengeType, 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.concurrent.CancellableDependency, .FutureCallback, org.apache.hc.core5.http.EntityDetails, .Header, .HttpException, .HttpHost, .HttpRequest, .HttpResponse, .HttpStatus, .HttpVersion, .Method, org.apache.hc.core5.http.message.BasicHttpRequest, .StatusLine, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler, .AsyncDataConsumer, .AsyncEntityProducer, .CapacityChannel, .DataStreamChannel, .RequestChannel, org.apache.hc.core5.http.protocol.HttpContext, .HttpCoreContext, .HttpProcessor, org.apache.hc.core5.util.Args, org.slf4j.Logger, .LoggerFactory

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

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 HttpRouteDirector

Constructor Summary

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

Method Summary

Modifier and TypeMethod and Description
private void
createTunnel(final AsyncConnectExec.State state, final HttpHost proxy, final HttpHost nextHop, final AsyncExecChain.Scope scope, final AsyncExecCallback asyncExecCallback)

public void
execute(final HttpRequest
the actual request.
request
,
final AsyncEntityProducer
the request entity producer or null if the request does not enclose an entity.
entityProducer
,
final AsyncExecChain.Scope
the execution scope .
scope
,
final AsyncExecChain
the next element in the request execution chain.
chain
,
final AsyncExecCallback
the execution callback.
asyncExecCallback
)

Implements org.apache.hc.client5.http.async.AsyncExecChainHandler.execute.

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

private void
proceedToNextHop(final AsyncConnectExec.State state, final HttpRequest request, final AsyncEntityProducer entityProducer, final AsyncExecChain.Scope scope, final AsyncExecChain chain, final AsyncExecCallback asyncExecCallback)

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
routeDirectorback to summary
private final HttpRouteDirector routeDirector

Constructor Detail

AsyncConnectExecback to summary
public AsyncConnectExec(final HttpProcessor proxyHttpProcessor, final AuthenticationStrategy proxyAuthStrategy, final SchemePortResolver schemePortResolver, final boolean authCachingDisabled)

Method Detail

createTunnelback to summary
private void createTunnel(final AsyncConnectExec.State state, final HttpHost proxy, final HttpHost nextHop, final AsyncExecChain.Scope scope, final AsyncExecCallback asyncExecCallback) throws HttpException, IOException
executeback to summary
public void execute(final HttpRequest request, final AsyncEntityProducer entityProducer, final AsyncExecChain.Scope scope, final AsyncExecChain chain, final AsyncExecCallback asyncExecCallback) throws HttpException, IOException

Implements org.apache.hc.client5.http.async.AsyncExecChainHandler.execute.

Doc from org.apache.hc.client5.http.async.AsyncExecChainHandler.execute.

Executes the actual HTTP request. The handler can choose to return a response message immediately inside the call or asynchronously at some later point or delegate request execution to the next element in the execution chain.

Parameters
request:HttpRequest

the actual request.

entityProducer:AsyncEntityProducer

the request entity producer or null if the request does not enclose an entity.

scope:AsyncExecChain.Scope

the execution scope .

chain:AsyncExecChain

the next element in the request execution chain.

asyncExecCallback:AsyncExecCallback

the execution callback.

Annotations
@Override
needAuthenticationback to summary
private boolean needAuthentication(final AuthExchange proxyAuthExchange, final HttpHost proxy, final HttpResponse response, final HttpClientContext context)
proceedToNextHopback to summary
private void proceedToNextHop(final AsyncConnectExec.State state, final HttpRequest request, final AsyncEntityProducer entityProducer, final AsyncExecChain.Scope scope, final AsyncExecChain chain, final AsyncExecCallback asyncExecCallback)
org.apache.hc.client5.http.impl.async back to summary

pack-priv Class AsyncConnectExec.State

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv volatile boolean
pack-priv final RouteTracker
pack-priv volatile boolean

Constructor Summary

AccessConstructor and Description
pack-priv
State(final HttpRoute route)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

challengedback to summary
pack-priv volatile boolean challenged
trackerback to summary
pack-priv final RouteTracker tracker
tunnelRefusedback to summary
pack-priv volatile boolean tunnelRefused

Constructor Detail

Stateback to summary
pack-priv State(final HttpRoute route)