|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectexpectj.AbstractSpawnable
expectj.ProcessSpawn
public class ProcessSpawn
This class spawns a process that ExpectJ can control.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface expectj.Spawnable |
|---|
Spawnable.CloseListener |
| Method Summary | |
|---|---|
int |
getExitValue()
If the process representes by this object has already exited, it returns the exit code. isClosed() should be used in conjunction with this method. |
InputStream |
getStderr()
Get a stream from which the Spawn's stderr can be read. |
OutputStream |
getStdin()
Get a stream through which the Spawn's stdin can be written to. |
InputStream |
getStdout()
Get a stream from which the Spawn's stdout can be read. |
boolean |
isClosed()
Find out whether the Spawn has finished. |
void |
start()
This method executes the given command within the specified time limit. |
void |
stop()
This method stops the spawned process. |
| Methods inherited from class expectj.AbstractSpawnable |
|---|
onClose, setCloseListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface expectj.Spawnable |
|---|
setCloseListener |
| Method Detail |
|---|
public void stop()
stop in interface Spawnable
public void start()
throws IOException
start in interface SpawnableIOException - on trouble launching the processpublic InputStream getStdout()
SpawnableSpawn's stdout can be read.
getStdout in interface SpawnableProcess.getInputStream()public OutputStream getStdin()
SpawnableSpawn's stdin can be written to.
getStdin in interface SpawnableProcess.getOutputStream()public InputStream getStderr()
SpawnableSpawn's stderr can be read.
getStderr in interface SpawnableProcess.getErrorStream()public boolean isClosed()
SpawnableSpawn has finished.
isClosed in interface Spawnable
public int getExitValue()
throws ExpectJException
getExitValue in interface SpawnableExpectJException - if the process is still running.Spawnable.isClosed(),
System.exit(int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||