public class EurekaHealthCheckHandler extends Object implements com.netflix.appinfo.HealthCheckHandler, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered, org.springframework.context.Lifecycle
InstanceInfo.InstanceStatus that
will be propagated to Eureka registry.
On each heartbeat Eureka performs the health check invoking registered
HealthCheckHandler. By default this implementation will perform aggregation of
all registered HealthIndicator through registered StatusAggregator.
A null status is returned when the application context is closed (or in the
process of being closed). This prevents Eureka from updating the health status and only
consider the status present in the current InstanceInfo.HealthCheckHandler,
StatusAggregator| Constructor and Description |
|---|
EurekaHealthCheckHandler(org.springframework.boot.actuate.health.StatusAggregator statusAggregator) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected com.netflix.appinfo.InstanceInfo.InstanceStatus |
getHealthStatus() |
int |
getOrder() |
com.netflix.appinfo.InstanceInfo.InstanceStatus |
getStatus(com.netflix.appinfo.InstanceInfo.InstanceStatus instanceStatus) |
protected org.springframework.boot.actuate.health.Status |
getStatus(org.springframework.boot.actuate.health.StatusAggregator statusAggregator) |
boolean |
isRunning() |
protected com.netflix.appinfo.InstanceInfo.InstanceStatus |
mapToInstanceStatus(org.springframework.boot.actuate.health.Status status) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
start() |
void |
stop() |
public EurekaHealthCheckHandler(org.springframework.boot.actuate.health.StatusAggregator statusAggregator)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic com.netflix.appinfo.InstanceInfo.InstanceStatus getStatus(com.netflix.appinfo.InstanceInfo.InstanceStatus instanceStatus)
getStatus in interface com.netflix.appinfo.HealthCheckHandlerprotected com.netflix.appinfo.InstanceInfo.InstanceStatus getHealthStatus()
protected org.springframework.boot.actuate.health.Status getStatus(org.springframework.boot.actuate.health.StatusAggregator statusAggregator)
protected com.netflix.appinfo.InstanceInfo.InstanceStatus mapToInstanceStatus(org.springframework.boot.actuate.health.Status status)
public int getOrder()
getOrder in interface org.springframework.core.Orderedpublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.LifecycleCopyright © 2022 Pivotal Software, Inc.. All rights reserved.