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

public final Class RedirectExec

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.net.URI, java.util.Objects, org.apache.hc.client5.http.CircularRedirectException, .HttpRoute, .RedirectException, org.apache.hc.client5.http.auth.AuthExchange, org.apache.hc.client5.http.classic.ExecChain, .ExecChainHandler, 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.ClassicHttpRequest, .ClassicHttpResponse, .HttpEntity, .HttpException, .HttpHost, .HttpStatus, .Method, .ProtocolException, org.apache.hc.core5.http.io.entity.EntityUtils, org.apache.hc.core5.http.io.support.ClassicRequestBuilder, org.apache.hc.core5.util.Args, org.slf4j.Logger, .LoggerFactory

Request execution handler in the classic 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
4.3

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
RedirectExec(final HttpRoutePlanner routePlanner, final RedirectStrategy redirectStrategy)

Method Summary

Modifier and TypeMethod and Description
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

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

Constructor Detail

RedirectExecback to summary
public RedirectExec(final HttpRoutePlanner routePlanner, final RedirectStrategy redirectStrategy)

Method Detail

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