Package nl.nn.adapterframework.http
Class HttpRequestRetryHandler
- java.lang.Object
-
- org.apache.http.impl.client.DefaultHttpRequestRetryHandler
-
- nl.nn.adapterframework.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
-
-
Constructor Summary
Constructors Constructor Description HttpRequestRetryHandler(int retryCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)boolean
retryRequest(IOException exception, int executionCount, org.apache.http.protocol.HttpContext context)
-
-
-
Method Detail
-
retryRequest
public boolean retryRequest(IOException exception, int executionCount, org.apache.http.protocol.HttpContext context)
- Specified by:
retryRequest
in interfaceorg.apache.http.client.HttpRequestRetryHandler
- Overrides:
retryRequest
in 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)
-
-