|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.util.ProcessCreator
edu.rice.cs.util.GeneralProcessCreator
public class GeneralProcessCreator
This class abstracts out process creation, similar to ProcessCreator, which is only available in Java 1.5. Additionally, it transparently creates process sequences and process chains, including piping.
Field Summary | |
---|---|
protected String |
_cachedCmdLine
Cached copy of the reconstructed command line. |
protected String |
_cmdline
|
protected Map<String,String> |
_env
|
protected List<List<List<String>>> |
_seqs
|
protected String |
_workdir
|
static Log |
LOG
|
Fields inherited from class edu.rice.cs.util.ProcessCreator |
---|
_cmdarray, _evaluatedCmdLine, _evaluatedWorkDir, _props |
Constructor Summary | |
---|---|
GeneralProcessCreator(List<List<List<String>>> seqs,
String workdir,
PropertyMaps pm)
Constructor for a process creator with the given command line already split up, and the work directory. |
|
GeneralProcessCreator(String cmdline,
String workdir,
PropertyMaps pm)
Constructor for a process creator with the given command line and the work directory. |
Method Summary | |
---|---|
String |
cmdline()
Get the command line. |
Map<String,String> |
environment()
Returns a map of this process creator's environment. |
protected static String |
getProcessChainCmdLine(List<List<String>> pipe)
Reconstructs the command line for a process chain. |
protected static String |
getProcessCmdLine(List<String> cmds)
Reconstructs the command line for a simple process. |
protected static String |
getProcessSequenceCmdLine(List<List<List<String>>> seqs)
Reconstructs the command line for a process sequence. |
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 edu.rice.cs.util.ProcessCreator |
---|
evaluatedCommandLine, evaluatedWorkDir, getPropertyMaps |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String _cmdline
protected List<List<List<String>>> _seqs
protected String _workdir
protected Map<String,String> _env
protected String _cachedCmdLine
public static final Log LOG
Constructor Detail |
---|
public GeneralProcessCreator(String cmdline, String workdir, PropertyMaps pm)
cmdline
- command lineworkdir
- working directorypm
- PropertyMaps object used for substitutionpublic GeneralProcessCreator(List<List<List<String>>> seqs, String workdir, PropertyMaps pm)
seqs
- a sequence of commands to pipeworkdir
- working directorypm
- PropertyMaps object used for substitutionMethod Detail |
---|
protected static String getProcessCmdLine(List<String> cmds)
protected static String getProcessChainCmdLine(List<List<String>> pipe)
protected static String getProcessSequenceCmdLine(List<List<List<String>>> seqs)
public String cmdline()
cmdline
in class ProcessCreator
public Map<String,String> environment()
environment
in class ProcessCreator
public String workDir()
workDir
in class ProcessCreator
public Process start() throws IOException
start
in class ProcessCreator
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |