Deprecated
(4.3) use HttpClientBuilder.
HttpClient implementation that can automatically retry the request in case of
a non-2xx response using the ServiceUnavailableRetryStrategy interface.
| Modifier and Type | Field and Description |
|---|---|
| private final HttpClient | |
| private final Log | |
| private final ServiceUnavailableRetryStrategy |
| Access | Constructor and Description |
|---|---|
| public | |
| public | AutoRetryHttpClient()
Constructs a |
| public | AutoRetryHttpClient(final ServiceUnavailableRetryStrategy
retry configuration module options config)Constructs a |
| public | AutoRetryHttpClient(final HttpClient
used to make origin requests client)Constructs a |
| Modifier and Type | Method and Description |
|---|---|
| public HttpResponse | execute(final HttpHost
the target host for the request.
Implementations may accept target, final HttpRequest null
if they can still determine a route, for example
to a default target or by inspecting the request.the request to execute request)Implements org. |
| public <T> T | execute(final HttpHost
the target host for the request.
Implementations may accept target, final HttpRequest null
if they can still determine a route, for example
to a default target or by inspecting the request.the request to execute request, final ResponseHandler<? extends T> the response handler responseHandler)Implements org. |
| public <T> T | execute(final HttpHost
the target host for the request.
Implementations may accept target, final HttpRequest null
if they can still determine a route, for example
to a default target or by inspecting the request.the request to execute request, final ResponseHandler<? extends T> the response handler responseHandler, final HttpContext the context to use for the execution, or
context)null to use the default contextImplements org. |
| public HttpResponse | execute(final HttpUriRequest
the request to execute request)Implements org. |
| public HttpResponse | execute(final HttpUriRequest
the request to execute request, final HttpContext the context to use for the execution, or
context)null to use the default contextImplements org. |
| public <T> T | execute(final HttpUriRequest
the request to execute request, final ResponseHandler<? extends T> the response handler responseHandler)Implements org. |
| public <T> T | execute(final HttpUriRequest
the request to execute request, final ResponseHandler<? extends T> the response handler responseHandler, final HttpContext the context to use for the execution, or
context)null to use the default contextImplements org. |
| public HttpResponse | execute(final HttpHost
the target host for the request.
Implementations may accept target, final HttpRequest null
if they can still determine a route, for example
to a default target or by inspecting the request.the request to execute request, final HttpContext the context to use for the execution, or
context)null to use the default contextImplements org. |
| public ClientConnectionManager | getConnectionManager()
Implements org.
Deprecated
as a consequence of
Obtains the connection manager used by this client.
ClientConnectionManager being deprecated.
|
| public HttpParams | getParams()
Implements org.
Deprecated
as a consequence of
Obtains the parameters for this client.
HttpParams being deprecated.
|
| backend | back to summary |
|---|---|
| private final HttpClient backend | |
| log | back to summary |
|---|---|
| private final Log log | |
| retryStrategy | back to summary |
|---|---|
| private final ServiceUnavailableRetryStrategy retryStrategy | |
| AutoRetryHttpClient | back to summary |
|---|---|
| public AutoRetryHttpClient(final HttpClient client, final ServiceUnavailableRetryStrategy retryStrategy) | |
| AutoRetryHttpClient | back to summary |
|---|---|
| public AutoRetryHttpClient() Constructs a | |
| AutoRetryHttpClient | back to summary |
|---|---|
| public AutoRetryHttpClient(final ServiceUnavailableRetryStrategy config) Constructs a
| |
| AutoRetryHttpClient | back to summary |
|---|---|
| public AutoRetryHttpClient(final HttpClient client) Constructs a
| |
| execute | back to summary |
|---|---|
| public HttpResponse execute(final HttpHost target, final HttpRequest request) throws IOException Implements org. Doc from org. Executes HTTP request using the default context.
| |
| execute | back to summary |
|---|---|
| public <T> T execute(final HttpHost target, final HttpRequest request, final ResponseHandler<? extends T> responseHandler) throws IOException Implements org. Doc from org. Executes HTTP request to the target using the default context and processes the response using the given response handler.
Implementing classes are required to ensure that the content entity
associated with the response is fully consumed and the underlying
connection is released back to the connection manager automatically
in all cases relieving individual
| |
| execute | back to summary |
|---|---|
| public <T> T execute(final HttpHost target, final HttpRequest request, final ResponseHandler<? extends T> responseHandler, final HttpContext context) throws IOException Implements org. Doc from org. Executes HTTP request to the target using the given context and processes the response using the given response handler.
Implementing classes are required to ensure that the content entity
associated with the response is fully consumed and the underlying
connection is released back to the connection manager automatically
in all cases relieving individual
| |
| execute | back to summary |
|---|---|
| public HttpResponse execute(final HttpUriRequest request) throws IOException Implements org. Doc from org. Executes HTTP request using the default context.
| |
| execute | back to summary |
|---|---|
| public HttpResponse execute(final HttpUriRequest request, final HttpContext context) throws IOException Implements org. Doc from org. Executes HTTP request using the given context.
| |
| execute | back to summary |
|---|---|
| public <T> T execute(final HttpUriRequest request, final ResponseHandler<? extends T> responseHandler) throws IOException Implements org. Doc from org. Executes HTTP request using the default context and processes the response using the given response handler.
Implementing classes are required to ensure that the content entity
associated with the response is fully consumed and the underlying
connection is released back to the connection manager automatically
in all cases relieving individual
| |
| execute | back to summary |
|---|---|
| public <T> T execute(final HttpUriRequest request, final ResponseHandler<? extends T> responseHandler, final HttpContext context) throws IOException Implements org. Doc from org. Executes HTTP request using the given context and processes the response using the given response handler.
Implementing classes are required to ensure that the content entity
associated with the response is fully consumed and the underlying
connection is released back to the connection manager automatically
in all cases relieving individual
| |
| execute | back to summary |
|---|---|
| public HttpResponse execute(final HttpHost target, final HttpRequest request, final HttpContext context) throws IOException Implements org. Doc from org. Executes HTTP request using the given context.
| |
| getConnectionManager | back to summary |
|---|---|
| public ClientConnectionManager getConnectionManager() Implements org. Doc from org. Deprecated as a consequence of Obtains the connection manager used by this client.
| |
| getParams | back to summary |
|---|---|
| public HttpParams getParams() Implements org. Doc from org. Deprecated as a consequence of Obtains the parameters for this client. These parameters will become defaults for all requests being executed with this client, and for the parameters of dependent objects in this client.
| |