ServerConnector createAndAddChannelConnector(int queueSize, Builder b) {
    ServerConnector connector;

    final HttpConfiguration conf = new HttpConfiguration();
    conf.setRequestHeaderSize(1024*64);
    conf.setSendServerVersion(false);
    conf.setSendXPoweredBy(false);
    final HttpConnectionFactory http = new HttpConnectionFactory(conf);

    if (!b.useSSL) {
      connector = new ServerConnector(webServer, http);
    } else {
      SslContextFactory sslContextFactory = new SslContextFactory.Server();
      sslContextFactory.setKeyStorePath(b.keyStorePath);
      sslContextFactory.setKeyStoreType(b.keyStoreType == null || b.keyStoreType.isEmpty() ?
          KeyStore.getDefaultType(): b.keyStoreType);
      sslContextFactory.setKeyManagerFactoryAlgorithm(
          b.keyManagerFactoryAlgorithm == null || b.keyManagerFactoryAlgorithm.isEmpty()?
          KeyManagerFactory.getDefaultAlgorithm() : b.keyManagerFactoryAlgorithm);
      if (b.excludeCiphersuites != null && !b.excludeCiphersuites.trim().isEmpty()) {
        Set<String> excludeCS = Sets.newHashSet(
            Splitter.on(",").trimResults().omitEmptyStrings().split(b.excludeCiphersuites.trim()));
        int eSize = excludeCS.size();
        if (eSize > 0) {
          sslContextFactory.setExcludeCipherSuites(excludeCS.toArray(new String[eSize]));
        }
      }
      Set<String> excludedSSLProtocols = Sets.newHashSet(
        Splitter.on(",").trimResults().omitEmptyStrings().split(
          Strings.nullToEmpty(b.conf.getVar(ConfVars.HIVE_SSL_PROTOCOL_BLACKLIST))));
      sslContextFactory.addExcludeProtocols(excludedSSLProtocols.toArray(
          new String[excludedSSLProtocols.size()]));
      sslContextFactory.setKeyStorePassword(b.keyStorePassword);
      connector = new ServerConnector(webServer, sslContextFactory, http);
    }

    connector.setAcceptQueueSize(queueSize);
    connector.setReuseAddress(true);
    connector.setHost(b.host);
    connector.setPort(b.port);

    webServer.addConnector(connector);
    return connector;
  }
Create a channel connector for "http/https" requests and add it to the server
common/src/java/org/apache/hive/http/HttpServer.java