|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.Proc
org.jvnet.hudson.test.FakeLauncher.FinishedProc
public static class FakeLauncher.FinishedProc
Fake Proc implementation that represents a completed process.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class hudson.Proc |
|---|
Proc.LocalProc, Proc.RemoteProc |
| Field Summary | |
|---|---|
int |
exitCode
|
| Fields inherited from class hudson.Proc |
|---|
SHOW_PID |
| Constructor Summary | |
|---|---|
FakeLauncher.FinishedProc(int exitCode)
|
|
| Method Summary | |
|---|---|
InputStream |
getStderr()
Returns an InputStream to read from stderr of the child process. |
OutputStream |
getStdin()
Returns an OutputStream to write to stdin of the child process. |
InputStream |
getStdout()
Returns an InputStream to read from stdout of the child process. |
boolean |
isAlive()
Checks if the process is still alive. |
int |
join()
Waits for the completion of the process. |
void |
kill()
Terminates the process. |
| Methods inherited from class hudson.Proc |
|---|
joinWithTimeout |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final int exitCode
| Constructor Detail |
|---|
public FakeLauncher.FinishedProc(int exitCode)
| Method Detail |
|---|
public boolean isAlive()
throws IOException,
InterruptedException
Proc
isAlive in class ProcIOException
InterruptedException
public void kill()
throws IOException,
InterruptedException
Proc
kill in class ProcIOException - if there's an error killing a process
and a stack trace could help the trouble-shooting.
InterruptedException
public int join()
throws IOException,
InterruptedException
ProcProc.getStdout() etc.,
this method also blocks until we finish reading everything that the process has produced
to stdout/stderr.
If the thread is interrupted while waiting for the completion of the process, this method terminates the process and exits with a non-zero exit code.
join in class ProcIOException - if there's an error launching/joining a process
and a stack trace could help the trouble-shooting.
InterruptedExceptionpublic InputStream getStdout()
ProcInputStream to read from stdout of the child process.
When this method returns null, Proc.LocalProc will internally pump the output from
the child process to your OutputStream of choosing.
getStdout in class ProcLauncher.ProcStarter.readStdout() is used to indicate
that the caller intends to pump the stream by itself.public InputStream getStderr()
ProcInputStream to read from stderr of the child process.
When this method returns null, Proc.LocalProc will internally pump the output from
the child process to your OutputStream of choosing.
getStderr in class ProcLauncher.ProcStarter.readStderr() is used to indicate
that the caller intends to pump the stream by itself.public OutputStream getStdin()
ProcOutputStream to write to stdin of the child process.
When this method returns null, Proc.LocalProc will internally pump the InputStream
of your choosing to the child process.
getStdin in class ProcLauncher.ProcStarter.writeStdin() is used to indicate
that the caller intends to pump the stream by itself.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||