Class HealthCheckResults


  • public class HealthCheckResults
    extends Object
    A value type representing the result of running multiple health checks.
    See Also:
    HealthCheckHandler
    • Constructor Detail

      • HealthCheckResults

        public HealthCheckResults​(com.google.common.collect.ImmutableSortedMap<String,​HealthCheck.Result> results)
        Constructor.
        Parameters:
        results - the results
    • Method Detail

      • empty

        public static HealthCheckResults empty()
        Empty results.
        Returns:
        empty results.
        Since:
        1.5
      • getResults

        public com.google.common.collect.ImmutableSortedMap<String,​HealthCheck.Result> getResults()
        The results.
        Returns:
        the results
      • isUnhealthy

        public boolean isUnhealthy()
        Whether any result is unhealthy.
        Returns:
        whether any result is unhealthy
        Since:
        1.5
      • writeTo

        public void writeTo​(Writer writer)
                     throws IOException
        Writes a string representation of the results to the given writer.

        This object's toString() provides this representation as a string.

        Parameters:
        writer - the writer to write to.
        Throws:
        IOException - any thrown by writer
        Since:
        1.5
      • toString

        public String toString()
        Provides a string representation of the results.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the results.
        Since:
        1.5