RetryHandler Class
- java.
lang. Object - com.
microsoft. graph. httpcore. RetryHandler
- com.
Implements
public class RetryHandler
implements okhttp3.Interceptor
The middleware responsible for retrying requests when they fail because of transient issues
Field Summary
Modifier and Type | Field and Description |
---|---|
final
Middleware |
MIDDLEWARE_TYPE
Type of the current middleware |
static final int |
MSClientErrorCodeGatewayTimeout
Gateway timeout status code |
static final int |
MSClientErrorCodeServiceUnavailable
Service unavailable status code |
static final int |
MSClientErrorCodeTooManyRequests
Too many requests status code |
Constructor Summary
Constructor | Description | |
---|---|---|
RetryHandler() |
Initialize retry handler with default retry option |
|
RetryHandler(RetryOptions retryOption) | ||
RetryHandler(ILogger logger, RetryOptions retryOption) |
Method Summary
Modifier and Type | Method and Description |
---|---|
okhttp3.Response | intercept(Interceptor.Chain chain) |
Methods inherited from java.lang.Object
Field Details
MIDDLEWARE_TYPE
public final MiddlewareType MIDDLEWARE_TYPE
Type of the current middleware
MSClientErrorCodeGatewayTimeout
public static final int MSClientErrorCodeGatewayTimeout
Gateway timeout status code
MSClientErrorCodeServiceUnavailable
public static final int MSClientErrorCodeServiceUnavailable
Service unavailable status code
MSClientErrorCodeTooManyRequests
public static final int MSClientErrorCodeTooManyRequests
Too many requests status code
Constructor Details
RetryHandler
public RetryHandler()
Initialize retry handler with default retry option
RetryHandler
public RetryHandler(RetryOptions retryOption)
Parameters:
RetryHandler
public RetryHandler(ILogger logger, RetryOptions retryOption)
Parameters:
Method Details
intercept
public Response intercept(Interceptor.Chain chain)
Parameters:
Throws: