Package ratpack.core.health
Class HealthCheckResults
- java.lang.Object
-
- ratpack.core.health.HealthCheckResults
-
public class HealthCheckResults extends 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<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<String,HealthCheck.Result>
getResults()
The results.boolean
isUnhealthy()
Whether any result is unhealthy.String
toString()
Provides a string representation of the results.void
writeTo(Writer writer)
Writes a string representation of the results to the given writer.
-
-
-
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 bywriter
- Since:
- 1.5
-
-