Table of Contents

Class MessageSessionAsyncHandler

Namespace
Microsoft.ServiceBus.Messaging
Assembly
Microsoft.ServiceBus.dll

Represents the asynchronous handler associated with the message session.

public abstract class MessageSessionAsyncHandler : IMessageSessionAsyncHandler
Inheritance
MessageSessionAsyncHandler
Implements
Inherited Members

Constructors

MessageSessionAsyncHandler()

Initializes a new instance of the MessageSessionAsyncHandler class.

protected MessageSessionAsyncHandler()

Methods

OnCloseSessionAsync(MessageSession)

Raises an event that occurs when the session has been asynchronously closed.

protected virtual Task OnCloseSessionAsync(MessageSession session)

Parameters

session MessageSession

The closed session.

Returns

Task

The task object representing the asynchronous operation.

OnMessageAsync(MessageSession, BrokeredMessage)

Represents an event that occurs when the session has a brokered message.

protected abstract Task OnMessageAsync(MessageSession session, BrokeredMessage message)

Parameters

session MessageSession

The message session.

message BrokeredMessage

The brokered message.

Returns

Task

The task object representing the asynchronous operation.

OnSessionLostAsync(Exception)

Raises an event that occurs when the session has been lost.

protected virtual Task OnSessionLostAsync(Exception exception)

Parameters

exception Exception

The exception occurred that caused the lost session.

Returns

Task

The task object representing the asynchronous operation.