Class CompositeHealthIndicator
- java.lang.Object
- org.springframework.boot.actuate.health.CompositeHealthIndicator
- All Implemented Interfaces:
HealthIndicator
public class CompositeHealthIndicator extends Object implements HealthIndicator
HealthIndicator
that returns health indications from all registered delegates.- Since:
- 1.1.0
Constructor Summary
Constructors Constructor Description CompositeHealthIndicator(HealthAggregator healthAggregator)
Create a newCompositeHealthIndicator
.CompositeHealthIndicator(HealthAggregator healthAggregator, Map<String,HealthIndicator> indicators)
Create a newCompositeHealthIndicator
from the specified indicators.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHealthIndicator(String name, HealthIndicator indicator)
Health
health()
Return an indication of health.
Constructor Detail
CompositeHealthIndicator
public CompositeHealthIndicator(HealthAggregator healthAggregator)
Create a newCompositeHealthIndicator
.- Parameters:
healthAggregator
- the health aggregator
CompositeHealthIndicator
public CompositeHealthIndicator(HealthAggregator healthAggregator, Map<String,HealthIndicator> indicators)
Create a newCompositeHealthIndicator
from the specified indicators.- Parameters:
healthAggregator
- the health aggregatorindicators
- a map ofHealthIndicator
s with the key being used as an indicator name.
Method Detail
addHealthIndicator
public void addHealthIndicator(String name, HealthIndicator indicator)
health
public Health health()
Description copied from interface:HealthIndicator
Return an indication of health.- Specified by:
health
in interfaceHealthIndicator
- Returns:
- the health for