Class AutoHttpMetricsPathConfig.BuilderBase<BUILDER extends AutoHttpMetricsPathConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends AutoHttpMetricsPathConfig>

java.lang.Object
io.helidon.webserver.observe.metrics.AutoHttpMetricsPathConfig.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
AutoHttpMetricsPathConfig.Builder
Enclosing interface:
AutoHttpMetricsPathConfig

public abstract static class AutoHttpMetricsPathConfig.BuilderBase<BUILDER extends AutoHttpMetricsPathConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends AutoHttpMetricsPathConfig> extends Object implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for AutoHttpMetricsPathConfig.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(AutoHttpMetricsPathConfig prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(AutoHttpMetricsPathConfig.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • config

      @Deprecated public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends AutoHttpMetricsPathConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends AutoHttpMetricsPathConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends AutoHttpMetricsPathConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends AutoHttpMetricsPathConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • enabled

      public BUILDER enabled(boolean enabled)
      Whether automatic metrics are to be enabled for requests which match the specified PathMatcher and HTTP methods.
      Parameters:
      enabled - whether auto metrics are to be enabled for this path config's path matcher and HTTP methods
      Returns:
      updated builder instance
      See Also:
    • path

      public BUILDER path(String path)
      Path matching expression for this path config entry.
      Parameters:
      path - path matching expression
      Returns:
      updated builder instance
      See Also:
    • clearMethods

      public BUILDER clearMethods()
      Clear all methods.
      Returns:
      updated builder instance
      See Also:
    • methods

      public BUILDER methods(List<String> methods)
      HTTP methods for which this path config applies; default is to match all HTTP methods.
      Parameters:
      methods - HTTP methods
      Returns:
      updated builder instance
      See Also:
    • addMethods

      public BUILDER addMethods(List<String> methods)
      HTTP methods for which this path config applies; default is to match all HTTP methods.
      Parameters:
      methods - HTTP methods
      Returns:
      updated builder instance
      See Also:
    • addMethod

      public BUILDER addMethod(String method)
      HTTP methods for which this path config applies; default is to match all HTTP methods.
      Parameters:
      method - add single HTTP methods
      Returns:
      updated builder instance
      See Also:
    • enabled

      public 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

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

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

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

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.
    • config

      protected Optional<Config> config()
      Configuration used to configure this instance.
      Returns:
      config instance