Class SimpDestinationMessageMatcher
java.lang.Object
org.springframework.security.messaging.util.matcher.SimpDestinationMessageMatcher
- All Implemented Interfaces:
MessageMatcher<Object>
@Deprecated
public final class SimpDestinationMessageMatcher
extends Object
implements MessageMatcher<Object>
Deprecated.
MessageMatcher which compares a pre-defined pattern against the destination of a
Message. There is also support for optionally matching on a specified
SimpMessageType.
- Since:
- 4.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.security.messaging.util.matcher.MessageMatcher
MessageMatcher.MatchResult -
Field Summary
FieldsFields inherited from interface org.springframework.security.messaging.util.matcher.MessageMatcher
ANY_MESSAGE -
Constructor Summary
ConstructorsConstructorDescriptionSimpDestinationMessageMatcher(String pattern) Deprecated.Creates a new instance with the specified pattern, nullSimpMessageType(matches any type), and aAntPathMatchercreated from the default constructor.SimpDestinationMessageMatcher(String pattern, org.springframework.util.PathMatcher pathMatcher) Deprecated.Creates a new instance with the specified pattern andPathMatcher. -
Method Summary
Modifier and TypeMethodDescriptioncreateMessageMatcher(String pattern, org.springframework.util.PathMatcher matcher) Deprecated.Creates a new instance with the specified pattern,SimpMessageType.MESSAGE, andPathMatcher.createSubscribeMatcher(String pattern, org.springframework.util.PathMatcher matcher) Deprecated.Creates a new instance with the specified pattern,SimpMessageType.SUBSCRIBE, andPathMatcher.extractPathVariables(org.springframework.messaging.Message<?> message) Deprecated.Deprecated.matcher(org.springframework.messaging.Message<?> message) Deprecated.Returns aMessageMatcher.MatchResultfor thisMessageMatcher.booleanmatches(org.springframework.messaging.Message<?> message) Deprecated.Returns true if theMessagematches, else falsetoString()Deprecated.
-
Field Details
-
NULL_DESTINATION_MATCHER
Deprecated.
-
-
Constructor Details
-
SimpDestinationMessageMatcher
Deprecated.Creates a new instance with the specified pattern, null
SimpMessageType(matches any type), and aAntPathMatchercreated from the default constructor.The mapping matches destinations despite the using the following rules:
- ? matches one character
- * matches zero or more characters
- ** matches zero or more 'directories' in a path
Some examples:
com/t?st.jsp- matchescom/testbut alsocom/tastorcom/txstcom/*suffix- matches all files ending insuffixin thecomdirectorycom/**/test- matches all destinations ending withtestunderneath thecompath
- Parameters:
pattern- the pattern to use
-
SimpDestinationMessageMatcher
public SimpDestinationMessageMatcher(String pattern, org.springframework.util.PathMatcher pathMatcher) Deprecated.Creates a new instance with the specified pattern and
PathMatcher.- Parameters:
pattern- the pattern to usepathMatcher- thePathMatcherto use.
-
-
Method Details
-
matches
public boolean matches(org.springframework.messaging.Message<?> message) Deprecated.Description copied from interface:MessageMatcherReturns true if theMessagematches, else false- Specified by:
matchesin interfaceMessageMatcher<Object>- Parameters:
message- theMessageto match on- Returns:
- true if the
Messagematches, else false
-
matcher
Deprecated.Description copied from interface:MessageMatcherReturns aMessageMatcher.MatchResultfor thisMessageMatcher. The default implementation returnsCollections.emptyMap()whenMessageMatcher.MatchResult.getVariables()is invoked.- Specified by:
matcherin interfaceMessageMatcher<Object>- Returns:
- the
MatchResultfrom comparing thisMessageMatcheragainst theMessage
-
extractPathVariables
Deprecated. -
getMessageTypeMatcher
Deprecated. -
toString
Deprecated. -
createSubscribeMatcher
public static SimpDestinationMessageMatcher createSubscribeMatcher(String pattern, org.springframework.util.PathMatcher matcher) Deprecated.Creates a new instance with the specified pattern,
SimpMessageType.SUBSCRIBE, andPathMatcher.- Parameters:
pattern- the pattern to usematcher- thePathMatcherto use.
-
createMessageMatcher
public static SimpDestinationMessageMatcher createMessageMatcher(String pattern, org.springframework.util.PathMatcher matcher) Deprecated.Creates a new instance with the specified pattern,
SimpMessageType.MESSAGE, andPathMatcher.- Parameters:
pattern- the pattern to usematcher- thePathMatcherto use.
-
PathPatternMessageMatcher