com.isti.trinetwatch.controlAgentSim
Class ProcessWait

java.lang.Object
  extended by com.isti.trinetwatch.controlAgentSim.ProcessWait
All Implemented Interfaces:
java.lang.Runnable

public class ProcessWait
extends java.lang.Object
implements java.lang.Runnable

Class ProcessWait waits for a running process to terminate.


Constructor Summary
ProcessWait(java.lang.Process tmpProc)
           
 
Method Summary
 int exitValue()
          Used to get the exit value of the process.
 boolean hasProcessFinished()
          This method is used to poll the thread for the termination status of a running process it was passed at creation.
 void run()
          Use this method to start the thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessWait

public ProcessWait(java.lang.Process tmpProc)
Method Detail

hasProcessFinished

public boolean hasProcessFinished()
This method is used to poll the thread for the termination status of a running process it was passed at creation. It returns a boolean indicating whether the process has terminated.

Returns:
True if the script process has terminated; false if it has not.

exitValue

public int exitValue()
Used to get the exit value of the process.

Returns:
The exit value of the process as an int.

run

public void run()
Use this method to start the thread.

Specified by:
run in interface java.lang.Runnable