public abstract class HealthCheckResponseBuilder
extends java.lang.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.Status.DOWN . |
abstract HealthCheckResponseBuilder |
name(java.lang.String name)
Sets the name of the health check response.
|
abstract HealthCheckResponseBuilder |
status(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.Status.UP . |
abstract HealthCheckResponseBuilder |
withData(java.lang.String key,
boolean value)
Adds additional boolean data to the health check response.
|
abstract HealthCheckResponseBuilder |
withData(java.lang.String key,
long value)
Adds additional numeric data to the health check response.
|
abstract HealthCheckResponseBuilder |
withData(java.lang.String key,
java.lang.String value)
Adds additional string data to the health check response.
|
public abstract HealthCheckResponseBuilder name(java.lang.String name)
name
- The health check response namepublic abstract HealthCheckResponseBuilder withData(java.lang.String key, java.lang.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(java.lang.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(java.lang.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.Status.UP
. This implies that the
health check was successful.public abstract HealthCheckResponseBuilder down()
HealthCheckResponse.Status.DOWN
. This implies that the
health check was not successful.public abstract HealthCheckResponseBuilder status(boolean up)
up
.up
- the statuspublic abstract HealthCheckResponse build()
HealthCheckResponse
from the current builder.HealthCheckResponse
defined by this builder