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

public final Class BackoffStrategyExec

extends Object
implements ExecChainHandler
Class Inheritance
All Implemented Interfaces
org.apache.hc.client5.http.classic.ExecChainHandler
Annotations
@Contract
threading:STATELESS
Imports
java.io.IOException, org.apache.hc.client5.http.HttpRoute, org.apache.hc.client5.http.classic.BackoffManager, .ConnectionBackoffStrategy, .ExecChain, .ExecChainHandler, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.ClassicHttpRequest, .ClassicHttpResponse, .HttpException, org.apache.hc.core5.util.Args, org.slf4j.Logger, .LoggerFactory

Request execution handler in the classic request execution chain that is responsible for execution of an ConnectionBackoffStrategy.

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 BackoffManager
private final ConnectionBackoffStrategy
private static final Logger

Constructor Summary

AccessConstructor and Description
public
BackoffStrategyExec(final ConnectionBackoffStrategy
the strategy to determine whether to backoff based on the response or exception
connectionBackoffStrategy
,
final BackoffManager
the manager responsible for applying backoff and probing actions to the HTTP routes
backoffManager
)

Constructs a BackoffStrategyExec with the specified ConnectionBackoffStrategy and BackoffManager.

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

backoffManagerback to summary
private final BackoffManager backoffManager
connectionBackoffStrategyback to summary
private final ConnectionBackoffStrategy connectionBackoffStrategy
LOGback to summary
private static final Logger LOG

Constructor Detail

BackoffStrategyExecback to summary
public BackoffStrategyExec(final ConnectionBackoffStrategy connectionBackoffStrategy, final BackoffManager backoffManager)

Constructs a BackoffStrategyExec with the specified ConnectionBackoffStrategy and BackoffManager.

Parameters
connectionBackoffStrategy:ConnectionBackoffStrategy

the strategy to determine whether to backoff based on the response or exception

backoffManager:BackoffManager

the manager responsible for applying backoff and probing actions to the HTTP routes

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