类 CustomHttpRequestRetryHandler

java.lang.Object
org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy
com.digiwin.dap.middleware.dwpay.common.comm.CustomHttpRequestRetryHandler
所有已实现的接口:
org.apache.hc.client5.http.HttpRequestRetryStrategy

public class CustomHttpRequestRetryHandler extends org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy
重试策略
作者:
fobgochod
另请参阅:
  • DefaultHttpRequestRetryStrategy
  • 字段详细资料

  • 构造器详细资料

    • CustomHttpRequestRetryHandler

      public CustomHttpRequestRetryHandler(int retryCount, boolean requestSentRetryEnabled)
      Default constructor
      参数:
      retryCount - 重试次数
      requestSentRetryEnabled - requestSentRetryEnabled
    • CustomHttpRequestRetryHandler

      public CustomHttpRequestRetryHandler()
      Default constructor
  • 方法详细资料

    • retryRequest

      public boolean retryRequest(org.apache.hc.core5.http.HttpRequest request, IOException exception, int executionCount, org.apache.hc.core5.http.protocol.HttpContext context)
      指定者:
      retryRequest 在接口中 org.apache.hc.client5.http.HttpRequestRetryStrategy
      覆盖:
      retryRequest 在类中 org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy
    • handleAsIdempotent

      protected boolean handleAsIdempotent(org.apache.hc.core5.http.HttpRequest request)
      是否幂等
      覆盖:
      handleAsIdempotent 在类中 org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy
      参数:
      request - 请求信息
      返回:
      true or false
    • trueDelayReturn

      protected boolean trueDelayReturn(IOException exception, org.apache.hc.core5.http.HttpRequest request, int executionCount)
      延迟重试
      参数:
      exception - 异常
      request - 请求信息
      executionCount - 次数
      返回:
      true