public abstract class HealthCheckResponseBuilder extends Object
The HealthCheckResponseBuilder
class is reserved for an extension by implementation providers.
Constructor and Description |
---|
HealthCheckResponseBuilder() |
Modifier and Type | Method and Description |
---|---|
abstract HealthCheckResponse |
build()
Creates a
HealthCheckResponse from the current builder. |
abstract HealthCheckResponseBuilder |
down()
Sets the status of the health check response to
HealthCheckResponse.State.DOWN . |
abstract HealthCheckResponseBuilder |
name(String name)
Sets the name of the health check response.
|
abstract HealthCheckResponseBuilder |
state(boolean up)
Sets the status of the health check response according to the boolean value
up . |
abstract HealthCheckResponseBuilder |
up()
Sets the status of the health check response to
HealthCheckResponse.State.UP . |
abstract HealthCheckResponseBuilder |
withData(String key,
boolean value)
Adds additional boolean data to the health check response.
|
abstract HealthCheckResponseBuilder |
withData(String key,
long value)
Adds additional numeric data to the health check response.
|
abstract HealthCheckResponseBuilder |
withData(String key,
String value)
Adds additional string data to the health check response.
|
public abstract HealthCheckResponseBuilder name(String name)
name
- The health check response namepublic abstract HealthCheckResponseBuilder withData(String key, String value)
value
identified by key
to the data section of the health check response.
Additional invocations of a withData
method with the same key
override the key-value pair.key
- the identifiervalue
- the valuepublic abstract HealthCheckResponseBuilder withData(String key, long value)
value
identified by key
to the data section of the health check response.
Additional invocations of a withData
method with the same key
override the key-value pair.key
- the identifiervalue
- the valuepublic abstract HealthCheckResponseBuilder withData(String key, boolean value)
value
identified by key
to the data section of the health check response.
Additional invocations of a withData
method with the same key
override the key-value pair.key
- the identifiervalue
- the valuepublic abstract HealthCheckResponseBuilder up()
HealthCheckResponse.State.UP
.
This implies that the health check was successful.public abstract HealthCheckResponseBuilder down()
HealthCheckResponse.State.DOWN
.
This implies that the health check was not successful.public abstract HealthCheckResponseBuilder state(boolean up)
up
.up
- the statuspublic abstract HealthCheckResponse build()
HealthCheckResponse
from the current builder.HealthCheckResponse
defined by this builderCopyright © 2020 Eclipse Foundation. All rights reserved.