接口 RetryWhen

所有已知实现类:
DefaultRetryWhen
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface RetryWhen
回调函数: 是否触发重试
从以下版本开始:
1.5.2
作者:
gongjun [dt_flys@hotmail.com]
  • 方法详细资料

    • retryWhen

      boolean retryWhen(ForestRequest req, ForestResponse res)
      回调函数: 是否触发重试

      该回调函数每次请求响应后或失败后被调用,其返回值将决定这次请求是否需要重试

      参数:
      req - Forest请求对象
      res - Forest响应对象
      返回:
      true 触发重试, 否则不触发重试