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); }
public DispatchingVertxMetricsFactory(List<? extends VertxMetricsFactory> delegates) { this.delegates = delegates; }