Class DefaultRetryStrategy

  • All Implemented Interfaces:
    IRetryStrategy

    public class DefaultRetryStrategy
    extends java.lang.Object
    implements IRetryStrategy
    This is the java core's default retry strategy. It will return instances of our RetryInterceptor implementation class.
    • Constructor Detail

      • DefaultRetryStrategy

        public DefaultRetryStrategy()
    • Method Detail

      • createRetryInterceptor

        public IRetryInterceptor createRetryInterceptor​(int maxRetries,
                                                        int maxRetryInterval,
                                                        Authenticator authenticator)
        Description copied from interface: IRetryStrategy
        Return an implementation of the IRetryInterceptor interface that is capable of retrying failed requests.
        Specified by:
        createRetryInterceptor in interface IRetryStrategy
        Parameters:
        maxRetries - the maximum number of retries to be attempted by the retry interceptor
        maxRetryInterval - the maximum interval (in seconds)
        authenticator - the Authenticator instance to be used to authenticate retried requests
        Returns:
        an okhttp3.Interceptor instance