Class ImmutableMessageChannelInterceptor
java.lang.Object
org.springframework.messaging.support.ImmutableMessageChannelInterceptor
- All Implemented Interfaces:
- ChannelInterceptor
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.
- Since:
- 4.1.2
- Author:
- Rossen Stoyanchev
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionMessage<?> preSend(Message<?> message, MessageChannel channel) Invoked before the Message is actually sent to the channel.Methods inherited from class Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ChannelInterceptorafterReceiveCompletion, afterSendCompletion, postReceive, postSend, preReceive
- 
Constructor Details- 
ImmutableMessageChannelInterceptorpublic ImmutableMessageChannelInterceptor()
 
- 
- 
Method Details- 
preSendDescription copied from interface:ChannelInterceptorInvoked before the Message is actually sent to the channel. This allows for modification of the Message if necessary. If this method returnsnullthen the actual send invocation will not occur.- Specified by:
- preSendin interface- ChannelInterceptor
 
 
-