Interface IChannelInterceptor
Interface for interceptors that are able to view and/or modify the Messages being sent-to and/or received-from a MessageChannel
Namespace: Steeltoe.Messaging.Support
Assembly: Steeltoe.Messaging.Abstractions.dll
Syntax
public interface IChannelInterceptor
Methods
| Edit this page View SourceAfterReceiveCompletion(IMessage, IMessageChannel, Exception)
Invoked after the completion of a receive regardless of any exception that have been raised thus allowing for proper resource cleanup.
Declaration
void AfterReceiveCompletion(IMessage message, IMessageChannel channel, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
IMessage | message | the message being processed |
IMessageChannel | channel | the channel the message is from |
Exception | exception | the exception that may have occured; can be null |
AfterSendCompletion(IMessage, IMessageChannel, Boolean, Exception)
Invoked after the completion of a send regardless of any exception that have been raised thus allowing for proper resource cleanup.
Declaration
void AfterSendCompletion(IMessage message, IMessageChannel channel, bool sent, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
IMessage | message | the message being processed |
IMessageChannel | channel | the channel the message for |
System.Boolean | sent | the return value of the send |
Exception | exception | the exception that may have occured; can be null |
PostReceive(IMessage, IMessageChannel)
Invoked immediately after a Message has been retrieved but before it is returned to the caller.
Declaration
IMessage PostReceive(IMessage message, IMessageChannel channel)
Parameters
Type | Name | Description |
---|---|---|
IMessage | message | the message being processed |
IMessageChannel | channel | the channel the message is from |
Returns
Type | Description |
---|---|
IMessage | the resulting message after post processing; can be null |
PostSend(IMessage, IMessageChannel, Boolean)
Invoked immediately after the send invocation.
Declaration
void PostSend(IMessage message, IMessageChannel channel, bool sent)
Parameters
Type | Name | Description |
---|---|---|
IMessage | message | the message being processed |
IMessageChannel | channel | the channel the message for |
System.Boolean | sent | the return value of the send |
PreReceive(IMessageChannel)
Invoked as soon as receive is called and before a Message is actually retrieved.
Declaration
bool PreReceive(IMessageChannel channel)
Parameters
Type | Name | Description |
---|---|---|
IMessageChannel | channel | the channel the message for |
Returns
Type | Description |
---|---|
System.Boolean | false if no receive should be done; |
PreSend(IMessage, IMessageChannel)
Invoked before the Message is actually sent to the channel. This allows for modification of the Message if necessary.
Declaration
IMessage PreSend(IMessage message, IMessageChannel channel)
Parameters
Type | Name | Description |
---|---|---|
IMessage | message | the message being processed |
IMessageChannel | channel | the channel the message for |
Returns
Type | Description |
---|---|
IMessage | the resulting message to send; can be null |