class LoggingRequestHelperImpl implements LoggingRequestHelper {

  public LogQueryResponse sendQueryRequest(Map<String, String> queryParameters) {
    try {
      // use the Apache builder to create the correct URI
      URI logSearchURI = createLogSearchQueryURI(protocol, queryParameters);
      LOG.debug("Attempting to connect to LogSearch server at {}", logSearchURI);
      HttpURLConnection httpURLConnection  = (HttpURLConnection) logSearchURI.toURL().openConnection();
      secure(httpURLConnection, protocol);
      httpURLConnection.setRequestMethod("GET");
      httpURLConnection.setConnectTimeout(logSearchConnectTimeoutInMilliseconds);
      httpURLConnection.setReadTimeout(logSearchReadTimeoutInMilliseconds);

      addCookiesFromCookieStore(httpURLConnection);
      LOG.debug("Attempting request to LogSearch Portal Server, with connect timeout = {} milliseconds and read timeout = {} milliseconds",
        logSearchConnectTimeoutInMilliseconds, logSearchReadTimeoutInMilliseconds);

      setupCredentials(httpURLConnection);

      StringBuffer buffer = networkConnection.readQueryResponseFromServer(httpURLConnection);
      addCookiesToCookieStoreFromResponse(httpURLConnection);

      // setup a reader for the JSON response
      StringReader stringReader = new StringReader(buffer.toString());

      ObjectReader logQueryResponseReader =
        createObjectReader(LogQueryResponse.class);

      return logQueryResponseReader.readValue(stringReader);

    } catch (Exception e) {
      Utils.logErrorMessageWithThrowableWithCounter(LOG, errorLogCounterForLogSearchConnectionExceptions,
        "Error occurred while trying to connect to the LogSearch service...", e);
    }

    return null;
  }

  public  LoggingRequestHelperImpl(String hostName, String portNumber, String protocol, CredentialStoreService credentialStoreService, Cluster cluster, String externalAddress);
  protected  LoggingRequestHelperImpl(String hostName, String portNumber, String protocol, CredentialStoreService credentialStoreService, Cluster cluster, String externalAddress, NetworkConnection networkConnection);

}