Spring Integration

org.springframework.integration.channel.interceptor
Class MessageSelectingInterceptor

java.lang.Object
  extended by org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter
      extended by org.springframework.integration.channel.interceptor.MessageSelectingInterceptor
All Implemented Interfaces:
ChannelInterceptor

public class MessageSelectingInterceptor
extends ChannelInterceptorAdapter

A ChannelInterceptor that delegates to a list of MessageSelectors to decide whether a Message should be accepted on the MessageChannel.

Author:
Mark Fisher

Constructor Summary
MessageSelectingInterceptor(MessageSelector... selectors)
           
 
Method Summary
 Message<?> preSend(Message<?> message, MessageChannel channel)
          Invoked before the Message is actually sent to the channel.
 
Methods inherited from class org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter
postReceive, postSend, preReceive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageSelectingInterceptor

public MessageSelectingInterceptor(MessageSelector... selectors)
Method Detail

preSend

public Message<?> preSend(Message<?> message,
                          MessageChannel channel)
Description copied from interface: ChannelInterceptor
Invoked before the Message is actually sent to the channel. This allows for modification of the Message if necessary. If this method returns null, then the actual send invocation will not occur.

Specified by:
preSend in interface ChannelInterceptor
Overrides:
preSend in class ChannelInterceptorAdapter

Spring Integration