@Override public HttpServerMetrics createMetrics(final HttpServer server, final SocketAddress localAddress, final HttpServerOptions options) { HttpServerMetricsImpl httpServerMetricsImpl = new HttpServerMetricsImpl(statfulMetricsOptions); httpServerMetricsImpl.setSender(this.getOrCreateSender()); this.poolMetricsCollectors.forEach(collector -> collector.setSender(this.getOrCreateSender())); return httpServerMetricsImpl; }
@Override default HttpServerMetrics<?, ?, ?> createMetrics(HttpServer server, SocketAddress localAddress, HttpServerOptions options) { return DummyVertxMetrics.DummyHttpServerMetrics.INSTANCE; }
public DispatchingHttpServerMetrics(List<? extends HttpServerMetrics> delegates) { super(delegates); }
@Override public Map<HttpServerMetrics, ?> requestBegin(Map<HttpServerMetrics, ?> socketMetric, HttpServerRequest request) { return unmapWithResult(socketMetric, (m, c) -> m.requestBegin(c, request)); }
@Override public void requestReset(Map<HttpServerMetrics, ?> requestMetric) { unmap(requestMetric, (m, c) -> m.requestReset(c)); }
@Override public Map<HttpServerMetrics, ?> responsePushed(Map<HttpServerMetrics, ?> socketMetric, HttpMethod method, String uri, HttpServerResponse response) { return unmapWithResult(socketMetric, (m, c) -> m.responsePushed(c, method, uri, response)); }
@Override public void responseEnd(Map<HttpServerMetrics, ?> requestMetric, HttpServerResponse response) { unmap(requestMetric, (m, c) -> m.responseEnd(c, response)); }
@Override public Map<HttpServerMetrics, ?> upgrade(Map<HttpServerMetrics, ?> requestMetric, ServerWebSocket serverWebSocket) { return unmapWithResult(requestMetric, (m, c) -> m.upgrade(c, serverWebSocket)); }
@Override public Map<HttpServerMetrics, ?> connected(Map<HttpServerMetrics, ?> socketMetric, ServerWebSocket serverWebSocket) { return unmapWithResult(socketMetric, (m, c) -> m.connected(c, serverWebSocket)); }
@Override public void disconnected(Map<HttpServerMetrics, ?> serverWebSocketMetric) { unmap(serverWebSocketMetric, (m, c) -> m.disconnected(c)); }
@Override public HttpServerMetrics<?, ?, ?> createMetrics(HttpServer server, SocketAddress localAddress, HttpServerOptions options) { return this.<HttpServerMetrics<?, ?, ?>> createSubMetrics(v -> v.createMetrics(server, localAddress, options), d -> new DispatchingHttpServerMetrics(d)); }
@Override public HttpServerMetrics<?, ?, ?> createMetrics(HttpServer server, SocketAddress localAddress, HttpServerOptions options) { return new HttpServerMetricsImpl(counterService, gaugeService, properties.getHttp().getServer()); }
@Override public HttpServerMetrics<Long, Void, Void> createMetrics(HttpServer server, SocketAddress localAddress, HttpServerOptions options) { HttpServerMetricsSupplier supplier = (HttpServerMetricsSupplier) metricSuppliers.get(HTTP_SERVER); return supplier != null ? new HttpServerMetricsImpl(localAddress, supplier) : super.createMetrics(server, localAddress, options); }
@Override public HttpServerMetrics<?, ?, ?> createMetrics(HttpServer server, SocketAddress localAddress, HttpServerOptions options) { String baseName = MetricRegistry.name(nameOf("http.servers"), TCPMetricsImpl.addressName(localAddress)); return new HttpServerMetricsImpl(registry, baseName, this.options.getMonitoredHttpServerUris(), localAddress); }