本文整理汇总了Java中org.springframework.boot.actuate.health.CompositeHealthIndicator.addHealthIndicator方法的典型用法代码示例。如果您正苦于以下问题:Java CompositeHealthIndicator.addHealthIndicator方法的具体用法?Java CompositeHealthIndicator.addHealthIndicator怎么用?Java CompositeHealthIndicator.addHealthIndicator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.boot.actuate.health.CompositeHealthIndicator
的用法示例。
在下文中一共展示了CompositeHealthIndicator.addHealthIndicator方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: internalInvokeHealthIndicators
import org.springframework.boot.actuate.health.CompositeHealthIndicator; //导入方法依赖的package包/类
private Health internalInvokeHealthIndicators() {
CompositeHealthIndicator healthIndicator = new CompositeHealthIndicator(
healthAggregator);
for (Map.Entry<String, T> h : collectIndicators().entrySet()) {
healthIndicator.addHealthIndicator(getKey(h.getKey()), h.getValue());
}
return healthIndicator.health();
}
开发者ID:dm-drogeriemarkt,项目名称:extended-actuator-health-endpoints,代码行数:9,代码来源:ExtendedHealthEndpoint.java
示例2: HealthService
import org.springframework.boot.actuate.health.CompositeHealthIndicator; //导入方法依赖的package包/类
public HealthService(HealthAggregator healthAggregator, Map<String, org.springframework.boot.actuate.health.HealthIndicator> healthIndicators) {
Assert.notNull(healthAggregator, "HealthAggregator must not be null");
Assert.notNull(healthIndicators, "HealthIndicators must not be null");
CompositeHealthIndicator healthIndicator = new CompositeHealthIndicator(
healthAggregator);
for (Map.Entry<String, org.springframework.boot.actuate.health.HealthIndicator> entry : healthIndicators.entrySet()) {
healthIndicator.addHealthIndicator(getKey(entry.getKey()), entry.getValue());
}
this.healthIndicators = healthIndicators;
this.healthIndicator = healthIndicator;
}
示例3: createHealthIndicator
import org.springframework.boot.actuate.health.CompositeHealthIndicator; //导入方法依赖的package包/类
protected HealthIndicator createHealthIndicator(Map<String, S> beans) {
if (beans.size() == 1) {
return createHealthIndicator(beans.values().iterator().next());
}
CompositeHealthIndicator composite = new CompositeHealthIndicator(
this.healthAggregator);
for (Map.Entry<String, S> entry : beans.entrySet()) {
composite.addHealthIndicator(entry.getKey(),
createHealthIndicator(entry.getValue()));
}
return composite;
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:13,代码来源:CompositeHealthIndicatorConfiguration.java
示例4: HealthEndpoint
import org.springframework.boot.actuate.health.CompositeHealthIndicator; //导入方法依赖的package包/类
/**
* Create a new {@link HealthIndicator} instance.
* @param healthAggregator the health aggregator
* @param healthIndicators the health indicators
*/
public HealthEndpoint(HealthAggregator healthAggregator,
Map<String, HealthIndicator> healthIndicators) {
super("health", false);
Assert.notNull(healthAggregator, "HealthAggregator must not be null");
Assert.notNull(healthIndicators, "HealthIndicators must not be null");
CompositeHealthIndicator healthIndicator = new CompositeHealthIndicator(
healthAggregator);
for (Map.Entry<String, HealthIndicator> entry : healthIndicators.entrySet()) {
healthIndicator.addHealthIndicator(getKey(entry.getKey()), entry.getValue());
}
this.healthIndicator = healthIndicator;
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:18,代码来源:HealthEndpoint.java