Examples of sendRequest()


Examples of sos.scheduler.command.SOSSchedulerCommand.sendRequest()

          loop = false;
          break; //abbruchbedingung
        }
        //loop wird nur auf false gesetzt, wenn scheduler_launcher_duration erreicht wurde.
        for (int i =0; i < schedulerLauncherMinStarts ; i++) {               
          remoteCommand.sendRequest(request);
          counter++;
//          hier die Fehlerhandhabung
          if (this.schedulerLauncherProtocol.equalsIgnoreCase("tcp")) { // no response is returned for UDP messages
            response = remoteCommand.getResponse();
            SOSXMLXPath xpath = new SOSXMLXPath(new StringBuffer(response));
View Full Code Here

Examples of sos.scheduler.command.SOSSchedulerCommand.sendRequest()

        schedulerCommand.setHost(host);
        schedulerCommand.setPort(port);
        schedulerCommand.setProtocol("tcp");
        spooler_log.debug1(".. connecting to Job Scheduler " + schedulerCommand.getHost() + ":" + schedulerCommand.getPort());
              schedulerCommand.connect();
              schedulerCommand.sendRequest(xml);
              answer = schedulerCommand.getResponse();
      } else if (supervisor!=null && supervisor.hostname()!=null && supervisor.hostname().length()>0){
        SOSSchedulerCommand schedulerCommand = new SOSSchedulerCommand();
        schedulerCommand.setHost(supervisor.hostname());
        schedulerCommand.setPort(supervisor.tcp_port());
View Full Code Here

Examples of sos.scheduler.command.SOSSchedulerCommand.sendRequest()

        schedulerCommand.setHost(supervisor.hostname());
        schedulerCommand.setPort(supervisor.tcp_port());
        schedulerCommand.setProtocol("tcp");
        spooler_log.debug1(".. connecting to Job Scheduler " + schedulerCommand.getHost() + ":" + schedulerCommand.getPort());
              schedulerCommand.connect();
              schedulerCommand.sendRequest(xml);
              answer = schedulerCommand.getResponse();
      }else{
        spooler_log.info("No supervisor configured, submitting event to this Job Scheduler.");
        answer = spooler.execute_xml(xml);
      }
View Full Code Here

Examples of sos.scheduler.command.SOSSchedulerCommand.sendRequest()

            remoteCommand = new SOSSchedulerCommand(this.getHost(), this.getPort(), this.getProtocol());
            remoteCommand.connect();
           

            spooler_log.info("sending request to remote Job Scheduler [" + this.getHost() + ":" + this.getPort() + "]: " + request);
            remoteCommand.sendRequest(request);
           
           
            if (this.getProtocol().equalsIgnoreCase("tcp")) { // no response is returned for UDP messages
                response = remoteCommand.getResponse();
                SOSXMLXPath xpath = new SOSXMLXPath(new StringBuffer(response));
View Full Code Here

Examples of sos.scheduler.command.SOSSchedulerCommand.sendRequest()

                    }

                    command += "</params></add_order>";
                    this.getLogger().info(".. sending command to remote Job Scheduler [" + this.getEventSupervisorSchedulerHost() + ":" + this.getEventSupervisorSchedulerPort() + "]: " + command );

                    schedulerCommand.sendRequest(command);
                    SOSXMLXPath answer = new SOSXMLXPath(new StringBuffer(schedulerCommand.getResponse()));
                    String errorText = answer.selectSingleNodeValue("//ERROR/@text");
                    if (errorText != null && errorText.length() > 0) {
                        throw new Exception("could not send command to Supervisor Job Scheduler [" + this.getEventSupervisorSchedulerHost() + ":" + this.getEventSupervisorSchedulerPort() + "]: " + errorText );
                    }                           
View Full Code Here

Examples of sos.scheduler.command.SOSSchedulerCommand.sendRequest()

       
        remoteCommand = new SOSSchedulerCommand(this.getHost(), this.getPort(), this.getProtocol());
        remoteCommand.connect();
       
        spooler_log.info("sending request to remote Job Scheduler [" + this.getHost() + ":" + this.getPort() + "]: " + request);
        remoteCommand.sendRequest(request);
       
       
        if (this.getProtocol().equalsIgnoreCase("tcp")) { // no response is returned for UDP messages         
          response = remoteCommand.getResponse();         
          SOSXMLXPath xpath = new SOSXMLXPath(new StringBuffer(response));
View Full Code Here

Examples of sos.scheduler.command.SOSSchedulerCommand.sendRequest()

                while(schedulerIterator.hasNext()) {
                    HashMap checkScheduler = (HashMap)schedulerIterator.next();
                    SOSSchedulerCommand command = new SOSSchedulerCommand(checkScheduler.get("host").toString(),
                                                       Integer.parseInt(checkScheduler.get("port").toString()), "udp");
                    command.connect();
                    command.sendRequest(jobContent);
                    command.disconnect();
                }
               
                // TODO wait some seconds and retrieve sanity check results from database, send alert message
               
View Full Code Here

Examples of sos.scheduler.command.SOSSchedulerCommand.sendRequest()

                if (commandElements.item(k).getNodeType() != Node.ELEMENT_NODE)
                  continue;
                String commandRequest = this.xmlNodeToString(commandElements.item(k));
                this.getLogger()
                    .info(".. sending command to remote Job Scheduler [" + commandHost + ":" + commandPort + "]: " + commandRequest);
                schedulerCommand.sendRequest(commandRequest);
                SOSXMLXPath answer = new SOSXMLXPath(new StringBuffer(schedulerCommand.getResponse()));
                String errorText = answer.selectSingleNodeValue("//ERROR/@text");
                if (errorText != null && errorText.length() > 0) {
                  throw new Exception("could not send command to remote Job Scheduler [" + commandHost + ":" + commandPort + "]: "
                      + errorText);
View Full Code Here

Examples of sos.scheduler.command.SOSSchedulerCommand.sendRequest()

        }
        if (iPort>0) command = new SOSSchedulerCommand(host, iPort);
        else command = new SOSSchedulerCommand(host);
        try{
          command.connect();         
          command.sendRequest("<show_state/>");
          String response = command.getResponse().trim();
          getLogger().debug6("Response from Job Scheduler: "+response);
         
          Document spoolerDocument = docBuilder.parse(new ByteArrayInputStream(response.getBytes()));
          Element spoolerElement = spoolerDocument.getDocumentElement();
View Full Code Here

Examples of sos.scheduler.command.SOSSchedulerCommand.sendRequest()

    command.setProtocol("udp");
    sosLogger.debug3("Trying connection to " + host_ + ":" + port_);
    command.connect();
    sosLogger.debug3("...connected");
    sosLogger.debug3("Sending add_order command:\n" + xml);
    command.sendRequest(xml);
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.