接口 ContributorRegistry<C>
- 类型参数:
C- the contributor type
- 所有超级接口:
Iterable<NamedContributor<C>>,NamedContributors<C>
A mutable registry of health endpoint contributors (either
HealthContributor or
ReactiveHealthContributor).- 从以下版本开始:
- 2.2.0
- 作者:
- Phillip Webb, Andy Wilkinson, Vedran Pavic, Stephane Nicoll
- 另请参阅:
-
方法概要
修饰符和类型方法说明voidregisterContributor(String name, C contributor) Register a contributor with the givenname.unregisterContributor(String name) Unregister a previously registered contributor.从接口继承的方法 java.lang.Iterable
forEach, iterator, spliterator从接口继承的方法 org.springframework.boot.actuate.health.NamedContributors
getContributor, stream
-
方法详细资料
-
registerContributor
Register a contributor with the givenname.- 参数:
name- the name of the contributorcontributor- the contributor to register- 抛出:
IllegalStateException- if the contributor cannot be registered with the givenname.
-
unregisterContributor
Unregister a previously registered contributor.- 参数:
name- the name of the contributor to unregister- 返回:
- the unregistered indicator, or
nullif no indicator was found in the registry for the givenname.
-