接口 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 lastAvailabilityChangeEvent
received for a given state type.default LivenessState
Return theLivenessState
of the application.default ReadinessState
Return theReadinessState
of the application.<S extends AvailabilityState>
SReturnAvailabilityState
information for the application.<S extends AvailabilityState>
SReturnAvailabilityState
information for the application.
-
方法详细资料
-
getLivenessState
Return theLivenessState
of the application.- 返回:
- the liveness state
-
getReadinessState
Return theReadinessState
of the application.- 返回:
- the readiness state
-
getState
ReturnAvailabilityState
information 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
ReturnAvailabilityState
information for the application.- 类型参数:
S
- the state type- 参数:
stateType
- the state type- 返回:
- the readiness state or
null
if no event of the given type has been published yet - 另请参阅:
-
getLastChangeEvent
Return the lastAvailabilityChangeEvent
received for a given state type.- 类型参数:
S
- the state type- 参数:
stateType
- the state type- 返回:
- the readiness state or
null
if no event of the given type has been published yet
-