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

public final Class AsyncRedirectExec

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, java.net.URI, java.util.Objects, org.apache.hc.client5.http.CircularRedirectException, .HttpRoute, .RedirectException, org.apache.hc.client5.http.async.AsyncExecCallback, .AsyncExecChain, .AsyncExecChainHandler, org.apache.hc.client5.http.auth.AuthExchange, org.apache.hc.client5.http.config.RequestConfig, org.apache.hc.client5.http.protocol.HttpClientContext, .RedirectLocations, .RedirectStrategy, org.apache.hc.client5.http.routing.HttpRoutePlanner, org.apache.hc.client5.http.utils.URIUtils, org.apache.hc.core5.annotation.Contract, .Internal, .ThreadingBehavior, org.apache.hc.core5.http.EntityDetails, .HttpException, .HttpHost, .HttpRequest, .HttpResponse, .HttpStatus, .Method, .ProtocolException, org.apache.hc.core5.http.nio.AsyncDataConsumer, .AsyncEntityProducer, org.apache.hc.core5.http.support.BasicRequestBuilder, org.slf4j.Logger, .LoggerFactory

Request execution handler in the asynchronous request execution chain responsible for handling of request redirects.

Further responsibilities such as communication with the opposite endpoint is delegated to the next executor in the request execution chain.

Since
5.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final Logger
private final RedirectStrategy
private final HttpRoutePlanner

Constructor Summary

AccessConstructor and Description
pack-priv
AsyncRedirectExec(final HttpRoutePlanner routePlanner, final RedirectStrategy redirectStrategy)

Method Summary

Modifier and TypeMethod and Description
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 void
internalExecute(final AsyncRedirectExec.State state, final AsyncExecChain chain, final AsyncExecCallback asyncExecCallback)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final Logger LOG
redirectStrategyback to summary
private final RedirectStrategy redirectStrategy
routePlannerback to summary
private final HttpRoutePlanner routePlanner

Constructor Detail

AsyncRedirectExecback to summary
pack-priv AsyncRedirectExec(final HttpRoutePlanner routePlanner, final RedirectStrategy redirectStrategy)

Method Detail

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
internalExecuteback to summary
private void internalExecute(final AsyncRedirectExec.State state, final AsyncExecChain chain, final AsyncExecCallback asyncExecCallback) throws HttpException, IOException
org.apache.hc.client5.http.impl.async back to summary

private Class AsyncRedirectExec.State

extends Object
Class Inheritance
  • java.lang.Object
  • org.apache.hc.client5.http.impl.async.AsyncRedirectExec.State

Field Summary

Modifier and TypeField and Description
pack-priv volatile AsyncEntityProducer
pack-priv volatile HttpRequest
pack-priv volatile AsyncExecChain.Scope
pack-priv volatile int
pack-priv volatile HttpRequest
pack-priv volatile int
pack-priv volatile RedirectLocations
pack-priv volatile URI
pack-priv volatile boolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currentEntityProducerback to summary
pack-priv volatile AsyncEntityProducer currentEntityProducer
currentRequestback to summary
pack-priv volatile HttpRequest currentRequest
currentScopeback to summary
pack-priv volatile AsyncExecChain.Scope currentScope
maxRedirectsback to summary
pack-priv volatile int maxRedirects
originalRequestback to summary
pack-priv volatile HttpRequest originalRequest
redirectCountback to summary
pack-priv volatile int redirectCount
redirectLocationsback to summary
pack-priv volatile RedirectLocations redirectLocations
redirectURIback to summary
pack-priv volatile URI redirectURI
rerouteback to summary
pack-priv volatile boolean reroute

Constructor Detail

Stateback to summary
private State()