Class MessageSelectorChain
java.lang.Object
org.springframework.integration.selector.MessageSelectorChain
- All Implemented Interfaces:
- GenericSelector<Message<?>>,- MessageSelector
public class MessageSelectorChain extends Object implements MessageSelector
A message selector implementation that passes incoming messages through a
 chain of selectors. Whether the Message is 
accepted
 is based upon the tallied results of the individual selectors' responses in
 accordance with this chain's MessageSelectorChain.VotingStrategy.- Author:
- Mark Fisher, Gary Russell
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classMessageSelectorChain.VotingStrategy
- 
Constructor SummaryConstructors Constructor Description MessageSelectorChain()
- 
Method SummaryModifier and Type Method Description booleanaccept(Message<?> message)Pass the message through the selector chain.voidadd(int index, MessageSelector selector)Add a selector to the chain at the specified index.voidadd(MessageSelector selector)Add a selector to the end of the chain.voidsetSelectors(List<MessageSelector> selectors)Initialize the selector chain.voidsetVotingStrategy(MessageSelectorChain.VotingStrategy votingStrategy)Specify the voting strategy for this selector chain.
- 
Constructor Details- 
MessageSelectorChainpublic MessageSelectorChain()
 
- 
- 
Method Details- 
setVotingStrategySpecify the voting strategy for this selector chain.The default is MessageSelectorChain.VotingStrategy.ALL.- Parameters:
- votingStrategy- The voting strategy.
 
- 
addAdd a selector to the end of the chain.- Parameters:
- selector- The message selector.
 
- 
addAdd a selector to the chain at the specified index.- Parameters:
- index- The index.
- selector- The message selector.
 
- 
setSelectorsInitialize the selector chain. Removes any existing selectors.- Parameters:
- selectors- The message selectors.
 
- 
acceptPass the message through the selector chain. Whether the Message isacceptedis based upon the tallied results of the individual selectors' responses in accordance with this chain'sMessageSelectorChain.VotingStrategy.- Specified by:
- acceptin interface- GenericSelector<Message<?>>
- Specified by:
- acceptin interface- MessageSelector
 
 
-