HealthBuilder class final

Builds a Health: a status and details added one by one.

Spring Boot (Java): Health.Builder.

Constructors

HealthBuilder([Status _status = Status.unknown])
A builder with status, UNKNOWN by default.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

build() → Health
The health built so far.
down([Object? error]) → HealthBuilder
Sets the status DOWN.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
outOfService() → HealthBuilder
Sets the status OUT_OF_SERVICE.
status(Status status) → HealthBuilder
Sets status.
statusCode(String code) → HealthBuilder
Sets the status of code, such as FATAL.
toString() → String
A string representation of this object.
inherited
unknown() → HealthBuilder
Sets the status UNKNOWN.
up() → HealthBuilder
Sets the status UP.
withDetail(String key, Object? value) → HealthBuilder
Adds the detail key with value.
withDetails(Map<String, Object?> details) → HealthBuilder
Adds every entry of details.
withException(Object error) → HealthBuilder
Adds the detail error: the type of error and its message, as Spring Boot writes ClassName: message.

Operators

operator ==(Object other) → bool
The equality operator.
inherited