Record Class Health.Report
java.lang.Object
java.lang.Record
com.jsgalactic.axiom.observability.Health.Report
- Record Components:
status- UP only when every check is UP and, for readiness, the application accepts trafficchecks- each check's state in registration order; empty when no check ran
- Enclosing class:
Health
public static record Health.Report(Health.Status status, Map<String,Health.Status> checks)
extends Record
The outcome of one probe.
-
Constructor Summary
ConstructorsConstructorDescriptionReport(Health.Status status, Map<String, Health.Status> checks) Copies the checks. -
Method Summary
Modifier and TypeMethodDescriptionchecks()Returns the value of thechecksrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.status()Returns the value of thestatusrecord component.toJson()Renders the report as small JSON:{"status":"UP","checks":{"database":"UP"}}.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Report
Copies the checks.
-
-
Method Details
-
toJson
Renders the report as small JSON:{"status":"UP","checks":{"database":"UP"}}. Check names are restricted to letters, digits and_ . -, so no escaping is needed.- Returns:
- JSON text
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
checks
Returns the value of thechecksrecord component.- Returns:
- the value of the
checksrecord component
-