Top Description Constructors Methods
org.eclipse.microprofile.health

public abstract Class HealthCheckResponseBuilder

extends Object
Class Inheritance

A builder to construct a health check procedure response.

The HealthCheckResponseBuilder class is reserved for an extension by implementation providers.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract HealthCheckResponse

Returns:

A new HealthCheckResponse defined by this builder
build
()

Creates a HealthCheckResponse from the current builder.

public abstract HealthCheckResponseBuilder

Returns:

this builder
down
()

Sets the status of the health check response to HealthCheckResponse.Status#DOWN.

public abstract HealthCheckResponseBuilder

Returns:

this builder
name
(String
The health check response name
name
)

Sets the name of the health check response

Note

The health check response name is required and needs to be set before the response is constructed.

public abstract HealthCheckResponseBuilder

Returns:

this builder
status
(boolean
the status
up
)

Sets the status of the health check response according to the boolean value up.

public abstract HealthCheckResponseBuilder

Returns:

this builder
up
()

Sets the status of the health check response to HealthCheckResponse.Status#UP.

public abstract HealthCheckResponseBuilder

Returns:

this builder
withData
(String
the identifier
key
,
String
the value
value
)

Adds additional string data to the health check response.

public abstract HealthCheckResponseBuilder

Returns:

this builder
withData
(String
the identifier
key
,
long
the value
value
)

Adds additional numeric data to the health check response.

public abstract HealthCheckResponseBuilder

Returns:

this builder
withData
(String
the identifier
key
,
boolean
the value
value
)

Adds additional boolean data to the health check response.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

HealthCheckResponseBuilderback to summary
public HealthCheckResponseBuilder()

Method Detail

buildback to summary
public abstract HealthCheckResponse build()

Creates a HealthCheckResponse from the current builder.

Returns:HealthCheckResponse

A new HealthCheckResponse defined by this builder

downback to summary
public abstract HealthCheckResponseBuilder down()

Sets the status of the health check response to HealthCheckResponse.Status#DOWN. This implies that the health check was not successful.

Returns:HealthCheckResponseBuilder

this builder

nameback to summary
public abstract HealthCheckResponseBuilder name(String name)

Sets the name of the health check response

Note

The health check response name is required and needs to be set before the response is constructed.

Parameters
name:String

The health check response name

Returns:HealthCheckResponseBuilder

this builder

statusback to summary
public abstract HealthCheckResponseBuilder status(boolean up)

Sets the status of the health check response according to the boolean value up.

Parameters
up:boolean

the status

Returns:HealthCheckResponseBuilder

this builder

upback to summary
public abstract HealthCheckResponseBuilder up()

Sets the status of the health check response to HealthCheckResponse.Status#UP. This implies that the health check was successful.

Returns:HealthCheckResponseBuilder

this builder

withDataback to summary
public abstract HealthCheckResponseBuilder withData(String key, String value)

Adds additional string data to the health check response. Puts the 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.

Parameters
key:String

the identifier

value:String

the value

Returns:HealthCheckResponseBuilder

this builder

withDataback to summary
public abstract HealthCheckResponseBuilder withData(String key, long value)

Adds additional numeric data to the health check response. Puts the long 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.

Parameters
key:String

the identifier

value:long

the value

Returns:HealthCheckResponseBuilder

this builder

withDataback to summary
public abstract HealthCheckResponseBuilder withData(String key, boolean value)

Adds additional boolean data to the health check response. Puts the boolean 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.

Parameters
key:String

the identifier

value:boolean

the value

Returns:HealthCheckResponseBuilder

this builder