Interface HealthObserverConfig

All Superinterfaces:
ObserverConfigBase, Prototype.Api, Prototype.Factory<HealthObserver>
All Known Implementing Classes:
HealthObserverConfig.BuilderBase.HealthObserverConfigImpl

public interface HealthObserverConfig extends Prototype.Api, ObserverConfigBase
Configuration of Health observer.
See Also:
  • Method Details

    • builder

      static HealthObserverConfig.Builder 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 HealthObserverConfig 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

      static HealthObserverConfig create()
      Create a new instance with default values.
      Returns:
      a new instance
    • endpoint

      String endpoint()
    • name

      String name()
    • details

      boolean details()
      Whether details should be printed. By default, health only returns a Status.NO_CONTENT_204 for success, Status.SERVICE_UNAVAILABLE_503 for health down, and Status.INTERNAL_SERVER_ERROR_500 in case of error with no entity. When details are enabled, health returns Status.OK_200 for success, same codes otherwise and a JSON entity with detailed information about each health check executed.
      Returns:
      set to true to enable details
    • healthChecks

      List<HealthCheck> healthChecks()
      Health checks with implicit types.
      Returns:
      health checks to register with the observer
    • useSystemServices

      boolean useSystemServices()
      Whether to use services discovered by ServiceLoader. By default, all HealthCheckProvider based health checks are added.
      Returns:
      set to false to disable discovery
    • config

      Optional<Config> config()
      Config provided by the user (if any).
      Returns:
      configuration
    • enabled

      boolean enabled()
      Whether this observer is enabled.
      Returns:
      false to disable observer