Interface ContributorRegistry<C>
- Type Parameters:
C- the contributor type
- All Superinterfaces:
Iterable<NamedContributor<C>>,NamedContributors<C>
- All Known Subinterfaces:
HealthContributorRegistry,ReactiveHealthContributorRegistry
- All Known Implementing Classes:
DefaultHealthContributorRegistry,DefaultReactiveHealthContributorRegistry
A mutable registry of health endpoint contributors (either
HealthContributor or
ReactiveHealthContributor).- Since:
- 2.2.0
- Author:
- Phillip Webb, Andy Wilkinson, Vedran Pavic, Stephane Nicoll
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidregisterContributor(String name, C contributor) Register a contributor with the givenname.unregisterContributor(String name) Unregister a previously registered contributor.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.springframework.boot.actuate.health.NamedContributors
getContributor, stream
-
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.
-