Interface CommandMessageFilter
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AcceptAll,AndCommandMessageFilter,CommandNameFilter,DenyAll,DenyCommandNameFilter,NegateCommandMessageFilter,OrCommandMessageFilter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface describing a filter that can be applied to commands to describe the type of commands supported by a node in
a cluster.
- Since:
- 4.0
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptiondefault CommandMessageFilterand(CommandMessageFilter other) Returns a filter that matches when both this instance and the givenothermatch.booleanmatches(CommandMessage<?> commandMessage) Indicates whether the givencommandMessagematches this filter.default CommandMessageFilternegate()Returns a filter that matches when this instance doesn't, and vice versa.default CommandMessageFilteror(CommandMessageFilter other) Returns a filter that matches when either this instance or the givenothermatches.
-
Method Details
-
matches
Indicates whether the givencommandMessagematches this filter.- Parameters:
commandMessage- the message to match- Returns:
trueif the command matches, otherwisefalse
-
and
Returns a filter that matches when both this instance and the givenothermatch.- Parameters:
other- the other filter to match against- Returns:
- a filter that matches when both this instance and the other match
-
negate
Returns a filter that matches when this instance doesn't, and vice versa.- Returns:
- a filter that negates the result of this instance
-
or
Returns a filter that matches when either this instance or the givenothermatches.- Parameters:
other- the other filter to match against- Returns:
- a filter that matches when either this instance or the other matches
-