Class WildcardValuePattern
java.lang.Object
org.apache.dubbo.rpc.cluster.router.condition.matcher.pattern.wildcard.WildcardValuePattern
- All Implemented Interfaces:
ValuePattern
@Activate(order=2147483647)
public class WildcardValuePattern
extends Object
implements ValuePattern
Matches with patterns like 'key=hello', 'key=hello*', 'key=*hello', 'key=h*o' or 'key=*'
This pattern evaluator must be the last one being executed.
-
Constructor Summary
Constructors -
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 key) Is the input pattern of a specific form, for example, range pattern '1~100', wildcard pattern 'hello*', etc.
-
Constructor Details
-
WildcardValuePattern
public WildcardValuePattern()
-
-
Method Details
-
shouldMatch
Description copied from interface:ValuePatternIs the input pattern of a specific form, for example, range pattern '1~100', wildcard pattern 'hello*', etc.- Specified by:
shouldMatchin interfaceValuePattern- Parameters:
key- the match or mismatch pattern- Returns:
- true or false
-
match
public boolean match(String pattern, String value, org.apache.dubbo.common.URL url, Invocation invocation, boolean isWhenCondition) Description copied from interface:ValuePatternIs the pattern matches with the request context- Specified by:
matchin interfaceValuePattern- 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
-