private ChannelFuture doStart(ServerPort port) { final ServerBootstrap b = new ServerBootstrap(); serverBootstrap = b; config.channelOptions().forEach((k, v) -> { @SuppressWarnings("unchecked") final ChannelOption<Object> castOption = (ChannelOption<Object>) k; b.option(castOption, v); }); config.childChannelOptions().forEach((k, v) -> { @SuppressWarnings("unchecked") final ChannelOption<Object> castOption = (ChannelOption<Object>) k; b.childOption(castOption, v); }); b.group(EventLoopGroups.newEventLoopGroup(1, r -> { final FastThreadLocalThread thread = new FastThreadLocalThread(r, bossThreadName(port)); thread.setDaemon(false); return thread; }), config.workerGroup()); b.channel(TransportType.detectTransportType().serverChannelType()); b.handler(connectionLimitingHandler); b.childHandler(new HttpServerPipelineConfigurator(config, port, sslContexts, gracefulShutdownSupport)); return b.bind(port.localAddress()); }
@Override public String toString() { String strVal = this.strVal; if (strVal == null) { this.strVal = strVal = toString( getClass(), ports(), null, virtualHosts(), workerGroup(), shutdownWorkerGroupOnStop(), maxNumConnections(), idleTimeoutMillis(), defaultRequestTimeoutMillis(), defaultMaxRequestLength(), verboseResponses(), http2InitialConnectionWindowSize(), http2InitialStreamWindowSize(), http2MaxStreamsPerConnection(), http2MaxFrameSize(), http2MaxHeaderListSize(), http1MaxInitialLineLength(), http1MaxHeaderSize(), http1MaxChunkSize(), proxyProtocolMaxTlvSize(), gracefulShutdownQuietPeriod(), gracefulShutdownTimeout(), blockingTaskExecutor(), meterRegistry(), serviceLoggerPrefix(), accessLogWriter(), shutdownAccessLogWriterOnStop(), channelOptions(), childChannelOptions(), clientAddressSources(), clientAddressTrustedProxyFilter(), clientAddressFilter() ); } return strVal; }