Package ratpack.health
Class HealthCheckResults
- java.lang.Object
-
- ratpack.health.HealthCheckResults
-
public class HealthCheckResults extends java.lang.Object
A value type representing the result of running multiple health checks.- See Also:
HealthCheckHandler
-
-
Constructor Summary
Constructors Constructor Description HealthCheckResults(com.google.common.collect.ImmutableSortedMap<java.lang.String,HealthCheck.Result> results)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HealthCheckResults
empty()
Empty results.com.google.common.collect.ImmutableSortedMap<java.lang.String,HealthCheck.Result>
getResults()
The results.boolean
isUnhealthy()
Whether any result is unhealthy.java.lang.String
toString()
Provides a string representation of the results.void
writeTo(java.io.Writer writer)
Writes a string representation of the results to the given writer.
-
-
-
Constructor Detail
-
HealthCheckResults
public HealthCheckResults(com.google.common.collect.ImmutableSortedMap<java.lang.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<java.lang.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(java.io.Writer writer) throws java.io.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:
java.io.IOException
- any thrown bywriter
- Since:
- 1.5
-
toString
public java.lang.String toString()
Provides a string representation of the results.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of the results.
- Since:
- 1.5
-
-