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 valuebooleanisMatch()Return whether the comparison against theMessageproduced a successful matchstatic MessageMatcher.MatchResultmatch()Creates an instance ofMessageMatcher.MatchResultthat is a match with no variablesstatic MessageMatcher.MatchResultCreates an instance ofMessageMatcher.MatchResultthat is a match with the specified variablesstatic MessageMatcher.MatchResultnotMatch()Creates an instance ofMessageMatcher.MatchResultthat is not a match.
-
Method Details
-
isMatch
public boolean isMatch()Return whether the comparison against theMessageproduced 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.MatchResultthat is a match with no variables -
match
Creates an instance ofMessageMatcher.MatchResultthat is a match with the specified variables -
notMatch
Creates an instance ofMessageMatcher.MatchResultthat is not a match.- Returns:
- a
MatchResultwith match set to false
-