Class CompositeHealthContributorConfiguration<I extends HealthIndicator, B>
java.lang.Object
org.springframework.boot.health.autoconfigure.contributor.CompositeHealthContributorConfiguration<I,B>
- Type Parameters:
I- the health indicator typeB- the bean type
public abstract class CompositeHealthContributorConfiguration<I extends HealthIndicator, B>
extends Object
Base class for health contributor configurations that can combine source beans into a
composite.
- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionCompositeHealthContributorConfiguration(Function<B, I> indicatorFactory) Creates aCompositeHealthContributorConfigurationthat will use the givenindicatorFactoryto createHealthIndicatorinstances. -
Method Summary
Modifier and TypeMethodDescriptionprotected final HealthContributorcreateComposite(Map<String, B> beans) protected final HealthContributorcreateContributor(Map<String, B> beans) protected final HealthContributorcreateContributor(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, Class<B> beanType) Creates a composite contributor from the beans of the givenbeanTyperetrieved from the givenbeanFactory.protected IcreateIndicator(B bean)
-
Constructor Details
-
CompositeHealthContributorConfiguration
Creates aCompositeHealthContributorConfigurationthat will use the givenindicatorFactoryto createHealthIndicatorinstances.- Parameters:
indicatorFactory- the function to create health indicator instances
-
-
Method Details
-
createComposite
-
createContributor
protected final HealthContributor createContributor(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, Class<B> beanType) Creates a composite contributor from the beans of the givenbeanTyperetrieved from the givenbeanFactory.- Parameters:
beanFactory- the bean factory from which the beans are retrievedbeanType- the type of the beans that are retrieved- Returns:
- the contributor
-
createContributor
-
createIndicator
-