Interface MessageMatcher<T>
- All Known Implementing Classes:
AbstractMessageMatcherComposite
,AndMessageMatcher
,OrMessageMatcher
,PathPatternMessageMatcher
,SimpDestinationMessageMatcher
,SimpMessageTypeMatcher
public interface MessageMatcher<T>
API for determining if a
Message
should be matched on.- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
The result of matching against aMessage
contains the status, true or false, of the match and if present, any variables extracted from the match -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault MessageMatcher.MatchResult
Returns aMessageMatcher.MatchResult
for thisMessageMatcher
.boolean
Returns true if theMessage
matches, else false
-
Field Details
-
ANY_MESSAGE
Matches everyMessage
-
-
Method Details
-
matches
Returns true if theMessage
matches, else false- Parameters:
message
- theMessage
to match on- Returns:
- true if the
Message
matches, else false
-
matcher
default MessageMatcher.MatchResult matcher(org.springframework.messaging.Message<? extends T> message) Returns aMessageMatcher.MatchResult
for thisMessageMatcher
. The default implementation returnsCollections.emptyMap()
whenMessageMatcher.MatchResult.getVariables()
is invoked.- Returns:
- the
MatchResult
from comparing thisMessageMatcher
against theMessage
- Since:
- 6.5
-