Package com.microsoft.graph.httpcore
Class RetryHandler
java.lang.Object
com.microsoft.graph.httpcore.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 TypeFieldDescriptionType of the current middlewarestatic intGateway timeout status codestatic intService unavailable status codestatic intToo many requests status codeFields inherited from interface okhttp3.Interceptor
Companion -
Constructor Summary
ConstructorsConstructorDescriptionInitialize retry handler with default retry optionRetryHandler(RetryOptions retryOption)RetryHandler(ILogger logger, RetryOptions retryOption) -
Method Summary
-
Field Details
-
MIDDLEWARE_TYPE
Type of the current middleware -
MSClientErrorCodeTooManyRequests
public static final int MSClientErrorCodeTooManyRequestsToo many requests status code- See Also:
- Constant Field Values
-
MSClientErrorCodeGatewayTimeout
public static final int MSClientErrorCodeGatewayTimeoutGateway timeout status code- See Also:
- Constant Field Values
-
-
Constructor Details
-
RetryHandler
- Parameters:
retryOption- Create Retry handler using retry option
-
RetryHandler
- Parameters:
retryOption- Create Retry handler using retry optionlogger- logger to use for telemetry
-
RetryHandler
public RetryHandler()Initialize retry handler with default retry option
-
-
Method Details
-
intercept
@Nonnull public okhttp3.Response intercept(@Nonnull okhttp3.Interceptor.Chain chain) throws IOException- Specified by:
interceptin interfaceokhttp3.Interceptor- Throws:
IOException
-