Exemplo n.º 1
0
 /** Finished executing a command, update states, notify */
 protected void execDone() {
   stateDone();
   if (task != null) {
     task.setExitValue(exitValue);
     if (notifyTaskState != null)
       notifyTaskState.taskFinished(task, null); // Notify end of execution
   }
 }
Exemplo n.º 2
0
  /** Kill a process */
  public void kill() {
    if (debug) log("Process killed");

    killCmd();

    // Notify end of execution
    if (task != null) {
      task.setExitValue(Task.EXITCODE_KILLED);
      if (notifyTaskState != null) notifyTaskState.taskFinished(task, TaskState.KILLED);
    }
  }
Exemplo n.º 3
0
  /** Error while trying to 'exec' of a command, update states */
  protected void execError(Throwable t, TaskState taskState, int exitCode) {
    stateDone();
    exitValue = exitCode;

    addError(t != null ? t.getMessage() : null);

    if (debug && t != null) t.printStackTrace();

    if (task != null) {
      task.setExitValue(exitCode);
      if (notifyTaskState != null) notifyTaskState.taskFinished(task, taskState);
    }
  }