Table of Contents

Interface ITaskSchedulerChannelInterceptor

Namespace
Steeltoe.Messaging.Support
Assembly
Steeltoe.Messaging.Abstractions.dll

A specialized ChannelInterceptor for TaskScheduler based channels

public interface ITaskSchedulerChannelInterceptor : IChannelInterceptor, IOrdered
Inherited Members

Methods

AfterMessageHandled(IMessage, IMessageChannel, IMessageHandler, Exception)

Invoked inside the Task submitted to the Scheduler after calling the target MessageHandler regardless of the outcome (i.e.Exception raised or not) thus allowing for proper resource cleanup.

void AfterMessageHandled(IMessage message, IMessageChannel channel, IMessageHandler handler, Exception exception)

Parameters

message IMessage

the message to be handled

channel IMessageChannel

the channel the message is for

handler IMessageHandler

the target handler to handle the message

exception Exception

any exception that might have occured

BeforeHandled(IMessage, IMessageChannel, IMessageHandler)

Invoked inside the Task submitted to the Scheduler just before calling the target MessageHandler to handle the message.

IMessage BeforeHandled(IMessage message, IMessageChannel channel, IMessageHandler handler)

Parameters

message IMessage

the message to be handled

channel IMessageChannel

the channel the message is for

handler IMessageHandler

the target handler to handle the message

Returns

IMessage

the processed message; can be new message or null