Class DefaultHealthContributorRegistry
java.lang.Object
org.springframework.boot.actuate.health.DefaultHealthContributorRegistry
- All Implemented Interfaces:
Iterable<NamedContributor<HealthContributor>>
,ContributorRegistry<HealthContributor>
,HealthContributorRegistry
,NamedContributors<HealthContributor>
Default
HealthContributorRegistry
implementation.- Since:
- 2.2.0
- Author:
- Phillip Webb
-
Constructor Summary
ConstructorDescriptionDefaultHealthContributorRegistry
(Map<String, HealthContributor> contributors) DefaultHealthContributorRegistry
(Map<String, HealthContributor> contributors, Function<String, String> nameFactory) -
Method Summary
Modifier and TypeMethodDescriptiongetContributor
(String name) Return the contributor with the given name.iterator()
void
registerContributor
(String name, HealthContributor contributor) Register a contributor with the givenname
.unregisterContributor
(String name) Unregister a previously registered contributor.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.boot.actuate.health.ContributorRegistry
registerContributor, unregisterContributor
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.springframework.boot.actuate.health.NamedContributors
getContributor, stream
-
Constructor Details
-
DefaultHealthContributorRegistry
public DefaultHealthContributorRegistry() -
DefaultHealthContributorRegistry
-
DefaultHealthContributorRegistry
-
-
Method Details
-
registerContributor
Description copied from interface:ContributorRegistry
Register a contributor with the givenname
.- Specified by:
registerContributor
in interfaceContributorRegistry<C>
- Parameters:
name
- the name of the contributorcontributor
- the contributor to register
-
unregisterContributor
Description copied from interface:ContributorRegistry
Unregister a previously registered contributor.- Specified by:
unregisterContributor
in interfaceContributorRegistry<C>
- Parameters:
name
- the name of the contributor to unregister- Returns:
- the unregistered indicator, or
null
if no indicator was found in the registry for the givenname
.
-
getContributor
Description copied from interface:NamedContributors
Return the contributor with the given name.- Specified by:
getContributor
in interfaceNamedContributors<C>
- Parameters:
name
- the name of the contributor- Returns:
- a contributor instance or
null
-
iterator
-