public abstract class HealthCheckResponse extends Object
The HealthCheckResponse
class is reserved for an extension by implementation providers.
An application should use one of the static methods to create a Response instance using a
HealthCheckResponseBuilder
.
Modifier and Type | Class and Description |
---|---|
static class |
HealthCheckResponse.State |
Constructor and Description |
---|
HealthCheckResponse() |
Modifier and Type | Method and Description |
---|---|
static HealthCheckResponseBuilder |
builder()
Creates an empty
HealthCheckResponseBuilder . |
static HealthCheckResponse |
down(String name)
Creates a failed health check with a name.
|
abstract Optional<Map<String,Object>> |
getData() |
abstract String |
getName() |
abstract HealthCheckResponse.State |
getState() |
static HealthCheckResponseBuilder |
named(String name)
Creates a
HealthCheckResponseBuilder with a name. |
static void |
setResponseProvider(HealthCheckResponseProvider provider)
Used by OSGi environment where the service loader pattern is not supported.
|
static HealthCheckResponse |
up(String name)
Creates a successful health check with a name.
|
public static void setResponseProvider(HealthCheckResponseProvider provider)
provider
- the provider instance to use.public static HealthCheckResponseBuilder named(String name)
HealthCheckResponseBuilder
with a name.name
- the check namepublic static HealthCheckResponseBuilder builder()
HealthCheckResponseBuilder
.
Note: The health check response name is required and needs to be set before the response is constructed.public static HealthCheckResponse up(String name)
name
- the check namepublic static HealthCheckResponse down(String name)
name
- the check namepublic abstract String getName()
public abstract HealthCheckResponse.State getState()
Copyright © 2019 Eclipse Foundation. All rights reserved.