Class HealthCheckService.HealthCheckResult

java.lang.Object
org.hyperledger.besu.plugin.services.HealthCheckService.HealthCheckResult
Enclosing interface:
HealthCheckService

public static final class HealthCheckService.HealthCheckResult extends Object
Result of a health check evaluation, including optional diagnostic details.
  • Constructor Details

    • HealthCheckResult

      public HealthCheckResult(boolean healthy, Map<String,Object> details)
      Creates a health check result.
      Parameters:
      healthy - whether the check passed
      details - diagnostic details to include under checks; may be null or empty. Null keys and null values are omitted. Values should be JSON-friendly types that Vert.x JsonObject can encode (for example String, Number, Boolean, Map, or List). Custom object types are not guaranteed to render correctly in the HTTP response.
  • Method Details

    • of

      public static HealthCheckService.HealthCheckResult of(boolean healthy)
      Creates a healthy or unhealthy result with no details.
      Parameters:
      healthy - whether the check passed
      Returns:
      the result
    • isHealthy

      public boolean isHealthy()
      Returns whether the check passed.
      Returns:
      true if healthy
    • getDetails

      public Map<String,Object> getDetails()
      Returns diagnostic details for the response checks object.
      Returns:
      the details map; never null