Interface ApplicationAvailability
- All Known Implementing Classes:
- ApplicationAvailabilityBean
public interface ApplicationAvailability
Provides 
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 through AvailabilityChangeEvent.publish(org.springframework.context.ApplicationContext, S).
- Since:
- 2.3.0
- Author:
- Brian Clozel, Phillip Webb
- 
Method SummaryModifier and TypeMethodDescription<S extends AvailabilityState>
 AvailabilityChangeEvent<S>getLastChangeEvent(Class<S> stateType) Return the lastAvailabilityChangeEventreceived for a given state type.default LivenessStateReturn theLivenessStateof the application.default ReadinessStateReturn theReadinessStateof the application.<S extends AvailabilityState>
 SReturnAvailabilityStateinformation for the application.<S extends AvailabilityState>
 SReturnAvailabilityStateinformation for the application.
- 
Method Details- 
getLivenessStateReturn theLivenessStateof the application.- Returns:
- the liveness state
 
- 
getReadinessStateReturn theReadinessStateof the application.- Returns:
- the readiness state
 
- 
getStateReturnAvailabilityStateinformation for the application.- Type Parameters:
- S- the state type
- Parameters:
- stateType- the state type
- defaultState- the default state to return if no event of the given type has been published yet (must not be- null).
- Returns:
- the readiness state
- See Also:
 
- 
getStateReturnAvailabilityStateinformation for the application.- Type Parameters:
- S- the state type
- Parameters:
- stateType- the state type
- Returns:
- the readiness state or nullif no event of the given type has been published yet
- See Also:
 
- 
getLastChangeEventReturn the lastAvailabilityChangeEventreceived for a given state type.- Type Parameters:
- S- the state type
- Parameters:
- stateType- the state type
- Returns:
- the readiness state or nullif no event of the given type has been published yet
 
 
-