Package com.ibm.cloud.sdk.core.http
Class DefaultRetryStrategy
- java.lang.Object
-
- com.ibm.cloud.sdk.core.http.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 Summary
Constructors Constructor Description DefaultRetryStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IRetryInterceptor
createRetryInterceptor(int maxRetries, int maxRetryInterval, Authenticator authenticator)
Return an implementation of theIRetryInterceptor
interface that is capable of retrying failed requests.
-
-
-
Method Detail
-
createRetryInterceptor
public IRetryInterceptor createRetryInterceptor(int maxRetries, int maxRetryInterval, Authenticator authenticator)
Description copied from interface:IRetryStrategy
Return an implementation of theIRetryInterceptor
interface that is capable of retrying failed requests.- Specified by:
createRetryInterceptor
in interfaceIRetryStrategy
- Parameters:
maxRetries
- the maximum number of retries to be attempted by the retry interceptormaxRetryInterval
- the maximum interval (in seconds)authenticator
- the Authenticator instance to be used to authenticate retried requests- Returns:
- an okhttp3.Interceptor instance
-
-