Examples of ProcessManager


Examples of org.mizartools.utility.ProcessManager

      File workDirectory = temporaryDirectory.getFile();
        ExecutableFileManager executableFileManager = ExecutableFileManager.getInstance();
        LinkedList<String> commandList = new LinkedList<String>();
        commandList.add(executableFileManager.getCommand(executableFileEnum));
        commandList.add(mizarFile);
        processManager = new ProcessManager(workDirectory, commandList);
        processManager.setRedirectOutput(false);
        processManager.setCaptureLastOutput(true);
        processManager.setCaptureOutput(false);
        processManager.setPriority(Thread.MIN_PRIORITY);
        processManager.setProcessOutputAnalyzer(outputAnalyzer);
View Full Code Here

Examples of org.mizartools.utility.ProcessManager

          if (!error) {
            textArea.append(executableFileEnum.toString());
            ExecutableFileManager executableFileManager = ExecutableFileManager.getInstance();
            LinkedList<String> command = new LinkedList<String>();
            command.add(executableFileManager.getCommand(executableFileEnum));
            ProcessManager processManager = new ProcessManager(workDirectory, command);
            processManager.setRedirectOutput(false);
            processManager.setCaptureLastOutput(false);
            processManager.setCaptureOutput(true);
            processManager.setPriority(Thread.MIN_PRIORITY);
            processManager.start();
            processManager.waitProcess();
            if (processManager.getException() == null) {
              if (!processManager.getOutput().isEmpty()) {
                if (processManager.getOutput().get(0).contains(executableFileEnum.getDescription())) {
                  textArea.append(" [OK]");
                  textArea.append(" ["+processManager.getOutput().get(0)+"]");
                  textArea.append(" \n");
                } else {
                  error = true;
                  textArea.append("\n\n [Error] \n");
                  textArea.append(" ["+processManager.getOutput().get(0)+"]");
                  textArea.append(" ["+executableFileEnum.getDescription()+"]");
                  textArea.append(" \n");
                }
              } else {
                if (!executableFileEnum.getDescription().equals("?")) {
                  error = true;
                  textArea.append("\n\n [Error] \nThe output message is not present.\n");
                  textArea.append(" \n");
                } else {
                  textArea.append(" [OK]");
                  textArea.append(" \n");
                }
              }
            } else {
              error = true;
              textArea.append("\n\n [Error] \n"+processManager.getException().getMessage()+"\n");
              textArea.append(" \n");
            }
           
  //          textArea.append("\n");
  //          for (String s : processManager.getOutput()) {
View Full Code Here

Examples of org.rioproject.impl.exec.ProcessManager

            ExecDescriptor execDesc = postInstall.getExecDescriptor();
            if(execDesc != null) {
                if(!execDesc.getCommandLine().startsWith(File.separator))
                    execDesc = Util.extendCommandLine(path, execDesc);
                ServiceExecutor svcExecutor = new ServiceExecutor();
                ProcessManager manager = svcExecutor.exec(execDesc);
                manager.manage();
                //manager.waitFor();
                manager.destroy(false);
            }
            if(postInstall.getStagedData()!=null &&
               postInstall.getStagedData().removeOnDestroy()) {
                if(postInstallRecord != null) {
                    FileUtils.remove(new File(FileUtils.makeFileName(postInstallRecord.getPath(),
View Full Code Here

Examples of org.springframework.roo.process.manager.ProcessManager

  }

  @Override
  public void publish(final LogRecord record) {
    try {
      ProcessManager processManager = ActiveProcessManager.getActiveProcessManager();
      if (processManager != null) {
        final Object appender = outputMapping.get(System.identityHashCode(processManager));
        if (appender != null) {
          Method method = ReflectionUtils.findMethod(appender.getClass(), "append", new Class[] {
              String.class, Integer.class });
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.