public final class WampDestinationMessageMatcher extends Object implements org.springframework.security.messaging.util.matcher.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
WampMessageType.
| Modifier and Type | Field and Description |
|---|---|
static org.springframework.security.messaging.util.matcher.MessageMatcher<Object> |
NULL_DESTINATION_MATCHER |
| Constructor and Description |
|---|
WampDestinationMessageMatcher(String pattern)
Creates a new instance with the specified pattern, null
WampMessageType
(matches any type), and a AntPathMatcher created from the default
constructor. |
WampDestinationMessageMatcher(String pattern,
org.springframework.util.PathMatcher pathMatcher)
Creates a new instance with the specified pattern and
PathMatcher. |
WampDestinationMessageMatcher(String pattern,
ch.rasc.wampspring.message.WampMessageType type,
org.springframework.util.PathMatcher pathMatcher)
Creates a new instance with the specified pattern,
WampMessageType, and
PathMatcher. |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isTypeWithDestination(ch.rasc.wampspring.message.WampMessageType type) |
boolean |
matches(org.springframework.messaging.Message<? extends Object> message) |
String |
toString() |
public static final org.springframework.security.messaging.util.matcher.MessageMatcher<Object> NULL_DESTINATION_MATCHER
public WampDestinationMessageMatcher(String pattern)
Creates a new instance with the specified pattern, null WampMessageType
(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 WampDestinationMessageMatcher(String pattern, org.springframework.util.PathMatcher pathMatcher)
Creates a new instance with the specified pattern and PathMatcher.
pattern - the pattern to usepathMatcher - the PathMatcher to use.public WampDestinationMessageMatcher(String pattern, ch.rasc.wampspring.message.WampMessageType type, org.springframework.util.PathMatcher pathMatcher)
Creates a new instance with the specified pattern, WampMessageType, and
PathMatcher.
pattern - the pattern to usetype - the WampMessageType to match on or null if any
WampMessageType should be matched.pathMatcher - the PathMatcher to use.public boolean matches(org.springframework.messaging.Message<? extends Object> message)
matches in interface org.springframework.security.messaging.util.matcher.MessageMatcher<Object>public static boolean isTypeWithDestination(ch.rasc.wampspring.message.WampMessageType type)
Copyright © 2015–2017. All rights reserved.