Class AbstractConditionMatcher
java.lang.Object
org.apache.dubbo.rpc.cluster.router.condition.matcher.AbstractConditionMatcher
- All Implemented Interfaces:
ConditionMatcher
- Direct Known Subclasses:
ArgumentConditionMatcher,AttachmentConditionMatcher,UrlParamConditionMatcher
The abstract implementation of ConditionMatcher, records the match and mismatch patterns of this matcher while at the same time
provides the common match logics.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final org.apache.dubbo.common.logger.ErrorTypeAwareLogger -
Constructor Summary
ConstructorsConstructorDescriptionAbstractConditionMatcher(String key, org.apache.dubbo.rpc.model.ModuleModel model) -
Method Summary
Modifier and TypeMethodDescriptionmatch patterns extracted from when conditionmismatch patterns extracted from then conditionstatic StringgetSampleValueFromUrl(String conditionKey, Map<String, String> sample, org.apache.dubbo.common.URL param, Invocation invocation) booleanisMatch(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.
-
Field Details
-
logger
public static final org.apache.dubbo.common.logger.ErrorTypeAwareLogger logger -
DOES_NOT_FOUND_VALUE
- See Also:
-
-
Constructor Details
-
AbstractConditionMatcher
-
-
Method Details
-
getSampleValueFromUrl
-
isMatch
public boolean isMatch(Map<String, String> sample, org.apache.dubbo.common.URL param, Invocation invocation, boolean isWhenCondition) Description copied from interface:ConditionMatcherDetermines if the patterns of this matcher matches with request context.- Specified by:
isMatchin interfaceConditionMatcher- Parameters:
sample- request context in provider urlparam- request context in consumer urlinvocation- request context in invocation, typically, service, method, arguments and attachmentsisWhenCondition- condition type- Returns:
- the matching result
-
getMatches
Description copied from interface:ConditionMatchermatch patterns extracted from when condition- Specified by:
getMatchesin interfaceConditionMatcher- Returns:
-
getMismatches
Description copied from interface:ConditionMatchermismatch patterns extracted from then condition- Specified by:
getMismatchesin interfaceConditionMatcher- Returns:
-