public class DefaultHealthContributorRegistry extends Object implements HealthContributorRegistry
HealthContributorRegistry
implementation.Constructor and Description |
---|
DefaultHealthContributorRegistry() |
DefaultHealthContributorRegistry(Map<String,HealthContributor> contributors) |
DefaultHealthContributorRegistry(Map<String,HealthContributor> contributors,
Function<String,String> nameFactory) |
Modifier and Type | Method and Description |
---|---|
C |
getContributor(String name)
Return the contributor with the given name.
|
Iterator<NamedContributor<C>> |
iterator() |
void |
registerContributor(String name,
C contributor)
Register a contributor with the given
name . |
C |
unregisterContributor(String name)
Unregister a previously registered contributor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
registerContributor, unregisterContributor
getContributor, stream
forEach, iterator, spliterator
public DefaultHealthContributorRegistry()
public DefaultHealthContributorRegistry(Map<String,HealthContributor> contributors)
public void registerContributor(String name, C contributor)
ContributorRegistry
name
.registerContributor
in interface ContributorRegistry<C>
name
- the name of the contributorcontributor
- the contributor to registerpublic C unregisterContributor(String name)
ContributorRegistry
unregisterContributor
in interface ContributorRegistry<C>
name
- the name of the contributor to unregisternull
if no indicator was found in
the registry for the given name
.public C getContributor(String name)
NamedContributors
getContributor
in interface NamedContributors<C>
name
- the name of the contributornull
public Iterator<NamedContributor<C>> iterator()
iterator
in interface Iterable<NamedContributor<C>>
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.