RetryPolicy

sealed class RetryPolicy

The RetryPolicy returned by a RequestInterceptor to decide if and when a failed request is retried.

DoNotRetry means that the interceptor has no opinion: the next interceptor is asked, and the request completes with its result if none of them proposes a retry. AfterDelay and AfterEvent propose a retry.

See also

Inheritors

Types

Link copied to clipboard
class AfterDelay(val delay: TimeFrame) : RetryPolicy

AfterDelay retries the request once the given delay has elapsed.

Link copied to clipboard
class AfterEvent(val event: Observable<*>) : RetryPolicy

AfterEvent retries the request when the given event emits.

Link copied to clipboard

DoNotRetry completes the request with its result, unless another interceptor proposes a retry.