Package io.dropwizard.metrics5.health
Class AsyncHealthCheckDecorator
- java.lang.Object
-
- io.dropwizard.metrics5.health.AsyncHealthCheckDecorator
-
- All Implemented Interfaces:
HealthCheck
,Runnable
public class AsyncHealthCheckDecorator extends Object implements HealthCheck, Runnable
A health check decorator to manage asynchronous executions.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.dropwizard.metrics5.health.HealthCheck
HealthCheck.Result, HealthCheck.ResultBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HealthCheck.Result
check()
Perform a check of the application component.HealthCheck
getHealthCheck()
void
run()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.dropwizard.metrics5.health.HealthCheck
clock, execute
-
-
-
-
Method Detail
-
check
public HealthCheck.Result check() throws Exception
Description copied from interface:HealthCheck
Perform a check of the application component.- Specified by:
check
in interfaceHealthCheck
- Returns:
- if the component is healthy, a healthy
HealthCheck.Result
; otherwise, an unhealthyHealthCheck.Result
with a descriptive error message or exception - Throws:
Exception
- if there is an unhandled error during the health check; this will result in a failed health check
-
getHealthCheck
public HealthCheck getHealthCheck()
-
-