Interface HealthContributorRegistry
- All Superinterfaces:
HealthContributors, Iterable<HealthContributors.Entry>
- All Known Implementing Classes:
DefaultHealthContributorRegistry
A mutable registry of
health contributors.- Since:
- 4.0.0
- Author:
- Phillip Webb
-
Nested Class Summary
Nested classes/interfaces inherited from interface HealthContributors
HealthContributors.Entry -
Method Summary
Modifier and TypeMethodDescriptionvoidregisterContributor(String name, HealthContributor contributor) Register a contributor with the givenname.@Nullable HealthContributorunregisterContributor(String name) Unregister a previously registered contributor.Methods inherited from interface HealthContributors
getContributor, iterator, streamMethods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
registerContributor
Register a contributor with the givenname.- Parameters:
name- the name of the contributorcontributor- the contributor to register- Throws:
IllegalStateException- if the contributor cannot be registered with the givenname.
-
unregisterContributor
Unregister a previously registered contributor.- Parameters:
name- the name of the contributor to unregister- Returns:
- the unregistered indicator, or
nullif no indicator was found in the registry for the givenname.
-