Class MessageMatcher.MatchResult
java.lang.Object
org.springframework.security.messaging.util.matcher.MessageMatcher.MatchResult
- Enclosing interface:
- MessageMatcher<T>
The result of matching against a
Message
contains the status, true or
false, of the match and if present, any variables extracted from the match- Since:
- 6.5
-
Method Summary
Modifier and TypeMethodDescriptionReturns the extracted variable values where the key is the variable name and the value is the variable valueboolean
isMatch()
Return whether the comparison against theMessage
produced a successful matchstatic MessageMatcher.MatchResult
match()
Creates an instance ofMessageMatcher.MatchResult
that is a match with no variablesstatic MessageMatcher.MatchResult
Creates an instance ofMessageMatcher.MatchResult
that is a match with the specified variablesstatic MessageMatcher.MatchResult
notMatch()
Creates an instance ofMessageMatcher.MatchResult
that is not a match.
-
Method Details
-
isMatch
public boolean isMatch()Return whether the comparison against theMessage
produced a successful match -
getVariables
Returns the extracted variable values where the key is the variable name and the value is the variable value- Returns:
- a map containing key-value pairs representing extracted variable names and variable values
-
match
Creates an instance ofMessageMatcher.MatchResult
that is a match with no variables -
match
Creates an instance ofMessageMatcher.MatchResult
that is a match with the specified variables -
notMatch
Creates an instance ofMessageMatcher.MatchResult
that is not a match.- Returns:
- a
MatchResult
with match set to false
-