EurekaHealthCheckHandler: Added protected getter to obtain CompositeHealthIndicator (#2583)

* Adding protected getter to obtain CompositeHealthIndicator. This allows subclasses to obtain this indicator's health details map which is useful for error reporting.
This commit is contained in:
Riz Joj
2018-01-02 14:13:43 -05:00
committed by Ryan Baxter
parent 04560724d3
commit 3abc89b9e7

View File

@@ -100,7 +100,7 @@ public class EurekaHealthCheckHandler implements HealthCheckHandler, Application
}
protected InstanceStatus getHealthStatus() {
final Status status = healthIndicator.health().getStatus();
final Status status = getHealthIndicator().health().getStatus();
return mapToInstanceStatus(status);
}
@@ -110,4 +110,8 @@ public class EurekaHealthCheckHandler implements HealthCheckHandler, Application
}
return STATUS_MAPPING.get(status);
}
protected CompositeHealthIndicator getHealthIndicator() {
return healthIndicator;
}
}