|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.util.ProcessCreator
public class ProcessCreator
This class abstracts out process creation, similar to ProcessCreator, which is only available in Java 1.5. This ProcessCreator cannot deal with process sequences and chains. It can only create one processes.
Field Summary | |
---|---|
protected String |
_cachedCmdLine
Cached copy of the reconstructed command line. |
protected String[] |
_cmdarray
|
protected String |
_cmdline
|
protected Map<String,String> |
_env
|
protected String |
_evaluatedCmdLine
|
protected String |
_evaluatedWorkDir
|
protected PropertyMaps |
_props
|
protected String |
_workdir
|
Constructor Summary | |
---|---|
protected |
ProcessCreator()
Degenerate constructor, only for subclasses that completely override this class. |
|
ProcessCreator(String[] cmdarray,
String workdir)
Constructor for a process creator with the given command line already split up, and map of properties. |
|
ProcessCreator(String cmdline,
String workdir,
PropertyMaps pm)
Constructor for a process creator with the given command line and map of properties. |
Method Summary | |
---|---|
String |
cmdline()
Get the command line. |
Map<String,String> |
environment()
Returns a map of this process creator's environment. |
String |
evaluatedCommandLine()
Return the command line after evaluation, or null if it hasn't been replaced yet. |
String |
evaluatedWorkDir()
Return the work directory after evaluation, or null if it hasn't been replaced yet. |
PropertyMaps |
getPropertyMaps()
Return the PropertyMaps object used for substitution. |
Process |
start()
Starts a new process using the attributes of this process creator. |
String |
workDir()
Returns this process creator's working directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String _cmdline
protected String _evaluatedCmdLine
protected String _workdir
protected String _evaluatedWorkDir
protected String[] _cmdarray
protected Map<String,String> _env
protected PropertyMaps _props
protected String _cachedCmdLine
Constructor Detail |
---|
protected ProcessCreator()
public ProcessCreator(String cmdline, String workdir, PropertyMaps pm)
cmdline
- command lineworkdir
- working directorypm
- PropertyMaps used for substitution when replacing variablespublic ProcessCreator(String[] cmdarray, String workdir)
cmdarray
- array of command line argumentsworkdir
- working directoryMethod Detail |
---|
public String cmdline()
public Map<String,String> environment()
public String workDir()
public String evaluatedCommandLine()
public String evaluatedWorkDir()
public PropertyMaps getPropertyMaps()
public Process start() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |