public class ProcessExecutor extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
kDefaultTimeoutMillis
Deprecated.
|
static long |
kSleepTime
Deprecated.
|
protected String[] |
mCmdStrings
Deprecated.
|
protected File |
mErrFile
Deprecated.
|
protected File |
mOutFile
Deprecated.
|
| Constructor and Description |
|---|
ProcessExecutor(String[] cmd)
Deprecated.
Creates new ProcessExecutor
|
ProcessExecutor(String[] cmd,
long timeoutSeconds)
Deprecated.
Creates new ProcessExecutor
|
ProcessExecutor(String[] cmd,
long timeoutSeconds,
String[] inputLines)
Deprecated.
|
ProcessExecutor(String[] cmd,
long timeoutSeconds,
String[] inputLines,
String[] env,
File workingDir)
Deprecated.
Creates a new
ProcessExecutor that executes the given command. |
ProcessExecutor(String[] cmd,
String[] inputLines)
Deprecated.
Creates new ProcessExecutor
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Deprecated.
|
String[] |
execute(boolean bReturnOutputLines)
Deprecated.
|
String[] |
execute(boolean bReturnOutputLines,
boolean bStartUpTimeLimit)
Deprecated.
|
protected String |
getExceptionMessage()
Deprecated.
Allows a subclass to control the error message returned when a non-zero
exit code is returned from a failed execution
|
boolean |
getExecutionRetentionFlag()
Deprecated.
|
protected String |
getFileBuffer(File file)
Deprecated.
Returns the contents of a file as a String.
|
String |
getLastExecutionError()
Deprecated.
Returns the last LAST_BYTES bytes in the error stream of last execution
as a String, if the ProcessExecutor was configured properly.
|
String |
getLastExecutionOutput()
Deprecated.
Returns the last LAST_BYTES bytes in the output stream of last execution
as a String, if the ProcessExecutor was configured properly.
|
protected String |
getLatestOutput(File f)
Deprecated.
|
int |
getProcessExitValue()
Deprecated.
Get the exit value of the process executed.
|
Process |
getSubProcess()
Deprecated.
|
static void |
main(String[] args)
Deprecated.
|
void |
retainBuffers()
Deprecated.
|
void |
setExecutionRetentionFlag(boolean s)
Deprecated.
This is the setting after the fact that an instance of ProcessExecutor is
created.
|
void |
setVerbose(boolean verbose)
Deprecated.
|
public static final long kDefaultTimeoutMillis
public static final long kSleepTime
protected String[] mCmdStrings
protected File mOutFile
protected File mErrFile
public ProcessExecutor(String[] cmd)
public ProcessExecutor(String[] cmd, String[] inputLines)
public ProcessExecutor(String[] cmd, long timeoutSeconds)
public ProcessExecutor(String[] cmd, long timeoutSeconds, String[] inputLines)
public ProcessExecutor(String[] cmd, long timeoutSeconds, String[] inputLines, String[] env, File workingDir)
ProcessExecutor that executes the given command.cmd - String that has command name and its command line argumentstimeoutSeconds - long integer timeout to be applied in seconds.
After this time if the process to execute does not end, it will be
destroyed.public void setExecutionRetentionFlag(boolean s)
s - boolean representing whether to retain, true means the buffers
will be retained, false otherwise.public boolean getExecutionRetentionFlag()
public String getLastExecutionError()
public String getLastExecutionOutput()
public void execute()
throws ExecException
ExecExceptionpublic String[] execute(boolean bReturnOutputLines) throws ExecException
ExecExceptionprotected String getExceptionMessage()
public String[] execute(boolean bReturnOutputLines, boolean bStartUpTimeLimit) throws ExecException
ExecExceptionpublic int getProcessExitValue()
public void setVerbose(boolean verbose)
protected String getFileBuffer(File file)
file - the file to readpublic void retainBuffers()
public Process getSubProcess()
public static void main(String[] args)
Copyright © 2017–2020 Eclipse Foundation. All rights reserved.