net.codescore.exe
Class ExecutionResult

java.lang.Object
  extended by net.codescore.exe.ProcessResult
      extended by net.codescore.exe.ExecutionResult

public class ExecutionResult
extends ProcessResult

Represents the execution process for a submission.

Author:
Adam Cornett

Field Summary
private  CompileResult cr
           
 
Fields inherited from class net.codescore.exe.ProcessResult
errWriter, log, myProcess, outWriter, stdErr, stdIn, stdOut, sub
 
Constructor Summary
ExecutionResult(Process p, Submission s, GradingMode m)
           
 
Method Summary
protected  void cleanup()
          Close the IO streams
 CompileResult getCr()
           
protected  void initWriters()
          Setup the StreamWriters for the process.
 boolean processDiff()
          Process the submission's output, placing the diff file into Submission.setStdOutDiff(String).
 boolean processDiff(boolean sideBySide)
           
protected  void setCr(CompileResult cr)
           
 
Methods inherited from class net.codescore.exe.ProcessResult
getSub, waitForExit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cr

private CompileResult cr
Constructor Detail

ExecutionResult

public ExecutionResult(Process p,
                       Submission s,
                       GradingMode m)
Method Detail

getCr

public CompileResult getCr()

processDiff

public boolean processDiff()
                    throws InterruptedException
Process the submission's output, placing the diff file into Submission.setStdOutDiff(String).

Throws:
InterruptedException

processDiff

public boolean processDiff(boolean sideBySide)
                    throws InterruptedException
Parameters:
sideBySide - If true, will generate a side-by-side diff, equivalent to using the '-y' option when calling diff.
Returns:
true if the diff is 'perfect', false otherwise.
Throws:
InterruptedException
See Also:
processDiff()

cleanup

protected void cleanup()
                throws IOException
Close the IO streams

Overrides:
cleanup in class ProcessResult
Throws:
IOException

initWriters

protected void initWriters()
Description copied from class: ProcessResult
Setup the StreamWriters for the process.

Specified by:
initWriters in class ProcessResult

setCr

protected void setCr(CompileResult cr)


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