Interface HealthContributors
- All Superinterfaces:
Iterable<HealthContributors.Entry>
- All Known Subinterfaces:
CompositeHealthContributor, HealthContributorRegistry
- All Known Implementing Classes:
DefaultHealthContributorRegistry
A collection of named
health contributors.- Since:
- 4.0.0
- Author:
- Phillip Webb
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA health contributor entry. -
Method Summary
Modifier and TypeMethodDescription@Nullable HealthContributorgetContributor(String name) Return the contributor with the given name.default Iterator<HealthContributors.Entry> iterator()static HealthContributorsof(HealthContributors... contributors) Factory method to create a newHealthContributorsinstance composed of the given contributors.stream()Return a stream of the contributor entries.Methods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
getContributor
Return the contributor with the given name.- Parameters:
name- the name of the contributor- Returns:
- a contributor instance or
null
-
iterator
- Specified by:
iteratorin interfaceIterable<HealthContributors.Entry>
-
stream
Stream<HealthContributors.Entry> stream()Return a stream of the contributor entries.- Returns:
- the stream of named contributors
-
of
Factory method to create a newHealthContributorsinstance composed of the given contributors.- Parameters:
contributors- the source contributors in the order they should be combined- Returns:
- a new
HealthContributorsinstance
-