public static final class MetricsHealthCheck.Result extends Object
Modifier and Type | Method and Description |
---|---|
static MetricsHealthCheck.Result |
exception(String message,
Throwable exception)
Factory method for reporting a state where an exception has occurred.
|
Throwable |
getException() |
String |
getMessage() |
static MetricsHealthCheck.Result |
healthOk()
Factory method for reporting an Ok health.
|
boolean |
isHealthy() |
static MetricsHealthCheck.Result |
unhealthy(String message)
Factory method for reporting an unhealthy state.
|
public static MetricsHealthCheck.Result healthOk()
public static MetricsHealthCheck.Result unhealthy(String message)
message
- The message to relay in the result.public static MetricsHealthCheck.Result exception(String message, Throwable exception)
message
- The message to relay in the result.exception
- the exception that has occurred.public boolean isHealthy()
public String getMessage()
public Throwable getException()