org.apache.tools.ant.taskdefs
Class ExecuteWatchdog

java.lang.Object
  |
  +--org.apache.tools.ant.taskdefs.ExecuteWatchdog
All Implemented Interfaces:
java.lang.Runnable

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

Destroys a process running for too long.

Author:
thomas.haas@softwired-inc.com

Constructor Summary
ExecuteWatchdog(int timeout)
          Creates a new watchdog.
 
Method Summary
 void checkException()
           
 void run()
          Watches the process and terminates it, if it runs for to long.
 void start(java.lang.Process process)
          Watches the given process and terminates it, if it runs for to long.
 void stop()
          Stops the watcher.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecuteWatchdog

public ExecuteWatchdog(int timeout)
Creates a new watchdog.
Parameters:
timeout - the timeout for the process.
Method Detail

start

public void start(java.lang.Process process)
Watches the given process and terminates it, if it runs for to long.
Parameters:
process - the process to watch.

stop

public void stop()
Stops the watcher.

run

public void run()
Watches the process and terminates it, if it runs for to long.
Specified by:
run in interface java.lang.Runnable

checkException

public void checkException()
                    throws BuildException


Copyright © 2000 Apache Software Foundation. All Rights Reserved.