public final class SimpDestinationMessageMatcher extends Object implements MessageMatcher<Object>
MessageMatcher which compares a pre-defined pattern against the destination
of a Message. There is also support for optionally matching on a
specified SimpMessageType.
ANY_MESSAGE| Constructor and Description |
|---|
SimpDestinationMessageMatcher(String pattern)
Creates a new instance with the specified pattern, null
SimpMessageType (matches any type), and a AntPathMatcher
created from the default constructor. |
SimpDestinationMessageMatcher(String pattern,
org.springframework.messaging.simp.SimpMessageType type)
Creates a new instance with the specified pattern and a
AntPathMatcher created from the default
constructor. |
SimpDestinationMessageMatcher(String pattern,
org.springframework.messaging.simp.SimpMessageType type,
PathMatcher pathMatcher)
Creates a new instance with the specified pattern,
SimpMessageType, and PathMatcher. |
public SimpDestinationMessageMatcher(String pattern)
Creates a new instance with the specified pattern, null
SimpMessageType (matches any type), and a AntPathMatcher
created from the default constructor.
The mapping matches destinations despite the using the following rules:
Some examples:
com/t?st.jsp - matches com/test but also
com/tast or com/txstcom/*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 SimpDestinationMessageMatcher(String pattern, org.springframework.messaging.simp.SimpMessageType type)
Creates a new instance with the specified pattern and a AntPathMatcher created from the default
constructor.
pattern - the pattern to usetype - the SimpMessageType to match on or null if any SimpMessageType should be matched.pathMatcher - the PathMatcher to use.public SimpDestinationMessageMatcher(String pattern, org.springframework.messaging.simp.SimpMessageType type, PathMatcher pathMatcher)
Creates a new instance with the specified pattern, SimpMessageType, and PathMatcher.
pattern - the pattern to usetype - the SimpMessageType to match on or null if any SimpMessageType should be matched.pathMatcher - the PathMatcher to use.public boolean matches(org.springframework.messaging.Message<? extends Object> message)
MessageMatcherMessage matches, else falsematches in interface MessageMatcher<Object>message - the Message to match onMessage matches, else false