public class ImmutableMessageChannelInterceptor extends ChannelInterceptorAdapter
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.
Constructor and Description |
---|
ImmutableMessageChannelInterceptor() |
Modifier and Type | Method and Description |
---|---|
Message<?> |
preSend(Message<?> message,
MessageChannel channel)
Invoked before the Message is actually sent to the channel.
|
afterReceiveCompletion, afterSendCompletion, postReceive, postSend, preReceive
public Message<?> preSend(Message<?> message, MessageChannel channel)
ChannelInterceptor
null
then the actual
send invocation will not occur.preSend
in interface ChannelInterceptor
preSend
in class ChannelInterceptorAdapter