public Connection newConnection(Connector connector, EndPoint endPoint) {
          Connection connection = super.newConnection(connector, endPoint);
          connection.addListener(new Connection.Listener() {
            public void onOpened(Connection connection) {
              openConnection();
            }

            public void onClosed(Connection connection) {
              closeConnection();
            }
          });
          return connection;
        }
Configure Jetty to serve http requests. Example of a client connection URL:
http://localhost:10000/servlets/thrifths2/ A gateway may cause actual target
URL to differ, e.g. http://gateway:port/hive2/servlets/thrifths2/
service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java