Java 类io.vertx.core.spi.metrics.HttpClientMetrics 实例源码

项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public Map<HttpClientMetrics, ?> requestBegin(Map<HttpClientMetrics, ?> endpointMetric,
                                              Map<HttpClientMetrics, ?> socketMetric,
                                              SocketAddress localAddress, SocketAddress remoteAddress,
                                              HttpClientRequest request) {
    return null;
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public Map<HttpClientMetrics, ?> responsePushed(Map<HttpClientMetrics, ?> endpointMetric,
                                                Map<HttpClientMetrics, ?> socketMetric,
                                                SocketAddress localAddress, SocketAddress remoteAddress,
                                                HttpClientRequest request) {
    return unmap2WithResult(endpointMetric, socketMetric,
            (m, ec, sc) -> m.responsePushed(ec, sc, localAddress, remoteAddress, request));
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public Map<HttpClientMetrics, ?> connected(Map<HttpClientMetrics, ?> endpointMetric,
                                           Map<HttpClientMetrics, ?> socketMetric,
                                           WebSocket webSocket) {
    return unmap2WithResult(endpointMetric, socketMetric,
            (m, ec, sc) -> m.connected(ec, sc, webSocket));
}
项目:statful-client-vertx    文件:VertxMetricsImpl.java   
@Override
public HttpClientMetrics<HttpRequestMetrics, SocketAddress, SocketAddress, Void, Void> createMetrics(final HttpClient client,
                                                                                                     final HttpClientOptions options) {
    HttpClientMetricsImpl httpClientMetricsImpl = new HttpClientMetricsImpl(statfulMetricsOptions);
    httpClientMetricsImpl.setSender(this.getOrCreateSender());
    this.poolMetricsCollectors.forEach(collector -> collector.setSender(this.getOrCreateSender()));
    return httpClientMetricsImpl;
}
项目:vertx-dropwizard-metrics    文件:VertxMetricsImpl.java   
@Override
public synchronized HttpClientMetrics<?, ?, ?, ?, ?> createMetrics(HttpClient client, HttpClientOptions options) {
  String name = options.getMetricsName();
  String baseName;
  if (name != null && name.length() > 0) {
    baseName = nameOf("http.clients", name);
  } else {
    baseName = nameOf("http.clients");
  }
  HttpClientReporter reporter = clientReporters.computeIfAbsent(baseName, n -> new HttpClientReporter(registry, baseName, null));
  return new HttpClientMetricsImpl(this, reporter, options, this.options.getMonitoredHttpClientUris(), this.options.getMonitoredHttpClientEndpoint());
}
项目:vertx-spring    文件:VertxMetricsAdapter.java   
@Override
default HttpClientMetrics<?, ?, ?, ?, ?> createMetrics(HttpClient client, HttpClientOptions options) {
    return DummyVertxMetrics.DummyHttpClientMetrics.INSTANCE;
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
public DispatchingHttpClientMetrics(List<? extends HttpClientMetrics> delegates) {
    super(delegates);
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public Map<HttpClientMetrics, ?> createEndpoint(String host, int port, int maxPoolSize) {
    return dispatchWithResult(m -> m.createEndpoint(host, port, maxPoolSize));
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public void closeEndpoint(String host, int port, Map<HttpClientMetrics, ?> endpointMetric) {
    unmap(endpointMetric, (m, c) -> m.closeEndpoint(host, port, c));
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public Map<HttpClientMetrics, ?> enqueueRequest(Map<HttpClientMetrics, ?> endpointMetric) {
    return unmapWithResult(endpointMetric, (m, c) -> m.enqueueRequest(c));
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public void dequeueRequest(Map<HttpClientMetrics, ?> endpointMetric,
                           Map<HttpClientMetrics, ?> taskMetric) {
    unmap2(endpointMetric, taskMetric, (m, ec, tc) -> m.endpointDisconnected(ec, tc));
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public void endpointConnected(Map<HttpClientMetrics, ?> endpointMetric,
                              Map<HttpClientMetrics, ?> socketMetric) {
    unmap2(endpointMetric, socketMetric, (m, ec, sc) -> m.endpointConnected(ec, sc));
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public void endpointDisconnected(Map<HttpClientMetrics, ?> endpointMetric,
                                 Map<HttpClientMetrics, ?> socketMetric) {
    unmap2(endpointMetric, socketMetric, (m, ec, sc) -> m.endpointDisconnected(ec, sc));
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public void requestEnd(Map<HttpClientMetrics, ?> requestMetric) {
    unmap(requestMetric, (m, c) -> m.requestEnd(c));
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public void responseBegin(Map<HttpClientMetrics, ?> requestMetric, HttpClientResponse response) {
    unmap(requestMetric, (m, c) -> m.responseBegin(c, response));
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public void requestReset(Map<HttpClientMetrics, ?> requestMetric) {
    unmap(requestMetric, (m, c) -> m.requestReset(c));
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public void responseEnd(Map<HttpClientMetrics, ?> requestMetric, HttpClientResponse response) {
    unmap(requestMetric, (m, c) -> m.responseEnd(c, response));
}
项目:vertx-spring    文件:DispatchingHttpClientMetrics.java   
@Override
public void disconnected(Map<HttpClientMetrics, ?> webSocketMetric) {
    unmap(webSocketMetric, (m, c) -> m.disconnected(c));
}
项目:vertx-spring    文件:DispatchingVertxMetrics.java   
@Override
public HttpClientMetrics<?, ?, ?, ?, ?> createMetrics(HttpClient client, HttpClientOptions options) {
    return this.<HttpClientMetrics<?, ?, ?, ?, ?>> createSubMetrics(v -> v.createMetrics(client, options),
            d -> new DispatchingHttpClientMetrics(d));
}
项目:vertx-spring    文件:VertxActuatorMetrics.java   
@Override
public HttpClientMetrics<?, ?, ?, ?, ?> createMetrics(HttpClient client, HttpClientOptions options) {
    return new HttpClientMetricsImpl(counterService, gaugeService, properties.getHttp().getClient());
}
项目:statful-client-vertx    文件:VertxMetricsImplTest.java   
@Test
public void testHttpClientMetricCreation() {
    VertxMetricsImpl victim = new VertxMetricsImpl(vertx, statfulMetricsOptions);
    HttpClientMetrics createdMetrics = victim.createMetrics(mock(HttpClient.class), mock(HttpClientOptions.class));
    assertNotNull(createdMetrics);
}
项目:vertx-hawkular-metrics    文件:VertxMetricsImpl.java   
@Override
public HttpClientMetrics createMetrics(HttpClient client, HttpClientOptions options) {
  HttpClientMetricsSupplier supplier = (HttpClientMetricsSupplier) metricSuppliers.get(HTTP_CLIENT);
  return supplier != null ? new HttpClientMetricsImpl(supplier) : super.createMetrics(client, options);
}