Class IgnitionHttpRequestRetryStrategy
java.lang.Object
org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy
com.inductiveautomation.ignition.common.http.IgnitionHttpRequestRetryStrategy
- All Implemented Interfaces:
org.apache.hc.client5.http.HttpRequestRetryStrategy
public final class IgnitionHttpRequestRetryStrategy
extends org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy
Retry strategy applied to Ignition's HTTP clients.
Transport failures -- a dropped connection, a socket error -- are retried once on idempotent
requests. Responses are never retried: a server that answers at all, including with 429
or 503, is reported to the caller as-is.
Install on a client with HttpClientBuilder#setRetryStrategy(INSTANCE).
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanretryRequest(org.apache.hc.core5.http.HttpResponse response, int execCount, org.apache.hc.core5.http.protocol.HttpContext context) Returns false always, so no response is ever retried.Methods inherited from class org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy
getRetryInterval, handleAsIdempotent, retryRequestMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hc.client5.http.HttpRequestRetryStrategy
getRetryInterval
-
Field Details
-
INSTANCE
-
-
Method Details
-
retryRequest
public boolean retryRequest(org.apache.hc.core5.http.HttpResponse response, int execCount, org.apache.hc.core5.http.protocol.HttpContext context) Returns false always, so no response is ever retried.- Specified by:
retryRequestin interfaceorg.apache.hc.client5.http.HttpRequestRetryStrategy- Overrides:
retryRequestin classorg.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy- Parameters:
response- the response to evaluateexecCount- the number of times this request has already been executedcontext- the active context, if any- Returns:
- false always, so no response is ever retried
-