Interface HealthContributorNameGenerator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy used to create health contributor names from bean names.
- Since:
- 4.0.0
- Author:
- Phillip Webb
-
Method Summary
Modifier and TypeMethodDescriptiongenerateContributorName
(String beanName) Generate the health contributor name for the given bean name.default <C> Consumer
<BiConsumer<String, C>> Return a registrar that can be used to register the given contributor beans with a generated name.Return aHealthContributorNameGenerator
that uses the unchanged bean name as the health contributor name.Return aHealthContributorNameGenerator
that removes standard suffixes.withoutSuffixes
(String... suffixes) Return aHealthContributorNameGenerator
that removes the given suffixes.
-
Method Details
-
generateContributorName
-
registrar
Return a registrar that can be used to register the given contributor beans with a generated name.- Type Parameters:
C
- the contributor type- Parameters:
contributorBeans
- the contributor beans- Returns:
- a registrar
-
unchanged
Return aHealthContributorNameGenerator
that uses the unchanged bean name as the health contributor name.- Returns:
- a new
HealthContributorNameGenerator
instance
-
withoutStandardSuffixes
Return aHealthContributorNameGenerator
that removes standard suffixes.- Returns:
- a new
HealthContributorNameGenerator
instance
-
withoutSuffixes
Return aHealthContributorNameGenerator
that removes the given suffixes.- Parameters:
suffixes
- the suffixes to remove (not case sensitive)- Returns:
- a new
HealthContributorNameGenerator
instance
-