Java 类io.vertx.core.spi.VertxMetricsFactory 实例源码

项目:vertx-spring    文件:SpringVertx.java   
public SpringVertx build() {

            if (!listeners.isEmpty()) {
                metricsFactories.add(new VertxListenerAwareMetricsFactory(listeners));
            }

            if (!metricsFactories.isEmpty()) {
                VertxMetricsFactory singleMetricsFactory;
                if (metricsFactories.size() > 1) {
                    singleMetricsFactory = new DispatchingVertxMetricsFactory(metricsFactories);
                } else {
                    singleMetricsFactory = metricsFactories.get(0);
                }
                MetricsOptions metricsOptions = getOrCreateOptions().getMetricsOptions();
                metricsOptions.setEnabled(true);
                metricsOptions.setFactory(singleMetricsFactory);
            }

            return new SpringVertx(
                    factory,
                    getOrCreateOptions(),
                    verticleRegistrations,
                    listeners,
                    verticleFactoryPrefix,
                    startupPhase,
                    autoStartup);
        }
项目:vertx-spring    文件:DispatchingVertxMetricsFactory.java   
public DispatchingVertxMetricsFactory(List<? extends VertxMetricsFactory> delegates) {
    this.delegates = delegates;
}