Package io.smallrye.health.event
Record Class SmallRyeHealthStatusChangeEvent
java.lang.Object
java.lang.Record
io.smallrye.health.event.SmallRyeHealthStatusChangeEvent
@Experimental("Health change events")
public record SmallRyeHealthStatusChangeEvent(Instant timestamp, HealthType healthType, SmallRyeHealth health)
extends Record
Event for the health state changes. Can be consumed as a CDI event utilizing the
specification-defined qualifiers (
Example:
Liveness,
Readiness).
Example:
public void observeLiveness(@Observes @Liveness SmallRyeHealthStatusChangeEvent event) {
...
}
-
Constructor Summary
ConstructorsConstructorDescriptionSmallRyeHealthStatusChangeEvent(HealthType healthType, SmallRyeHealth health) SmallRyeHealthStatusChangeEvent(Instant timestamp, HealthType healthType, SmallRyeHealth health) Creates an instance of aSmallRyeHealthStatusChangeEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.health()Returns the value of thehealthrecord component.Returns the value of thehealthTyperecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SmallRyeHealthStatusChangeEvent
-
SmallRyeHealthStatusChangeEvent
-
SmallRyeHealthStatusChangeEvent
public SmallRyeHealthStatusChangeEvent(Instant timestamp, HealthType healthType, SmallRyeHealth health) Creates an instance of aSmallRyeHealthStatusChangeEventrecord class.- Parameters:
timestamp- the value for thetimestamprecord componenthealthType- the value for thehealthTyperecord componenthealth- the value for thehealthrecord component
-
-
Method Details
-
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). -
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
healthType
Returns the value of thehealthTyperecord component.- Returns:
- the value of the
healthTyperecord component
-
health
Returns the value of thehealthrecord component.- Returns:
- the value of the
healthrecord component
-