net.codescore.exe
Class ProcessResult

java.lang.Object
  extended by net.codescore.exe.ProcessResult
Direct Known Subclasses:
CompileResult, ExecutionResult

public abstract class ProcessResult
extends Object

Represents the result of spawning a new external process.

Author:
Adam Cornett

Field Summary
protected  StreamWriter errWriter
           
protected  org.apache.commons.logging.Log log
           
protected  Process myProcess
           
protected  StreamWriter outWriter
           
protected  InputStream stdErr
           
protected  OutputStream stdIn
           
protected  InputStream stdOut
           
protected  Submission sub
           
 
Constructor Summary
ProcessResult(Process p, Submission s)
           
 
Method Summary
protected  void cleanup()
          Cleans up all of the streams
 Submission getSub()
           
protected abstract  void initWriters()
          Setup the StreamWriters for the process.
 int waitForExit()
          Wait for the process to end, and return the exit code
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log

myProcess

protected final Process myProcess

outWriter

protected StreamWriter outWriter

errWriter

protected StreamWriter errWriter

stdIn

protected OutputStream stdIn

stdOut

protected InputStream stdOut

stdErr

protected InputStream stdErr

sub

protected final Submission sub
Constructor Detail

ProcessResult

public ProcessResult(Process p,
                     Submission s)
Method Detail

getSub

public Submission getSub()

waitForExit

public int waitForExit()
Wait for the process to end, and return the exit code

Returns:
See Also:
Process.waitFor()

cleanup

protected void cleanup()
                throws IOException
Cleans up all of the streams

Throws:
IOException

initWriters

protected abstract void initWriters()
Setup the StreamWriters for the process.



Copyright 2008 © Adam Cornett, Andrew Conner All Rights Reserved.