Class ObservabilityClientConfiguration.URLPattern

java.lang.Object
com.vaadin.observability.ObservabilityClientConfiguration.URLPattern
All Implemented Interfaces:
Serializable
Enclosing interface:
ObservabilityClientConfiguration

public static final class ObservabilityClientConfiguration.URLPattern extends Object implements Serializable
Represents a pattern matching an URL. The pattern could be an exact match or a regular expression, that is evaluated on the browser against a string representation of an URL. There is no guarantee about the form of the input URL; it may be absolute or relative, depending on how a request is generated on the browser. Note that the input URL may contain also the query string, so an exact match pattern should also contain that part. Examples:
 /home                  (exact match)
 /page?id=home          (exact match)
 /orders/\\d+           (regex match)
 /documents/.*\\.pdf    (regex match)
 
See Also:
  • Constructor Details

    • URLPattern

      public URLPattern(String pattern, boolean exactMatch)
      Parameters:
      pattern - pattern matching the URL, either an exact match or a regular expression.
      exactMatch - true if the pattern is an exact match, false if it is a regular expression.
  • Method Details

    • getPattern

      public String getPattern()
      Gets the URL pattern.
      Returns:
      the URL pattern
    • isExactMatch

      public boolean isExactMatch()
      Gets whether this pattern identifies an exact match or a regular expression.
      Returns:
      true if the pattern is an exact match, otherwise false.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object