Table of Contents

Class MessageSessionHandler

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

Represents the handler associated with the message session.

public abstract class MessageSessionHandler : IMessageSessionHandler
Inheritance
MessageSessionHandler
Implements
Inherited Members

Constructors

MessageSessionHandler()

Initializes a new instance of the MessageSessionHandler class.

protected MessageSessionHandler()

Methods

OnCloseSession(MessageSession)

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

protected virtual void OnCloseSession(MessageSession session)

Parameters

session MessageSession

The closed session.

OnMessage(MessageSession, BrokeredMessage)

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

protected abstract void OnMessage(MessageSession session, BrokeredMessage message)

Parameters

session MessageSession

The message session.

message BrokeredMessage

The brokered message.

OnSessionLost(Exception)

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

protected virtual void OnSessionLost(Exception exception)

Parameters

exception Exception

The exception occurred that caused the lost session.