All Known Implementing Classes:
RangeValuePattern, WildcardValuePattern

@SPI public interface ValuePattern
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    match(String pattern, String value, org.apache.dubbo.common.URL url, Invocation invocation, boolean isWhenCondition)
    Is the pattern matches with the request context
    boolean
    Is the input pattern of a specific form, for example, range pattern '1~100', wildcard pattern 'hello*', etc.
  • Method Details

    • shouldMatch

      boolean shouldMatch(String pattern)
      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 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