public interface ConditionMatcher
The following condition rule '=bar&arguments[0]=hello* => region=hangzhou' consists of three ConditionMatchers: 1. UrlParamConditionMatcher represented by 'foo=bar' 2. ArgumentsConditionMatcher represented by 'arguments[0]=hello*' 3. UrlParamConditionMatcher represented by 'region=hangzhou'
It's easy to define your own matcher by extending ConditionMatcherFactory
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getMatches()
match patterns extracted from when condition
|
Set<String> |
getMismatches()
mismatch patterns extracted from then condition
|
boolean |
isMatch(Map<String,String> sample,
org.apache.dubbo.common.URL param,
Invocation invocation,
boolean isWhenCondition)
Determines if the patterns of this matcher matches with request context.
|
boolean isMatch(Map<String,String> sample, org.apache.dubbo.common.URL param, Invocation invocation, boolean isWhenCondition)
sample - request context in provider urlparam - request context in consumer urlinvocation - request context in invocation, typically, service, method, arguments and attachmentsisWhenCondition - condition typeCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.