Class RetryHandler
java.lang.Object
com.microsoft.kiota.http.middleware.RetryHandler
- All Implemented Interfaces:
okhttp3.Interceptor
The middleware responsible for retrying requests when they fail because of transient issues
-
Nested Class Summary
Nested classes/interfaces inherited from interface okhttp3.Interceptor
okhttp3.Interceptor.Chain, okhttp3.Interceptor.Companion -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intGateway timeout status codestatic final intService unavailable status codestatic final intToo many requests status codeFields inherited from interface okhttp3.Interceptor
Companion -
Constructor Summary
ConstructorsConstructorDescriptionInitialize retry handler with default retry optionRetryHandler(RetryHandlerOption retryOption) Initialize retry handler with retry option -
Method Summary
Modifier and TypeMethodDescriptionGets the retry options in use by the handler.okhttp3.Responseintercept(okhttp3.Interceptor.Chain chain)
-
Field Details
-
MSClientErrorCodeTooManyRequests
public static final int MSClientErrorCodeTooManyRequestsToo many requests status code- See Also:
-
MSClientErrorCodeGatewayTimeout
public static final int MSClientErrorCodeGatewayTimeoutGateway timeout status code- See Also:
-
-
Constructor Details
-
RetryHandler
Initialize retry handler with retry option- Parameters:
retryOption- Create Retry handler using retry option
-
RetryHandler
public RetryHandler()Initialize retry handler with default retry option
-
-
Method Details
-
getRetryOptions
Gets the retry options in use by the handler.- Returns:
- the retry options in use by the handler.
-
intercept
- Specified by:
interceptin interfaceokhttp3.Interceptor- Throws:
IOException
-