org.shept.util
public class CommandShellExecute extends Object implements Runnable
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=3| Modifier and Type | Class and Description |
|---|---|
(package private) class |
CommandShellExecute.StreamGobbler
This gobbler swallows any streamed output from the operation
and writes it into the log
|
| Modifier and Type | Field and Description |
|---|---|
protected String |
cmdString |
protected String[] |
envp |
private Integer |
exitVal |
private boolean |
isRunning |
private static org.apache.commons.logging.Log |
log |
protected File |
workingDirectory |
| Constructor and Description |
|---|
CommandShellExecute() |
CommandShellExecute(String cmdString) |
| Modifier and Type | Method and Description |
|---|---|
static String[] |
getEnvironment(String[] addEnv)
Merge the existing environment with additional parameters
If the additional parameters are null then simply return the environment strings
|
Integer |
getExitVal() |
boolean |
isRunning() |
void |
run()
Run the command shell
|
void |
setCmdString(String cmdString) |
void |
setEnvp(String[] envp) |
void |
setEnvpAdd(String[] envp)
set additional environment parameters to the ones inherited by the shell
|
void |
setWorkingDirectory(File workingDirectory) |
protected String cmdString
protected String[] envp
protected File workingDirectory
private boolean isRunning
private Integer exitVal
private static final org.apache.commons.logging.Log log
public CommandShellExecute()
public CommandShellExecute(String cmdString)
public static String[] getEnvironment(String[] addEnv)
addEnv - public Integer getExitVal()
public void setWorkingDirectory(File workingDirectory)
workingDirectory - the workingDirectory to setpublic void setEnvp(String[] envp)
envp - the envp to setpublic void setEnvpAdd(String[] envp)
cmdString - public void setCmdString(String cmdString)
public boolean isRunning()
Copyright © 2014. All Rights Reserved.