socket
Class OSProcess

java.lang.Object
  extended by socket.OSProcess

public class OSProcess
extends java.lang.Object

Class for interfacing with the environment in order to execute a specified string command in a separate process runtime command.


Field Summary
(package private)  java.lang.String command
           
(package private)  java.lang.String[] environmentVars
           
 StreamPrinter errorPrinter
           
static java.util.logging.Logger logger
           
 StreamPrinter outputPrinter
           
 java.lang.Process process
           
 java.lang.String processOutput
           
 boolean stillStarting
           
(package private)  java.io.File workingDir
           
 
Constructor Summary
OSProcess(java.lang.String command)
           
OSProcess(java.lang.String command, java.lang.String[] envVar, java.io.File wDir)
           
 
Method Summary
 void destroy()
           
private  void init(java.lang.String command, java.lang.String[] envVar, java.io.File wDir)
           
 boolean isStillStarting()
           
 void run()
          starts the process
 int waitFor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static java.util.logging.Logger logger

process

public java.lang.Process process

command

java.lang.String command

environmentVars

java.lang.String[] environmentVars

workingDir

java.io.File workingDir

outputPrinter

public StreamPrinter outputPrinter

errorPrinter

public StreamPrinter errorPrinter

processOutput

public java.lang.String processOutput

stillStarting

public boolean stillStarting
Constructor Detail

OSProcess

public OSProcess(java.lang.String command)
Parameters:
command - to be executed as a command in a separate process

OSProcess

public OSProcess(java.lang.String command,
                 java.lang.String[] envVar,
                 java.io.File wDir)
Parameters:
command - to be executed as a command in a separate process
Method Detail

init

private void init(java.lang.String command,
                  java.lang.String[] envVar,
                  java.io.File wDir)

destroy

public void destroy()

waitFor

public int waitFor()
            throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

run

public void run()
starts the process


isStillStarting

public boolean isStillStarting()