Interface ValuePattern
- All Known Implementing Classes:
RangeValuePattern,WildcardValuePattern
@SPI
public interface ValuePattern
-
Method Summary
Modifier and TypeMethodDescriptionbooleanmatch(String pattern, String value, org.apache.dubbo.common.URL url, Invocation invocation, boolean isWhenCondition) Is the pattern matches with the request contextbooleanshouldMatch(String pattern) Is the input pattern of a specific form, for example, range pattern '1~100', wildcard pattern 'hello*', etc.
-
Method Details
-
shouldMatch
Is the input pattern of a specific form, for example, range pattern '1~100', wildcard pattern 'hello*', etc.- Parameters:
pattern- the match or mismatch pattern- Returns:
- true or false
-
match
boolean match(String pattern, String value, org.apache.dubbo.common.URL url, Invocation invocation, boolean isWhenCondition) Is the pattern matches with the request context- Parameters:
pattern- pattern value extracted from condition rulevalue- the real value extracted from request contexturl- request context in consumer urlinvocation- request context in invocationisWhenCondition- condition type- Returns:
- true if successfully match
-