Class ObserveFeature

java.lang.Object
io.helidon.webserver.observe.ObserveFeature
All Implemented Interfaces:
RuntimeType.Api<ObserveFeatureConfig>, NamedService, Weighted, ServerFeature, Comparable<Weighted>

public class ObserveFeature extends Object implements ServerFeature, Weighted, RuntimeType.Api<ObserveFeatureConfig>
Support for all observe providers that are available (or configured).
  • Method Details

    • builder

      public static ObserveFeatureConfig.Builder builder()
      A new builder to customize observe support.
      Returns:
      a new builder
    • create

      public static ObserveFeature create(Consumer<ObserveFeatureConfig.Builder> consumer)
      Create a new observe feature customizing its configuration.
      Parameters:
      consumer - configuration consumer
      Returns:
      a new observe feature
    • create

      public static ObserveFeature create(ObserveFeatureConfig config)
      Create a new observe feature based on its configuration.
      Parameters:
      config - configuration
      Returns:
      a new observe feature
    • just

      public static ObserveFeature just(Observer... observers)
      Create a new support with default configuration and an explicit list of observers. This will NOT use providers discovered by ServiceLoader.
      Parameters:
      observers - observer to use
      Returns:
      a new observe support
    • create

      public static ObserveFeature create(Observer... observers)
      Create a new support with default configuration and an explicit list of observers. This will use providers discovered by ServiceLoader.
      Parameters:
      observers - observer to use
      Returns:
      a new observe support
    • create

      public static ObserveFeature create()
      Create a new support with default configuration and a list of providers discovered by ServiceLoader.
      Returns:
      a new observe support
    • create

      public static ObserveFeature create(Config config)
      Create a new support with custom configuration.
      Parameters:
      config - configuration to read observe config from
      Returns:
      a new observe support
    • prototype

      public ObserveFeatureConfig prototype()
      Description copied from interface: RuntimeType.Api
      The prototype as it was received when creating this runtime object instance.
      Specified by:
      prototype in interface RuntimeType.Api<ObserveFeatureConfig>
      Returns:
      prototype object used to create this instance
    • name

      public String name()
      Description copied from interface: NamedService
      Name of this implementation, as provided in ConfiguredProvider.create(Config, String).
      Specified by:
      name in interface NamedService
      Returns:
      name of this service
    • type

      public String type()
      Description copied from interface: NamedService
      Type of this implementation, to distinguish instances of same type, with different NamedService.name(). Use for example ConfiguredProvider.configKey() to define the type.
      Specified by:
      type in interface NamedService
      Returns:
      type of this service
    • setup

      public void setup(ServerFeature.ServerFeatureContext featureContext)
      Description copied from interface: ServerFeature
      Set up a server feature. Server features can modify server configuration, right before the server is created. To access listener configuration, or routing, a list of all listeners is provided.
      Specified by:
      setup in interface ServerFeature
      Parameters:
      featureContext - to access builders of webserver, listeners, and routing
    • weight

      public double weight()
      Description copied from interface: Weighted
      Weight of this class (maybe because it is defined dynamically, so it cannot be defined by an annotation). If not dynamic, you can use the Weight annotation rather than implementing this interface as long as it is supported by the library using this Weighted.
      Specified by:
      weight in interface Weighted
      Returns:
      the weight of this service, must be a non-negative number