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 Details

    • WildcardValuePattern

      public WildcardValuePattern()
  • Method Details

    • shouldMatch

      public boolean shouldMatch(String key)
      Description copied from interface: ValuePattern
      Is the input pattern of a specific form, for example, range pattern '1~100', wildcard pattern 'hello*', etc.
      Specified by:
      shouldMatch in interface ValuePattern
      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: ValuePattern
      Is the pattern matches with the request context
      Specified by:
      match in interface ValuePattern
      Parameters:
      pattern - pattern value extracted from condition rule
      value - the real value extracted from request context
      url - request context in consumer url
      invocation - request context in invocation
      isWhenCondition - condition type
      Returns:
      true if successfully match