Table of Contents

Class RequestHandler

Namespace
Microsoft.Azure.Cosmos
Assembly
Microsoft.Azure.Cosmos.Client.dll

Abstraction which allows defining of custom message handlers.

public abstract class RequestHandler
Inheritance
RequestHandler
Inherited Members
Extension Methods

Remarks

Custom implementations are required to be stateless.

Constructors

RequestHandler()

The default constructor for the RequestHandler

protected RequestHandler()

Properties

InnerHandler

Defines a next handler to be called in the chain.

public RequestHandler InnerHandler { get; set; }

Property Value

RequestHandler

Methods

SendAsync(RequestMessage, CancellationToken)

Processes the current RequestMessage in the current handler and sends the current RequestMessage to the next handler in the chain.

public virtual Task<ResponseMessage> SendAsync(RequestMessage request, CancellationToken cancellationToken)

Parameters

request RequestMessage

RequestMessage received by the handler.

cancellationToken CancellationToken

CancellationToken received by the handler.

Returns

Task<ResponseMessage>

An instance of ResponseMessage.