@Immutable public class DefaultHttpRequestRetryHandler extends Object implements HttpRequestRetryHandler
HttpRequestRetryHandler
used by request executors.Constructor and Description |
---|
DefaultHttpRequestRetryHandler()
Default constructor
|
DefaultHttpRequestRetryHandler(int retryCount,
boolean requestSentRetryEnabled)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getRetryCount() |
protected boolean |
handleAsIdempotent(HttpRequest request) |
boolean |
isRequestSentRetryEnabled() |
protected boolean |
requestIsAborted(HttpRequest request) |
boolean |
retryRequest(IOException exception,
int executionCount,
HttpContext context)
Used
retryCount and requestSentRetryEnabled to determine
if the given method should be retried. |
public DefaultHttpRequestRetryHandler(int retryCount, boolean requestSentRetryEnabled)
public DefaultHttpRequestRetryHandler()
public boolean retryRequest(IOException exception, int executionCount, HttpContext context)
retryCount
and requestSentRetryEnabled
to determine
if the given method should be retried.retryRequest
in interface HttpRequestRetryHandler
exception
- the exception that occurredexecutionCount
- the number of times this method has been
unsuccessfully executedcontext
- the context for the request executiontrue
if the method should be retried, false
otherwisepublic boolean isRequestSentRetryEnabled()
true
if this handler will retry methods that have
successfully sent their request, false
otherwisepublic int getRetryCount()
protected boolean handleAsIdempotent(HttpRequest request)
protected boolean requestIsAborted(HttpRequest request)
Copyright © 1999–2013 The Apache Software Foundation. All rights reserved.