Class CustomExecute

java.lang.Object
org.apache.commons.exec.DefaultExecutor
repast.simphony.integration.CustomExecute
All Implemented Interfaces:
org.apache.commons.exec.Executor

public class CustomExecute extends org.apache.commons.exec.DefaultExecutor
An extension of org.apache.commons.exec.Execute that adds the ability to retrieve a spanwed process.
Author:
Jerry Vos
  • Field Summary

    Fields inherited from interface org.apache.commons.exec.Executor

    INVALID_EXITVALUE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setCommandLine(org.apache.commons.exec.CommandLine commandLine)
     
    void
    setEnvironment(Map environment)
     
    void
     
    Starts a process defined by the command line.

    Methods inherited from class org.apache.commons.exec.DefaultExecutor

    execute, execute, execute, execute, getExecutorThread, getProcessDestroyer, getStreamHandler, getWatchdog, getWorkingDirectory, isFailure, launch, setExitValue, setExitValues, setProcessDestroyer, setStreamHandler, setWatchdog

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CustomExecute

      public CustomExecute()
  • Method Details

    • setWorkingDirectory

      public void setWorkingDirectory(File wd)
      Specified by:
      setWorkingDirectory in interface org.apache.commons.exec.Executor
      Overrides:
      setWorkingDirectory in class org.apache.commons.exec.DefaultExecutor
    • spawnAndReturnProcess

      public Process spawnAndReturnProcess() throws IOException
      Starts a process defined by the command line. Ant will not wait for this process, nor log its output. This code was taken from the super's spawn method and differs in that it returns the spawn process.
      Throws:
      IOException - The exception is thrown, if launching of the subprocess failed
    • setCommandLine

      public void setCommandLine(org.apache.commons.exec.CommandLine commandLine)
    • setEnvironment

      public void setEnvironment(Map environment)