Commit 3abc89b9 by Riz Joj Committed by Ryan Baxter

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.
parent 04560724
...@@ -100,7 +100,7 @@ public class EurekaHealthCheckHandler implements HealthCheckHandler, Application ...@@ -100,7 +100,7 @@ public class EurekaHealthCheckHandler implements HealthCheckHandler, Application
} }
protected InstanceStatus getHealthStatus() { protected InstanceStatus getHealthStatus() {
final Status status = healthIndicator.health().getStatus(); final Status status = getHealthIndicator().health().getStatus();
return mapToInstanceStatus(status); return mapToInstanceStatus(status);
} }
...@@ -110,4 +110,8 @@ public class EurekaHealthCheckHandler implements HealthCheckHandler, Application ...@@ -110,4 +110,8 @@ public class EurekaHealthCheckHandler implements HealthCheckHandler, Application
} }
return STATUS_MAPPING.get(status); return STATUS_MAPPING.get(status);
} }
protected CompositeHealthIndicator getHealthIndicator() {
return healthIndicator;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment