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
    Modifier and Type
    Field
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy

    getRetryInterval, handleAsIdempotent, retryRequest

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.hc.client5.http.HttpRequestRetryStrategy

    getRetryInterval
  • Field Details

  • 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:
      retryRequest in interface org.apache.hc.client5.http.HttpRequestRetryStrategy
      Overrides:
      retryRequest in class org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy
      Parameters:
      response - the response to evaluate
      execCount - the number of times this request has already been executed
      context - the active context, if any
      Returns:
      false always, so no response is ever retried