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
MessageSessionThe 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
MessageSessionThe message session.
message
BrokeredMessageThe 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
ExceptionThe exception occurred that caused the lost session.
Returns
- Task
The task object representing the asynchronous operation.