public interface ApplicationAvailability
availability state information for the application.
 
 Components can inject this class to get the current state information. To update the
 state of the application an AvailabilityChangeEvent should be
 published to the application context with
 directly or via AvailabilityChangeEvent.publish(org.springframework.context.ApplicationContext, S).
| Modifier and Type | Method and Description | 
|---|---|
| <S extends AvailabilityState> | getLastChangeEvent(Class<S> stateType)Return the last  AvailabilityChangeEventreceived for a given state type. | 
| default LivenessState | getLivenessState()Return the  LivenessStateof the application. | 
| default ReadinessState | getReadinessState()Return the  ReadinessStateof the application. | 
| <S extends AvailabilityState> | getState(Class<S> stateType)Return  AvailabilityStateinformation for the application. | 
| <S extends AvailabilityState> | getState(Class<S> stateType,
        S defaultState)Return  AvailabilityStateinformation for the application. | 
default LivenessState getLivenessState()
LivenessState of the application.default ReadinessState getReadinessState()
ReadinessState of the application.<S extends AvailabilityState> S getState(Class<S> stateType, S defaultState)
AvailabilityState information for the application.S - the state typestateType - the state typedefaultState - the default state to return if no event of the given type has
 been published yet (must not be null.getState(Class)<S extends AvailabilityState> S getState(Class<S> stateType)
AvailabilityState information for the application.S - the state typestateType - the state typenull if no event of the given type has been
 published yetgetState(Class, AvailabilityState)<S extends AvailabilityState> AvailabilityChangeEvent<S> getLastChangeEvent(Class<S> stateType)
AvailabilityChangeEvent received for a given state type.S - the state typestateType - the state typenull if no event of the given type has been
 published yet