spring-framework / org.springframework.messaging.support / ChannelInterceptorAdapter

ChannelInterceptorAdapter

abstract class ChannelInterceptorAdapter : ChannelInterceptor

A ChannelInterceptor base class with empty method implementations as a convenience.

Author
Mark Fisher

Author
Rossen Stoyanchev

Since
4.0

Constructors

<init>

ChannelInterceptorAdapter()

A ChannelInterceptor base class with empty method implementations as a convenience.

Functions

afterReceiveCompletion

open fun afterReceiveCompletion(message: Message<*>, channel: MessageChannel, ex: Exception): Unit

afterSendCompletion

open fun afterSendCompletion(message: Message<*>, channel: MessageChannel, sent: Boolean, ex: Exception): Unit

postReceive

open fun postReceive(message: Message<*>, channel: MessageChannel): Message<*>

postSend

open fun postSend(message: Message<*>, channel: MessageChannel, sent: Boolean): Unit

preReceive

open fun preReceive(channel: MessageChannel): Boolean

preSend

open fun preSend(message: Message<*>, channel: MessageChannel): Message<*>

Inheritors

ImmutableMessageChannelInterceptor

open class ImmutableMessageChannelInterceptor : ChannelInterceptorAdapter

A simpler interceptor that calls MessageHeaderAccessor#setImmutable() on the headers of messages passed through the preSend method.

When configured as the last interceptor in a chain, it allows the component sending the message to leave headers mutable for interceptors to modify prior to the message actually being sent and exposed to concurrent access.