public class ExponentialHttpRetryInterceptor extends Object implements okhttp3.Interceptor
The following retrievable IOException
The following retrievable HTTP status codes are defined:
The following retrievable HTTP method which is idempotent are defined:
Constructor and Description |
---|
ExponentialHttpRetryInterceptor(int maxRetries) |
Modifier and Type | Method and Description |
---|---|
long |
getRetryIntervalInMilliseconds(okhttp3.Response response,
int execCount) |
okhttp3.Response |
intercept(okhttp3.Interceptor.Chain chain) |
boolean |
needRetry(okhttp3.Response response,
int execCount) |
boolean |
needRetry(String method,
IOException e,
int execCount) |
public ExponentialHttpRetryInterceptor(int maxRetries)
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException
intercept
in interface okhttp3.Interceptor
IOException
public boolean needRetry(okhttp3.Response response, int execCount)
public boolean needRetry(String method, IOException e, int execCount)
public long getRetryIntervalInMilliseconds(okhttp3.Response response, int execCount)
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.