Class Health.Builder

java.lang.Object
org.apache.juneau.rest.server.health.Health.Builder
Enclosing class:
Health

public static final class Health.Builder extends Object
Builder for Health.
  • Method Details

    • detail

      public Health.Builder detail(String key, Object value)
      Adds a structured detail.
      Parameters:
      key - Detail key. Must not be null or empty.
      value - Detail value. Can be null (the detail is recorded with a null value).
      Returns:
      This builder.
    • error

      public Health.Builder error(Throwable value)
      Overrides the error attached to this result.
      Parameters:
      value - The throwable. Can be null (clears the error).
      Returns:
      This builder.
    • build

      public Health build()
      Builds a health result.
      Returns:
      A new health result.