private void initializeSSLFactory(SSLConfig sslConfig) {
    if (ports.get(PortType.SSL) != null) {
      try {
        this.sslFactory = SSLFactory.getNewInstance(sslConfig);
        metrics.sslFactoryInitializationCount.inc();
      } catch (Exception e) {
        metrics.sslFactoryInitializationErrorCount.inc();
        throw new IllegalStateException("Exception thrown during initialization of SSLFactory ", e);
      }
    }
  }
A NIO socket server. The threading model is
  1 Acceptor thread that handles new connections
  N Processor threads that each have their own selector and read requests from sockets
  M Handler threads that handle requests and produce responses back to the processor threads for writing.
ambry-network/src/main/java/com/github/ambry/network/SocketServer.java