类 CustomHttpRequestRetryHandler
java.lang.Object
org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy
com.digiwin.dap.middleware.emc.common.comm.CustomHttpRequestRetryHandler
- 所有已实现的接口:
org.apache.hc.client5.http.HttpRequestRetryStrategy
public class CustomHttpRequestRetryHandler
extends org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy
重试策略
- 作者:
- fobgochod
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器构造器说明Default constructorCustomHttpRequestRetryHandler(int retryCount, boolean requestSentRetryEnabled) -
方法概要
修饰符和类型方法说明protected booleanhandleAsIdempotent(org.apache.hc.core5.http.HttpRequest request) 是否幂等booleanretryRequest(org.apache.hc.core5.http.HttpRequest request, IOException exception, int executionCount, org.apache.hc.core5.http.protocol.HttpContext context) protected booleantrueDelayReturn(IOException exception, org.apache.hc.core5.http.HttpRequest request, int executionCount) 延迟重试从类继承的方法 org.apache.hc.client5.http.impl.DefaultHttpRequestRetryStrategy
getRetryInterval, retryRequest从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.apache.hc.client5.http.HttpRequestRetryStrategy
getRetryInterval
-
字段详细资料
-
INSTANCE
-
RETRY_ATTRIBUTE
- 另请参阅:
-
-
构造器详细资料
-
CustomHttpRequestRetryHandler
public CustomHttpRequestRetryHandler(int retryCount, boolean 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
-