类 ApplicationAvailabilityBean
java.lang.Object
org.springframework.boot.availability.ApplicationAvailabilityBean
public class ApplicationAvailabilityBean
extends Object
implements ApplicationAvailability, ApplicationListener<AvailabilityChangeEvent<?>>
Bean that provides an
ApplicationAvailability
implementation by listening for
change events
.- 从以下版本开始:
- 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.<S extends AvailabilityState>
SReturnAvailabilityState
information for the application.<S extends AvailabilityState>
SReturnAvailabilityState
information for the application.void
onApplicationEvent
(AvailabilityChangeEvent<?> event) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.springframework.boot.availability.ApplicationAvailability
getLivenessState, getReadinessState
从接口继承的方法 org.springframework.context.ApplicationListener
supportsAsyncExecution
-
构造器详细资料
-
ApplicationAvailabilityBean
public ApplicationAvailabilityBean()
-
-
方法详细资料
-
getState
从接口复制的说明:ApplicationAvailability
ReturnAvailabilityState
information for the application.- 指定者:
getState
在接口中ApplicationAvailability
- 类型参数:
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
从接口复制的说明:ApplicationAvailability
ReturnAvailabilityState
information for the application.- 指定者:
getState
在接口中ApplicationAvailability
- 类型参数:
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
public <S extends AvailabilityState> AvailabilityChangeEvent<S> getLastChangeEvent(Class<S> stateType) 从接口复制的说明:ApplicationAvailability
Return the lastAvailabilityChangeEvent
received for a given state type.- 指定者:
getLastChangeEvent
在接口中ApplicationAvailability
- 类型参数:
S
- the state type- 参数:
stateType
- the state type- 返回:
- the readiness state or
null
if no event of the given type has been published yet
-
onApplicationEvent
- 指定者:
onApplicationEvent
在接口中ApplicationListener<AvailabilityChangeEvent<?>>
-