|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Spawnable
Implementors of this interface can be spawned by ExpectJ
.
Nested Class Summary | |
---|---|
static interface |
Spawnable.CloseListener
Will be notified when a Spawnable closes. |
Method Summary | |
---|---|
int |
getExitValue()
If the Spawn has exited, its exit code is returned. |
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 |
setCloseListener(Spawnable.CloseListener closeListener)
Register a listener that will be called when this spawnable closes. |
void |
start()
This method launches the Spawn . |
void |
stop()
Stops a running Spawn . |
Method Detail |
---|
void start() throws IOException
Spawn
. It starts the
StreamPiper
s that enable copying of process stream contents to
standard streams.
IOException
- on trouble.InputStream getStdout()
Spawn
's stdout can be read.
Process.getInputStream()
OutputStream getStdin()
Spawn
's stdin can be written to.
Process.getOutputStream()
InputStream getStderr()
Spawn
's stderr can be read.
Process.getErrorStream()
boolean isClosed()
Spawn
has finished.
int getExitValue() throws ExpectJException
Spawn
has exited, its exit code is returned.
ExpectJException
- if the spawn is still running.isClosed()
,
System.exit(int)
void stop()
Spawn
. After this method returns,
isClosed()
must return true.
void setCloseListener(Spawnable.CloseListener closeListener)
closeListener
- The listener that will be notified when this
spawnable closes.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |