Class ProcessContext


  • public class ProcessContext
    extends java.lang.Object
    Objects of this class aggregate the information needed to executed and process a operation system level process.
    • Constructor Detail

      • ProcessContext

        public ProcessContext​(java.lang.String[] command,
                              java.lang.String[] environment,
                              java.io.File directory,
                              Drain stdOutput,
                              Drain stdError)
        Creates a new ProcessContext object.
        Parameters:
        command - the command line to execute.
        environment - the environment as array of name=value pairs or null to inherit the environment of the executing JVM.
        directory - the directory in which to execute the command (or null to execute in the current directory of the executing JMV).
        stdOutput - call back to handle std output of the executed process
        stdError - call back to handle std error output of the executed process
        See Also:
        ProcessCommand
      • ProcessContext

        public ProcessContext​(ProcessCommand command,
                              Drain stdOutput,
                              Drain stdError)
        Creates a new ProcessContext object.
        Parameters:
        command - the command and environment to execute
        stdOutput - call back to handle std output of the executed process
        stdError - call back to handle std error output of the executed process
    • Method Detail

      • getStdOutput

        public Drain getStdOutput()
      • getStdError

        public Drain getStdError()
      • getCommand

        public java.lang.String[] getCommand()
      • getEnvironment

        public java.lang.String[] getEnvironment()
      • getDirectory

        public java.io.File getDirectory()