@Override public Connector build(Server server, MetricRegistry metrics, String name, @Nullable ThreadPool threadPool) { final HttpConfiguration httpConfig = buildHttpConfiguration(); final HttpConnectionFactory httpConnectionFactory = buildHttpConnectionFactory(httpConfig); final Scheduler scheduler = new ScheduledExecutorScheduler(); final ByteBufferPool bufferPool = buildBufferPool(); return buildConnector(server, scheduler, bufferPool, name, threadPool, new Jetty93InstrumentedConnectionFactory(httpConnectionFactory, metrics.timer(httpConnections()))); }
@Override protected ServerConnector buildConnector(Server server, Scheduler scheduler, ByteBufferPool bufferPool, String name, ThreadPool threadPool, ConnectionFactory... factories) { // Intercept any buildConnector() calls and wrap the provided ConnectionFactory instances with our InstrumentedConnectionFactoryWrapper InstrumentedConnectionFactoryWrapper connectionFactoryWrappers[] = new InstrumentedConnectionFactoryWrapper[factories.length]; for (int i = 0; i < factories.length; ++i) { connectionFactoryWrappers[i] = new InstrumentedConnectionFactoryWrapper(factories[i], _metricRegistry.get(), getBindHost(), getPort()); } return super.buildConnector(server, scheduler, bufferPool, name, threadPool, connectionFactoryWrappers); }
@Override protected ServerConnector buildConnector(Server server, Scheduler scheduler, ByteBufferPool bufferPool, String name, ThreadPool threadPool, ConnectionFactory... factories) { // Intercept any buildConnector() calls and wrap the provided ConnectionFactory instances with our InstrumentedConnectionFactoryWrapper InstrumentedConnectionFactoryWrapper connectionFactoryWrappers[] = new InstrumentedConnectionFactoryWrapper[factories.length]; for (int i = 0; i < factories.length; ++i) { connectionFactoryWrappers[i] = new InstrumentedConnectionFactoryWrapper(factories[i], _metricRegistry.get(), getBindHost(), getPort()); } return super.buildConnector(server, scheduler, bufferPool, name, threadPool, connectionFactoryWrappers); }
@Override public Connector build(Server server, MetricRegistry metrics, String name, @Nullable ThreadPool threadPool) { final HttpConfiguration httpConfig = buildHttpConfiguration(); final HttpConnectionFactory httpConnectionFactory = buildHttpConnectionFactory(httpConfig); final Scheduler scheduler = new ScheduledExecutorScheduler(); final ByteBufferPool bufferPool = buildBufferPool(); return buildConnector(server, scheduler, bufferPool, name, threadPool, new Jetty93InstrumentedConnectionFactory(httpConnectionFactory, metrics.timer(httpConnections()))); }