private void secure(HttpURLConnection connection, String protocol) {
    if ("https".equals(protocol)) {
      HttpsURLConnection secureConnection = (HttpsURLConnection) connection;
      loadTrustStore();
      secureConnection.setSSLSocketFactory(this.sslSocketFactory);
    }
  }
Convenience class to handle the connection details of a LogSearch query request.
ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingRequestHelperImpl.java