-
- All Implemented Interfaces:
-
apptentive.com.android.network.HttpRequestRetryPolicy
public final class DefaultHttpRequestRetryPolicy implements HttpRequestRetryPolicy
Default retry policy for HTTP-request (will be used unless overwritten).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDefaultHttpRequestRetryPolicy.Companion
-
Constructor Summary
Constructors Constructor Description DefaultHttpRequestRetryPolicy(Integer maxNumRetries, Double retryDelay)
-
Method Summary
Modifier and Type Method Description BooleanshouldRetry(Integer statusCode, Integer numRetries)Determines if request should be retried. DoublegetRetryDelay(Integer numRetries)Returns a delay for the next retry. -
-
Method Detail
-
shouldRetry
Boolean shouldRetry(Integer statusCode, Integer numRetries)
Determines if request should be retried.
- Parameters:
statusCode- HTTP-status code of the request.numRetries- number of times the request was already retried.
-
getRetryDelay
Double getRetryDelay(Integer numRetries)
Returns a delay for the next retry.
- Parameters:
numRetries- number of times the request was already retried.
-
-
-
-