|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttcl.lang.Pipeline
public class Pipeline
This class encapsulates a pipeline of operating system commands
| Constructor Summary | |
|---|---|
Pipeline(Interp interp,
TclObject[] objv,
int startIndex)
Create a Pipeline initialized with commands. |
|
| Method Summary | |
|---|---|
int |
addCommand(List<String> command,
File workingDir)
Add an operating system command to the end of the pipeline |
void |
exec()
Executes the pipeline. |
int[] |
getExitValues()
|
int[] |
getProcessIdentifiers()
|
Redirect |
getStderrRedirect()
|
Redirect |
getStdinRedirect()
|
Redirect |
getStdoutRedirect()
|
boolean |
isErrorRedirectedToResult()
Return true if 2>@1 was seen |
boolean |
isExecInBackground()
|
void |
run()
|
void |
setExecInBackground(boolean execInBackground)
|
void |
setStderrRedirect(Redirect stderrRedirect)
|
void |
setStdinRedirect(Redirect stdinRedirect)
|
void |
setStdoutRedirect(Redirect stdoutRedirect)
|
void |
throwAnyExceptions()
|
void |
waitForExitAndCleanup(boolean force)
Wait for processes in pipeline to die, then close couplers and any open channels |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Pipeline(Interp interp,
TclObject[] objv,
int startIndex)
throws TclException
interp - TCL interpreter for this Pipelineobjv - Array of TclObjects that are in the for of TCL's 'exec' argsstartIndex - index of the objv object at which to start parsing
TclException - if a syntax error occurs| Method Detail |
|---|
public int addCommand(List<String> command,
File workingDir)
throws TclException
command - The command and its arguments. The List is not copied, so any
changes will be reflected in the PipelineworkingDir - New command starts in this directory
TclException
public void exec()
throws TclException
TclException
public void waitForExitAndCleanup(boolean force)
throws TclException
force - Kill processes forcibly, if true
TclExceptionpublic Redirect getStdinRedirect()
public void setStdinRedirect(Redirect stdinRedirect)
stdinRedirect - the stdinRedirect to setpublic Redirect getStdoutRedirect()
public void setStdoutRedirect(Redirect stdoutRedirect)
stdoutRedirect - the stdoutRedirect to setpublic Redirect getStderrRedirect()
public void setStderrRedirect(Redirect stderrRedirect)
stderrRedirect - the stderrRedirect to setpublic boolean isExecInBackground()
public void setExecInBackground(boolean execInBackground)
execInBackground - Set the execInBackground property, which determines if the
Pipeline runs in the backgroundpublic boolean isErrorRedirectedToResult()
public int[] getProcessIdentifiers()
public int[] getExitValues()
public void throwAnyExceptions()
throws TclException
IOException - if one has been caught during a background
waitForExitAndCleanup
TclExceptionpublic void run()
run in interface Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||