|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
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 Spawnable
IOException
- on trouble launching the processpublic InputStream getStdout()
Spawnable
Spawn
's stdout can be read.
getStdout
in interface Spawnable
Process.getInputStream()
public OutputStream getStdin()
Spawnable
Spawn
's stdin can be written to.
getStdin
in interface Spawnable
Process.getOutputStream()
public InputStream getStderr()
Spawnable
Spawn
's stderr can be read.
getStderr
in interface Spawnable
Process.getErrorStream()
public boolean isClosed()
Spawnable
Spawn
has finished.
isClosed
in interface Spawnable
public int getExitValue() throws ExpectJException
getExitValue
in interface Spawnable
ExpectJException
- if the process is still running.Spawnable.isClosed()
,
System.exit(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |