Interface CompositeHealthContributor
- All Superinterfaces:
HealthContributor
,Iterable<NamedContributor<HealthContributor>>
,NamedContributors<HealthContributor>
public interface CompositeHealthContributor
extends HealthContributor, NamedContributors<HealthContributor>
A
HealthContributor
that is composed of other HealthContributor
instances.- Since:
- 2.2.0
- Author:
- Phillip Webb
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic CompositeHealthContributor
fromMap
(Map<String, ? extends HealthContributor> map) Factory method that will create aCompositeHealthContributor
from the specified map.static <V> CompositeHealthContributor
fromMap
(Map<String, V> map, Function<V, ? extends HealthContributor> valueAdapter) Factory method that will create aCompositeHealthContributor
from the specified map.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.springframework.boot.actuate.health.NamedContributors
getContributor, stream
-
Method Details
-
fromMap
Factory method that will create aCompositeHealthContributor
from the specified map.- Parameters:
map
- the source map- Returns:
- a composite health contributor instance
-
fromMap
static <V> CompositeHealthContributor fromMap(Map<String, V> map, Function<V, ? extends HealthContributor> valueAdapter) Factory method that will create aCompositeHealthContributor
from the specified map.- Type Parameters:
V
- the value type- Parameters:
map
- the source mapvalueAdapter
- function used to adapt the map value- Returns:
- a composite health contributor instance
-