Interface ITaskSchedulerChannelInterceptor
A specialized ChannelInterceptor for TaskScheduler based channels
Inherited Members
Namespace: Steeltoe.Messaging.Support
Assembly: Steeltoe.Messaging.Abstractions.dll
Syntax
public interface ITaskSchedulerChannelInterceptor : IChannelInterceptor
Methods
| Edit this page View SourceAfterMessageHandled(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.
Declaration
void AfterMessageHandled(IMessage message, IMessageChannel channel, IMessageHandler handler, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
IMessage | message | the message to be handled |
IMessageChannel | channel | the channel the message is for |
IMessageHandler | handler | 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.
Declaration
IMessage BeforeHandled(IMessage message, IMessageChannel channel, IMessageHandler handler)
Parameters
Type | Name | Description |
---|---|---|
IMessage | message | the message to be handled |
IMessageChannel | channel | the channel the message is for |
IMessageHandler | handler | the target handler to handle the message |
Returns
Type | Description |
---|---|
IMessage | the processed message; can be new message or null |