public final class SimpDestinationMessageMatcher extends Object implements MessageMatcher<Object>
MessageMatcher which compares a pre-defined pattern against the destination of a Message
.
ANY_MESSAGE
Constructor and Description |
---|
SimpDestinationMessageMatcher(String pattern)
Creates a new instance with the specified pattern and a
AntPathMatcher created from the default
constructor. |
SimpDestinationMessageMatcher(String pattern,
PathMatcher pathMatcher)
Creates a new instance with the specified pattern and a
AntPathMatcher created from the default
constructor. |
public SimpDestinationMessageMatcher(String pattern, PathMatcher pathMatcher)
Creates a new instance with the specified pattern and a AntPathMatcher
created from the default
constructor.
pattern
- the pattern to usepathMatcher
- the PathMatcher
to use.public SimpDestinationMessageMatcher(String pattern)
Creates a new instance with the specified pattern and a AntPathMatcher
created from the default
constructor.
The mapping matches destinations using the following rules:
Some examples:
com/t?st.jsp
- matches com/test
but also
com/tast
or com/txst
com/*suffix
- matches all files ending in suffix
in the com
directorycom/**/test
- matches all destinations ending with test
underneath the com
pathpattern
- the pattern to usepublic boolean matches(org.springframework.messaging.Message<? extends Object> message)
MessageMatcher
Message
matches, else falsematches
in interface MessageMatcher<Object>
message
- the Message
to match onMessage
matches, else false