HttpServer(
final int port,
final InetAddress ifAddress,
final SocketConfig socketConfig,
final ServerSocketFactory serverSocketFactory,
final HttpService httpService,
final HttpConnectionFactory<? extends DefaultBHttpServerConnection> connectionFactory,
final SSLServerSetupHandler sslSetupHandler,
final ExceptionLogger exceptionLogger) {
this.port = port;
this.ifAddress = ifAddress;
this.socketConfig = socketConfig;
this.serverSocketFactory = serverSocketFactory;
this.httpService = httpService;
this.connectionFactory = connectionFactory;
this.sslSetupHandler = sslSetupHandler;
this.exceptionLogger = exceptionLogger;
this.listenerExecutorService = new ThreadPoolExecutor(
1, 1, 0L, TimeUnit.MILLISECONDS,
new SynchronousQueue<Runnable>(),
new ThreadFactoryImpl("HTTP-listener-" + this.port));
this.workerThreads = new ThreadGroup("HTTP-workers");
this.workerExecutorService = new WorkerPoolExecutor(
0, Integer.MAX_VALUE, 1L, TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),
new ThreadFactoryImpl("HTTP-worker", this.workerThreads));
this.status = new AtomicReference<Status>(Status.READY);
}