Package sos.scheduler.command

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


      request = getRequest();
     
      remoteCommand = new SOSSchedulerCommand();
     
      remoteCommand.setProtocol(this.schedulerLauncherProtocol);
      remoteCommand.connect(this.schedulerLauncherHost, this.schedulerLauncherPort);
           
      boolean loop = true;
      terminateTimeInSec = System.currentTimeMillis() + (this.schedulerLauncherDuration * 1000);     
      sosLogger.debug("..time until termination: " + terminateTimeInSec);
      //soll so lange wiederholt werden, bis aktuelle Zeit = terminateTimeInSec erreicht hat     
View Full Code Here


        SOSSchedulerCommand schedulerCommand = new SOSSchedulerCommand();
        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());
View Full Code Here

        SOSSchedulerCommand schedulerCommand = new SOSSchedulerCommand();
        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

                request = this.getCommand();
            }
           
           
            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);
           
View Full Code Here

               
                SOSSchedulerCommand schedulerCommand = new SOSSchedulerCommand();
                schedulerCommand.setHost(this.getEventSupervisorSchedulerHost());
                schedulerCommand.setPort(this.getEventSupervisorSchedulerPort());
                schedulerCommand.setTimeout(this.getEventSupervisorSchedulerTimeout());
                schedulerCommand.connect();
               
                while (!hwFile.eof())
                {
                    Record record = hwFile.get();
                    spooler_log.info("--->" + record);
View Full Code Here

        request += "</params>";
        if (this.getRunTime() != null && this.getRunTime().length() > 0) request += this.getRunTime();
        request += "</add_order>";
       
        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);
       
       
View Full Code Here

                Iterator schedulerIterator = this.checkSchedulers.iterator();
                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

            }
            if (commandProtocol.length() > 0)
              schedulerCommand.setProtocol(commandProtocol);
            try {
              this.getLogger().debug1(".. connecting to Job Scheduler " + schedulerCommand.getHost() + ":" + schedulerCommand.getPort());
              schedulerCommand.connect();
              NodeList commandElements = command.getChildNodes();
              for (int k = 0; k < commandElements.getLength(); k++) {
                if (commandElements.item(k).getNodeType() != Node.ELEMENT_NODE)
                  continue;
                String commandRequest = this.xmlNodeToString(commandElements.item(k));
View Full Code Here

          }         
        }
        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()));
View Full Code Here

  private void executeXml(String host_, int port_, String xml) throws Exception {
    SOSSchedulerCommand command;
    command = new SOSSchedulerCommand(host_, port_);
    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.