@Contract(threading=IMMUTABLE_CONDITIONAL) public class BackoffStrategyExec extends Object implements ClientExecChain
Modifier and Type | Field and Description |
---|---|
private BackoffManager |
backoffManager |
private ConnectionBackoffStrategy |
connectionBackoffStrategy |
private ClientExecChain |
requestExecutor |
Constructor and Description |
---|
BackoffStrategyExec(ClientExecChain requestExecutor,
ConnectionBackoffStrategy connectionBackoffStrategy,
BackoffManager backoffManager) |
Modifier and Type | Method and Description |
---|---|
CloseableHttpResponse |
execute(HttpRoute route,
HttpRequestWrapper request,
HttpClientContext context,
HttpExecutionAware execAware)
Executes th request either by transmitting it to the target server or
by passing it onto the next executor in the request execution chain.
|
private final ClientExecChain requestExecutor
private final ConnectionBackoffStrategy connectionBackoffStrategy
private final BackoffManager backoffManager
public BackoffStrategyExec(ClientExecChain requestExecutor, ConnectionBackoffStrategy connectionBackoffStrategy, BackoffManager backoffManager)
public CloseableHttpResponse execute(HttpRoute route, HttpRequestWrapper request, HttpClientContext context, HttpExecutionAware execAware) throws IOException, HttpException
ClientExecChain
execute
in interface ClientExecChain
route
- connection route.request
- current request.context
- current HTTP context.execAware
- receiver of notifications of blocking I/O operations.IOException
- in case of a I/O error.
(this type of exceptions are potentially recoverable).HttpException
- in case of an HTTP protocol error
(usually this type of exceptions are non-recoverable).WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses