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 TypeFieldDescriptionfinal MiddlewareTypeType of the current middlewarestatic 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(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:
-
MSClientErrorCodeGatewayTimeout
public static final int MSClientErrorCodeGatewayTimeoutGateway timeout status code- See Also:
-
-
Constructor Details
-
RetryHandler
- Parameters:
retryOption- Create Retry handler using retry option
-
RetryHandler
- Parameters:
logger- logger to use for telemetryretryOption- Create Retry handler using retry option
-
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
-