Package com.findwise.tools

Examples of com.findwise.tools.HttpConnection


        }
        if(System.currentTimeMillis()-timeout > startTime) {
            return false;
        }
        if (isExecuting()) {
            HttpConnection conn = new HttpConnection("localhost", port);
            try {
                HttpResponse response = conn.get("/");
                String result = EntityUtils.toString(response.getEntity());
                if(response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
                    return result.equals(id);
                }
            }
View Full Code Here


    return new ServiceManager(stageServices);
  }

    @SuppressWarnings("unchecked")
  public static List<String> getStages(String host, int port, String group) throws IOException {
    HttpConnection connection = new HttpConnection(host, port);
    HttpResponse response = connection.get("/"+GET_STAGES_URL+"?"+GROUP_PARAM+"="+group);
   
    if(response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
      logger.error("Unable to get list stages in the group");
      return new ArrayList<String>();
    }
View Full Code Here

    pendingUrl = "/" + HttpEndpointConstants.PENDING_DOCUMENT_URL + "?" + HttpEndpointConstants.STAGE_PARAM + "=" + stageName;
    discardedUrl = "/" + HttpEndpointConstants.DISCARDED_DOCUMENT_URL + "?" + HttpEndpointConstants.STAGE_PARAM + "=" + stageName;
    propertyUrl = "/" + HttpEndpointConstants.GET_PROPERTIES_URL + "?" + HttpEndpointConstants.STAGE_PARAM + "=" + stageName;
    fileUrl = "/" + HttpEndpointConstants.FILE_URL + "?" + HttpEndpointConstants.STAGE_PARAM + "=" + stageName;

    core = new HttpConnection(hostName, port);
    this.performanceLogging = performanceLogging;
  }
View Full Code Here

TOP

Related Classes of com.findwise.tools.HttpConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.