All Packages Class Hierarchy This Package Previous Next Index
Class com.sgi.sysadm.util.ProcessWatcher
java.lang.Object
|
+----com.sgi.sysadm.util.ProcessWatcher
- public class ProcessWatcher
- extends Object
ProcessWatcher spawns threads to deal with a running Process. Notifies
ProcessListeners when input arrives or the Process exits.
-
ProcessWatcher(Process)
- Constructor.
-
addProcessListener(ProcessListener)
- Add a listener interested in ProcessEvents.
-
removeProcessListener(ProcessListener)
- Remove a listener no longer interested in ProcessEvents.
-
startWatching()
- Initiate monitoring of the process.
ProcessWatcher
public ProcessWatcher(Process proc)
- Constructor.
- Parameters:
- proc - Process to watch.
addProcessListener
public void addProcessListener(ProcessListener listener)
- Add a listener interested in ProcessEvents. This method must be
called before startWatching() is called.
- Parameters:
- listener - A listener interested in ProcessEvents.
removeProcessListener
public synchronized void removeProcessListener(ProcessListener listener)
- Remove a listener no longer interested in ProcessEvents.
- Parameters:
- listener - A listener previously interested in ProcessEvents.
startWatching
public void startWatching()
- Initiate monitoring of the process. A call to startWatching()
indicates that all ProcessListeners have been added and they are
ready to receive events.
All Packages Class Hierarchy This Package Previous Next Index