|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProcessHandler
Interface used to manage the IO and termination needs of an external processes managed by ExternalProcess. The methods of this interface will be called by different threads, so implementors should take care to ensure thread safety
ExternalProcess
Method Summary | |
---|---|
void |
complete(int exitCode,
ProcessException exception)
Called when the external process has completed |
ProcessException |
getException()
Get any processing exception associated with this handler |
int |
getExitCode()
Get the process exit code |
boolean |
hasInput()
Indicate if this handler has input to provide to the process |
boolean |
isComplete()
Indicate if the process has completed |
void |
processError(java.io.InputStream error)
Process the process stderr stream |
void |
processOutput(java.io.InputStream output)
Process the process stdout stream |
void |
provideInput(java.io.OutputStream input)
Provide input to the external process. |
void |
reset()
Called if the process is to be re-executed. |
void |
setWatchdog(Watchdog watchdog)
Set the watchdog associated with this handler. |
boolean |
succeeded()
Indicate if the process execution has been considered successful. |
Method Detail |
---|
void processOutput(java.io.InputStream output) throws ProcessException
output
- the external process' output stream (available as an input to this class)
ProcessException
- if there is a problem processing the outputvoid processError(java.io.InputStream error) throws ProcessException
error
- the external process' standard error stream (available as an input to this class)
ProcessException
- if there is a problem processing the outputboolean hasInput()
void provideInput(java.io.OutputStream input)
input
- the output stream representing standard input to the external process
java.lang.IllegalStateException
- if no input has been configured.void complete(int exitCode, ProcessException exception)
exitCode
- the exit code of the external processexception
- any process exceptions that were thrown within the VM when handling the
external processboolean isComplete()
void setWatchdog(Watchdog watchdog)
boolean succeeded()
void reset()
ProcessException getException()
int getExitCode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |