public class Task
extends java.lang.Object
| Constructor and Description |
|---|
Task(java.lang.String[] cmd,
java.lang.String[] env,
java.io.File workDir,
java.io.File cancel,
long timeLimit,
java.lang.String[] errors)
Sets up an external process.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCmd()
Returns a printable string version of the external command.
|
java.lang.String |
getErrorMessage()
Returns the error message.
|
boolean |
getHasError()
Returns error state.
|
java.lang.String |
getOutput()
Returns a string version of the command's console output
|
java.lang.String |
getStderr() |
void |
run()
Executes the external process, returning when it is finished or when it
exceeds the time limit specified in the constructor.
|
void |
run(long timeLimit)
Executes the external process, returning when it is finished or when it
exceeds the time limit specified.
|
public Task(java.lang.String[] cmd,
java.lang.String[] env,
java.io.File workDir,
java.io.File cancel,
long timeLimit,
java.lang.String[] errors)
public void run()
throws gov.noaa.pmel.tmap.exception.LASException
gov.noaa.pmel.tmap.exception.LASException - If the process fails, or if the output parser finds an error
message in the output.public void run(long timeLimit)
throws gov.noaa.pmel.tmap.exception.LASException
timeLimit - Overrides the time limit specified in the constructor.gov.noaa.pmel.tmap.exception.LASException - If the process fails, or if there is an error message (a line
beginning with "error: ") in the output.public java.lang.String getCmd()
public java.lang.String getStderr()
public java.lang.String getOutput()
public boolean getHasError()
public java.lang.String getErrorMessage()