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
-
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 aHealthContributorNameGeneratorthat uses the unchanged bean name as the health contributor name.Return aHealthContributorNameGeneratorthat removes standard suffixes.withoutSuffixes(String... suffixes) Return aHealthContributorNameGeneratorthat 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 aHealthContributorNameGeneratorthat uses the unchanged bean name as the health contributor name.- Returns:
- a new
HealthContributorNameGeneratorinstance
-
withoutStandardSuffixes
Return aHealthContributorNameGeneratorthat removes standard suffixes.- Returns:
- a new
HealthContributorNameGeneratorinstance
-
withoutSuffixes
Return aHealthContributorNameGeneratorthat removes the given suffixes.- Parameters:
suffixes- the suffixes to remove (not case sensitive)- Returns:
- a new
HealthContributorNameGeneratorinstance
-