类 ImmutableMessageChannelInterceptor
- java.lang.Object
- org.springframework.messaging.support.ChannelInterceptorAdapter
- org.springframework.messaging.support.ImmutableMessageChannelInterceptor
- 所有已实现的接口:
ChannelInterceptor
public class ImmutableMessageChannelInterceptor extends ChannelInterceptorAdapter
A simpler interceptor that callsMessageHeaderAccessor.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.
- 从以下版本开始:
- 4.1.2
- 作者:
- Rossen Stoyanchev
构造器概要
构造器 构造器 说明 ImmutableMessageChannelInterceptor()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Message<?>preSend(Message<?> message, MessageChannel channel)Invoked before the Message is actually sent to the channel.从类继承的方法 org.springframework.messaging.support.ChannelInterceptorAdapter
afterReceiveCompletion, afterSendCompletion, postReceive, postSend, preReceive
构造器详细资料
ImmutableMessageChannelInterceptor
public ImmutableMessageChannelInterceptor()
方法详细资料
preSend
public Message<?> preSend(Message<?> message, MessageChannel channel)
从接口复制的说明: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.- 指定者:
preSend在接口中ChannelInterceptor- 覆盖:
preSend在类中ChannelInterceptorAdapter