Class HealthCheckResponseBuilder.BuildPart
java.lang.Object
org.gcube.common.health.api.response.HealthCheckResponseBuilder.BuildPart
- Direct Known Subclasses:
HealthCheckResponseBuilder.SuccessPart
- Enclosing class:
- HealthCheckResponseBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates the response with the values given so far: each call returns a new response.Adds an entry to the structured data of the check.
-
Method Details
-
withData
Adds an entry to the structured data of the check.- Parameters:
key- the name of the entryvalue- its value: a string, a number, a boolean or a list of them- Returns:
- this part, to add more data or to build the response
-
build
Creates the response with the values given so far: each call returns a new response.- Returns:
- the response
- Throws:
IllegalStateException- if the response is not valid
-