Class PathPatternMessageMatcher
java.lang.Object
org.springframework.security.messaging.util.matcher.PathPatternMessageMatcher
- All Implemented Interfaces:
- MessageMatcher<Object>
Match 
Messages based on the message destination pattern using a
 PathPattern. There is also support for optionally matching on a specified
 SimpMessageType.- Since:
- 6.5
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classA builder for specifying various elements of a message for the purpose of creating aPathPatternMessageMatcher.Nested classes/interfaces inherited from interface org.springframework.security.messaging.util.matcher.MessageMatcherMessageMatcher.MatchResult
- 
Field SummaryFieldsFields inherited from interface org.springframework.security.messaging.util.matcher.MessageMatcherANY_MESSAGE
- 
Method SummaryModifier and TypeMethodDescriptionmatcher(org.springframework.messaging.Message<?> message) Extract the path variables from theMessagedestination if the path is a match, otherwise theMessageMatcher.MatchResult.getVariables()returns aCollections.emptyMap()booleanmatches(org.springframework.messaging.Message<?> message) Returns true if theMessagematches, else falseInitialize this builder with thePathPatternParser.defaultInstancethat is configured with thePathContainer.Options.HTTP_PATHseparatorwithPathPatternParser(org.springframework.web.util.pattern.PathPatternParser parser) Initialize this builder with the providedPathPatternParser
- 
Field Details- 
NULL_DESTINATION_MATCHER
 
- 
- 
Method Details- 
withDefaultsInitialize this builder with thePathPatternParser.defaultInstancethat is configured with thePathContainer.Options.HTTP_PATHseparator
- 
withPathPatternParserpublic static PathPatternMessageMatcher.Builder withPathPatternParser(org.springframework.web.util.pattern.PathPatternParser parser) Initialize this builder with the providedPathPatternParser
- 
matchespublic boolean matches(org.springframework.messaging.Message<?> message) Returns true if theMessagematches, else false- Specified by:
- matchesin interface- MessageMatcher<Object>
- Parameters:
- message- the- Messageto match on
- Returns:
- true if the Messagematches, else false
 
- 
matcherExtract the path variables from theMessagedestination if the path is a match, otherwise theMessageMatcher.MatchResult.getVariables()returns aCollections.emptyMap()- Specified by:
- matcherin interface- MessageMatcher<Object>
- Parameters:
- message- the message whose path variables to extract.
- Returns:
- a MatchResultof the path variables and values.
 
 
-