接口 ApplicationAvailability
- 所有已知实现类:
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).
- 从以下版本开始:
- 2.3.0
- 作者:
- Brian Clozel, Phillip Webb
-
方法概要
修饰符和类型方法说明<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.
-
方法详细资料
-
getLivenessState
Return theLivenessStateof the application.- 返回:
- the liveness state
-
getReadinessState
Return theReadinessStateof the application.- 返回:
- the readiness state
-
getState
ReturnAvailabilityStateinformation for the application.- 类型参数:
S- the state type- 参数:
stateType- the state typedefaultState- the default state to return if no event of the given type has been published yet (must not benull).- 返回:
- the readiness state
- 另请参阅:
-
getState
ReturnAvailabilityStateinformation for the application.- 类型参数:
S- the state type- 参数:
stateType- the state type- 返回:
- the readiness state or
nullif no event of the given type has been published yet - 另请参阅:
-
getLastChangeEvent
Return the lastAvailabilityChangeEventreceived for a given state type.- 类型参数:
S- the state type- 参数:
stateType- the state type- 返回:
- the readiness state or
nullif no event of the given type has been published yet
-