Package org.frankframework.http
Class HttpRequestRetryHandler
java.lang.Object
org.apache.http.impl.client.DefaultHttpRequestRetryHandler
org.frankframework.http.HttpRequestRetryHandler
- All Implemented Interfaces:
org.apache.http.client.HttpRequestRetryHandler
public class HttpRequestRetryHandler
extends org.apache.http.impl.client.DefaultHttpRequestRetryHandler
Only retries if no HttpEntity is present, or if the HttpEntity is repeatable.
This avoids a NonRepeatableRequestException and returns the original exception.
- Author:
- Niels Meijer
-
Field Summary
Fields inherited from class org.apache.http.impl.client.DefaultHttpRequestRetryHandler
INSTANCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisRepeatable(org.apache.http.HttpRequest request) Only attempt to retry the request if the request supports it!booleanretryRequest(IOException exception, int executionCount, org.apache.http.protocol.HttpContext context) Methods inherited from class org.apache.http.impl.client.DefaultHttpRequestRetryHandler
getRetryCount, handleAsIdempotent, isRequestSentRetryEnabled, requestIsAborted
-
Constructor Details
-
HttpRequestRetryHandler
public HttpRequestRetryHandler(int retryCount)
-
-
Method Details
-
retryRequest
public boolean retryRequest(IOException exception, int executionCount, org.apache.http.protocol.HttpContext context) - Specified by:
retryRequestin interfaceorg.apache.http.client.HttpRequestRetryHandler- Overrides:
retryRequestin classorg.apache.http.impl.client.DefaultHttpRequestRetryHandler
-
isRepeatable
public boolean isRepeatable(org.apache.http.HttpRequest request) Only attempt to retry the request if the request supports it! See org.apache.http.impl.execchain.RequestEntityProxy#isRepeatable(HttpRequest)
-