private Connector createChannelConnector(Server server) {
    ServerConnector connector;
    final HttpConfiguration httpConf = new HttpConfiguration();
    httpConf.setRequestHeaderSize(1024 * 64);
    httpConf.setSendServerVersion(false);
    httpConf.setSendXPoweredBy(false);
    final HttpConnectionFactory http = new HttpConnectionFactory(httpConf);

    if (conf.getBoolean(AppConfig.USE_SSL, false)) {
      LOG.info("Using SSL for templeton.");
      SslContextFactory sslContextFactory = new SslContextFactory.Server();
      sslContextFactory.setKeyStorePath(conf.get(AppConfig.KEY_STORE_PATH, DEFAULT_KEY_STORE_PATH));
      sslContextFactory.setKeyStorePassword(conf.get(AppConfig.KEY_STORE_PASSWORD, DEFAULT_KEY_STORE_PASSWORD));
      Set<String> excludedSSLProtocols = Sets.newHashSet(Splitter.on(",").trimResults().omitEmptyStrings()
          .split(Objects.toString(conf.get(AppConfig.SSL_PROTOCOL_BLACKLIST, DEFAULT_SSL_PROTOCOL_BLACKLIST), "")));
      sslContextFactory.addExcludeProtocols(excludedSSLProtocols.toArray(new String[excludedSSLProtocols.size()]));
      connector = new ServerConnector(server, sslContextFactory, http);
    } else {
      connector = new ServerConnector(server, http);
    }

    connector.setReuseAddress(true);
    connector.setHost(conf.get(AppConfig.HOST, DEFAULT_HOST));
    connector.setPort(conf.getInt(AppConfig.PORT, DEFAULT_PORT));
    return connector;
  }
Create a channel connector for "http/https" requests.
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Main.java