@Contract(threading=STATELESS) @Internal public class HttpRequestRetryExec extends Object implements ExecChainHandler
Further responsibilities such as communication with the opposite endpoint is delegated to the next executor in the request execution chain.
If this handler is active, pay particular attention to the placement
of other handlers within the handler chain relative to the retry handler.
Use ChainElement.RETRY
as name when referring to this handler.
If a custom handler is placed before the retry handler, the handler will see the initial request and the final outcome after the last retry. Elapsed time will account for any delays imposed by the retry handler.
A custom handler which is placed after the retry handler will be invoked for each individual retry. Elapsed time will measure each individual http request, without the delay imposed by the retry handler.
Constructor and Description |
---|
HttpRequestRetryExec(HttpRequestRetryStrategy retryStrategy) |
Modifier and Type | Method and Description |
---|---|
org.apache.hc.core5.http.ClassicHttpResponse |
execute(org.apache.hc.core5.http.ClassicHttpRequest request,
ExecChain.Scope scope,
ExecChain chain)
Executes the actual HTTP request.
|
public HttpRequestRetryExec(HttpRequestRetryStrategy retryStrategy)
public org.apache.hc.core5.http.ClassicHttpResponse execute(org.apache.hc.core5.http.ClassicHttpRequest request, ExecChain.Scope scope, ExecChain chain) throws IOException, org.apache.hc.core5.http.HttpException
ExecChainHandler
execute
in interface ExecChainHandler
request
- the actual request.scope
- the execution scope .chain
- the next element in the request execution chain.IOException
org.apache.hc.core5.http.HttpException
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.