org.schmant.support.io
Interface ProcessOutputListener

All Superinterfaces:
Runnable
All Known Implementing Classes:
AbstractProcessOutputListener

public interface ProcessOutputListener
extends Runnable

This defines a Runnable class that regularly polls an InputStream for output.

A process output listener object is run in its own thread. When it is done listening, it returns from the run method.

Since:
0.5
Author:
Karl Gustafsson

Method Summary
 void flagDone()
          This is called by the owner when the listener should stop listening to the stream and return from the run method.
 String getOutput()
          Get the entire output from the monitored process.
 void setStream(InputStream is)
          Set the stream to listen to.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

setStream

void setStream(InputStream is)
Set the stream to listen to.

Parameters:
is - The stream.

flagDone

void flagDone()
This is called by the owner when the listener should stop listening to the stream and return from the run method.


getOutput

String getOutput()
Get the entire output from the monitored process. This is optional to support. It's OK to return null.

Returns:
The process' output, or null.