public class MessageSelectorChain extends java.lang.Object implements MessageSelector
accepted
is based upon the tallied results of the individual selectors' responses in
accordance with this chain's MessageSelectorChain.VotingStrategy
.Modifier and Type | Class and Description |
---|---|
static class |
MessageSelectorChain.VotingStrategy |
Constructor and Description |
---|
MessageSelectorChain() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Message<?> message)
Pass the message through the selector chain.
|
void |
add(int index,
MessageSelector selector)
Add a selector to the chain at the specified index.
|
void |
add(MessageSelector selector)
Add a selector to the end of the chain.
|
void |
setSelectors(java.util.List<MessageSelector> selectors)
Initialize the selector chain.
|
void |
setVotingStrategy(MessageSelectorChain.VotingStrategy votingStrategy)
Specify the voting strategy for this selector chain.
|
public void setVotingStrategy(MessageSelectorChain.VotingStrategy votingStrategy)
The default is MessageSelectorChain.VotingStrategy.ALL
.
public void add(MessageSelector selector)
public void add(int index, MessageSelector selector)
public void setSelectors(java.util.List<MessageSelector> selectors)
public final boolean accept(Message<?> message)
accepted
is based upon the tallied results of
the individual selectors' responses in accordance with this chain's
MessageSelectorChain.VotingStrategy
.accept
in interface MessageSelector