RetryHandler Class

  • java.lang.Object
    • com.microsoft.bot.restclient.retry.RetryHandler

Implements

okhttp3.Interceptor

public final class RetryHandler
implements okhttp3.Interceptor

An instance of this interceptor placed in the request pipeline handles retriable errors.

Constructor Summary

Constructor Description
RetryHandler()

Initialized an instance of RetryHandler class.

RetryHandler(RetryStrategy retryStrategy)

Initialized an instance of RetryHandler class.

Method Summary

Modifier and Type Method and Description
okhttp3.Response intercept(Interceptor.Chain chain)
RetryStrategy strategy()

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

RetryHandler

public RetryHandler()

Initialized an instance of RetryHandler class. Sets default retry strategy base on Exponential Backoff.

RetryHandler

public RetryHandler(RetryStrategy retryStrategy)

Initialized an instance of RetryHandler class.

Parameters:

retryStrategy - retry strategy to use.

Method Details

intercept

public Response intercept(Interceptor.Chain chain)

Parameters:

chain

Throws:

java.io.IOException

strategy

public RetryStrategy strategy()

Returns:

the strategy used by this handler

Applies to