Class HealthEndpoint
- java.lang.Object
- org.springframework.boot.actuate.health.HealthEndpoint
@Endpoint(id="health") public class HealthEndpoint extends Object
Endpointto expose application health information.- Since:
- 2.0.0
Constructor Summary
Constructors Constructor Description HealthEndpoint(HealthIndicator healthIndicator)Create a newHealthEndpointinstance that will use the givenhealthIndicatorto generate its response.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Healthhealth()HealthhealthForComponent(String component)Return theHealthof a particular component ornullif such component does not exist.HealthhealthForComponentInstance(String component, String instance)Return theHealthof a particularinstancemanaged by the specifiedcomponentornullif that particular component is not aCompositeHealthIndicatoror if such instance does not exist.
Constructor Detail
HealthEndpoint
public HealthEndpoint(HealthIndicator healthIndicator)
Create a newHealthEndpointinstance that will use the givenhealthIndicatorto generate its response.- Parameters:
healthIndicator- the health indicator
Method Detail
health
@ReadOperation public Health health()
healthForComponent
@ReadOperation public Health healthForComponent(@Selector String component)
Return theHealthof a particular component ornullif such component does not exist.- Parameters:
component- the name of a particularHealthIndicator- Returns:
- the
Healthfor the component ornull
healthForComponentInstance
@ReadOperation public Health healthForComponentInstance(@Selector String component, @Selector String instance)
Return theHealthof a particularinstancemanaged by the specifiedcomponentornullif that particular component is not aCompositeHealthIndicatoror if such instance does not exist.- Parameters:
component- the name of a particularCompositeHealthIndicatorinstance- the name of an instance managed by that component- Returns:
- the
Healthfor the component instance ofnull