Interface AutoHttpMetricsPathConfig

All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
AutoHttpMetricsPathConfig.BuilderBase.AutoHttpMetricsPathConfigImpl

public interface AutoHttpMetricsPathConfig extends Prototype.Api
Settings for path-based automatic metrics configuration.

An HTTP request matches a path entry if the request path matches the entry's path pattern and the request's HTTP method matches one of the entry's methods. If there no methods list for the entry, then all HTTP methods match the entry.

If a request matches an entry, then the entry's enabled value (which defaults to ) determines the entry's vote whether the request should be measured. If a request matches multiple entries, the vote of the last matched entry wins.

See Also:
  • Method Details

    • builder

      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static AutoHttpMetricsPathConfig create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • create

      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • create

      static AutoHttpMetricsPathConfig create()
      Create a new instance with default values.
      Returns:
      a new instance
    • matchesPath

      default boolean matchesPath(UriPath uriPath)
      Checks whether the UriPath matches the path in the path config.
      Parameters:
      uriPath - UriPath to test
      Returns:
      true if the UriPath matches the config's path matcher; false otherwise
    • matchesMethod

      default boolean matchesMethod(Method method)
      Checks whether the Method matches the method(s) in the path config.
      Parameters:
      method - Method to test
      Returns:
      true if the specified method matches the method selection in the config; false otherwise
    • enabled

      boolean enabled()
      Whether automatic metrics are to be enabled for requests which match the specified PathMatcher and HTTP methods.
      Returns:
      whether auto metrics are to be enabled for this path config's path matcher and HTTP methods
    • path

      String path()
      Path matching expression for this path config entry.
      Returns:
      path matching expression
    • methods

      List<String> methods()
      HTTP methods for which this path config applies; default is to match all HTTP methods.
      Returns:
      HTTP methods
    • pathMatcher

      PathMatcher pathMatcher()
      Path matcher for internal use by this component.
      Returns:
      PathMatcher derived from the path() setting