Class HealthEndpoint
- java.lang.Object
- org.springframework.boot.actuate.health.HealthEndpoint
@Endpoint(id="health") public class HealthEndpoint extends Object
Endpoint
to expose application health information.- Since:
- 2.0.0
Constructor Summary
Constructors Constructor Description HealthEndpoint(HealthIndicator healthIndicator)
Create a newHealthEndpoint
instance that will use the givenhealthIndicator
to generate its response.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Health
health()
Health
healthForComponent(String component)
Return theHealth
of a particular component ornull
if such component does not exist.Health
healthForComponentInstance(String component, String instance)
Return theHealth
of a particularinstance
managed by the specifiedcomponent
ornull
if that particular component is not aCompositeHealthIndicator
or if such instance does not exist.
Constructor Detail
HealthEndpoint
public HealthEndpoint(HealthIndicator healthIndicator)
Create a newHealthEndpoint
instance that will use the givenhealthIndicator
to generate its response.- Parameters:
healthIndicator
- the health indicator
Method Detail
health
@ReadOperation public Health health()
healthForComponent
@ReadOperation public Health healthForComponent(@Selector String component)
Return theHealth
of a particular component ornull
if such component does not exist.- Parameters:
component
- the name of a particularHealthIndicator
- Returns:
- the
Health
for the component ornull
healthForComponentInstance
@ReadOperation public Health healthForComponentInstance(@Selector String component, @Selector String instance)
Return theHealth
of a particularinstance
managed by the specifiedcomponent
ornull
if that particular component is not aCompositeHealthIndicator
or if such instance does not exist.- Parameters:
component
- the name of a particularCompositeHealthIndicator
instance
- the name of an instance managed by that component- Returns:
- the
Health
for the component instance ofnull