Show / Hide Table of Contents

Class IRetryHandler

Interface for retry handler

Inheritance
object
HttpMessageHandler
DelegatingHandler
IRetryHandler
ExponentialRetryHandler
LinearRetryHandler
NoRetryHandler
Implements
IDisposable
Inherited Members
DelegatingHandler.InnerHandler
HttpMessageHandler.Dispose()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: QarnotSDK
Assembly: QarnotSDK.dll
Syntax
public abstract class IRetryHandler : DelegatingHandler, IDisposable

Constructors

IRetryHandler(int, int)

IRetryHandler constructor

Declaration
protected IRetryHandler(int maxRetries = 3, int interval = 500)
Parameters
Type Name Description
int maxRetries

maximum number of retry

int interval

handler retry interval

IRetryHandler(HttpMessageHandler, int, int)

IRetryHandler constructor

Declaration
protected IRetryHandler(HttpMessageHandler innerHandler, int maxRetries = 3, int interval = 500)
Parameters
Type Name Description
HttpMessageHandler innerHandler

http inner handler

int maxRetries

maximum number of retry

int interval

handler retry interval

Fields

DefaultMaxRetry

Default number of retry

Declaration
public const int DefaultMaxRetry = 3
Field Value
Type Description
int

DefaultRetryInterval

Default retry interval between 2 tries in milliseconds.

Declaration
public const int DefaultRetryInterval = 500
Field Value
Type Description
int

TransientStatusCodes

List of transient status code that will result in a retry

Declaration
protected static readonly List<HttpStatusCode> TransientStatusCodes
Field Value
Type Description
List<HttpStatusCode>

Properties

MaxRetries

Maximum retry number

Declaration
public virtual int MaxRetries { get; set; }
Property Value
Type Description
int

RetryInterval

Handler retry interval

Declaration
public virtual int RetryInterval { get; set; }
Property Value
Type Description
int

Methods

Dispose(bool)

Dispose the handler

Declaration
protected override void Dispose(bool disposing)
Parameters
Type Name Description
bool disposing

is disposing

Overrides
DelegatingHandler.Dispose(bool)

SendAsync(HttpRequestMessage, CancellationToken)

Handle asynchrone request, defaulting to the base delegating.

Declaration
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
Type Name Description
HttpRequestMessage request

the Http request

CancellationToken cancellationToken

cancellationg token to cancel the async request

Returns
Type Description
Task<HttpResponseMessage>

the HttpResponseMessage

Overrides
DelegatingHandler.SendAsync(HttpRequestMessage, CancellationToken)

Implements

IDisposable
In this article
Back to top Generated by DocFX