类 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 lastAvailabilityChangeEventreceived for a given state type.<S extends AvailabilityState>
SReturnAvailabilityStateinformation for the application.<S extends AvailabilityState>
SReturnAvailabilityStateinformation for the application.voidonApplicationEvent(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
从接口复制的说明:ApplicationAvailabilityReturnAvailabilityStateinformation 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
从接口复制的说明:ApplicationAvailabilityReturnAvailabilityStateinformation for the application.- 指定者:
getState在接口中ApplicationAvailability- 类型参数:
S- the state type- 参数:
stateType- the state type- 返回:
- the readiness state or
nullif no event of the given type has been published yet - 另请参阅:
-
getLastChangeEvent
public <S extends AvailabilityState> AvailabilityChangeEvent<S> getLastChangeEvent(Class<S> stateType) 从接口复制的说明:ApplicationAvailabilityReturn the lastAvailabilityChangeEventreceived for a given state type.- 指定者:
getLastChangeEvent在接口中ApplicationAvailability- 类型参数:
S- the state type- 参数:
stateType- the state type- 返回:
- the readiness state or
nullif no event of the given type has been published yet
-
onApplicationEvent
- 指定者:
onApplicationEvent在接口中ApplicationListener<AvailabilityChangeEvent<?>>
-