org.springframework.integration.channel.interceptor
Class MessageStoringInterceptor
java.lang.Object
org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter
org.springframework.integration.channel.interceptor.MessageStoringInterceptor
- All Implemented Interfaces:
- ChannelInterceptor
public class MessageStoringInterceptor
- extends ChannelInterceptorAdapter
A ChannelInterceptor
that delegates to a MessageStore
.
Upon sending to the channel, the message will be added to the store,
and upon receiving from the channel, the message will be removed from
the store.
- Author:
- Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private final org.apache.commons.logging.Log logger
messageStore
private final MessageStore messageStore
initialized
private volatile boolean initialized
initializationMonitor
private final java.lang.Object initializationMonitor
MessageStoringInterceptor
public MessageStoringInterceptor(MessageStore messageStore)
preSend
public Message<?> preSend(Message<?> message,
MessageChannel channel)
- Specified by:
preSend
in interface ChannelInterceptor
- Overrides:
preSend
in class ChannelInterceptorAdapter
preReceive
public boolean preReceive(MessageChannel channel)
- Specified by:
preReceive
in interface ChannelInterceptor
- Overrides:
preReceive
in class ChannelInterceptorAdapter
postReceive
public Message<?> postReceive(Message<?> message,
MessageChannel channel)
- Specified by:
postReceive
in interface ChannelInterceptor
- Overrides:
postReceive
in class ChannelInterceptorAdapter