Package org.springframework.boot.actuate.health

Examples of org.springframework.boot.actuate.health.CompositeHealthIndicator


    super("health", false, true);

    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> h : healthIndicators.entrySet()) {
      healthIndicator.addHealthIndicator(getKey(h.getKey()), h.getValue());
    }
    this.healthIndicator = healthIndicator;
  }
View Full Code Here


          this.metadataProviders);
      if (this.dataSources.size() == 1) {
        DataSource dataSource = this.dataSources.values().iterator().next();
        return createDataSourceHealthIndicator(metadataProvider, dataSource);
      }
      CompositeHealthIndicator composite = new CompositeHealthIndicator(
          this.healthAggregator);
      for (Map.Entry<String, DataSource> entry : this.dataSources.entrySet()) {
        String name = entry.getKey();
        DataSource dataSource = entry.getValue();
        composite.addHealthIndicator(name,
            createDataSourceHealthIndicator(metadataProvider, dataSource));
      }
      return composite;
    }
View Full Code Here

      if (this.mongoTemplates.size() == 1) {
        return new MongoHealthIndicator(this.mongoTemplates.values().iterator()
            .next());
      }

      CompositeHealthIndicator composite = new CompositeHealthIndicator(
          this.healthAggregator);
      for (Map.Entry<String, MongoTemplate> entry : this.mongoTemplates.entrySet()) {
        composite.addHealthIndicator(entry.getKey(), new MongoHealthIndicator(
            entry.getValue()));
      }
      return composite;
    }
View Full Code Here

      if (this.redisConnectionFactories.size() == 1) {
        return new RedisHealthIndicator(this.redisConnectionFactories.values()
            .iterator().next());
      }

      CompositeHealthIndicator composite = new CompositeHealthIndicator(
          this.healthAggregator);
      for (Map.Entry<String, RedisConnectionFactory> entry : this.redisConnectionFactories
          .entrySet()) {
        composite.addHealthIndicator(entry.getKey(), new RedisHealthIndicator(
            entry.getValue()));
      }
      return composite;
    }
View Full Code Here

      if (this.rabbitTemplates.size() == 1) {
        return new RabbitHealthIndicator(this.rabbitTemplates.values().iterator()
            .next());
      }

      CompositeHealthIndicator composite = new CompositeHealthIndicator(
          this.healthAggregator);
      for (Map.Entry<String, RabbitTemplate> entry : this.rabbitTemplates
          .entrySet()) {
        composite.addHealthIndicator(entry.getKey(), new RabbitHealthIndicator(
            entry.getValue()));
      }
      return composite;
    }
View Full Code Here

      if (this.solrServers.size() == 1) {
        return new SolrHealthIndicator(this.solrServers.entrySet().iterator()
            .next().getValue());
      }

      CompositeHealthIndicator composite = new CompositeHealthIndicator(
          this.healthAggregator);
      for (Map.Entry<String, SolrServer> entry : this.solrServers.entrySet()) {
        composite.addHealthIndicator(entry.getKey(), new SolrHealthIndicator(
            entry.getValue()));
      }
      return composite;
    }
View Full Code Here

TOP

Related Classes of org.springframework.boot.actuate.health.CompositeHealthIndicator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.