The current availability states of the application.
Inject it to ask whether the application is alive or ready; change the states by publishing an AvailabilityChangeEvent.
if (availability.readinessState == ReadinessState.acceptingTraffic) { ... }
Spring Boot (Java): ApplicationAvailability.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- livenessState → LivenessState
-
The last LivenessState published; LivenessState.broken before the
first.
no setter
- readinessState → ReadinessState
-
The last ReadinessState published;
ReadinessState.refusingTraffic before the first.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getLastChangeEvent<
S extends AvailabilityState> () → AvailabilityChangeEvent< S> ? -
The last event of a state of type
S, ornullwhen none was published. -
getState<
S extends AvailabilityState> (S defaultState) → S -
The last state of type
Spublished, ordefaultStatewhen none was. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited