org.apache.cactus.ant
Class StopServerHelper

java.lang.Object
  |
  +--org.apache.cactus.ant.StopServerHelper
All Implemented Interfaces:
java.lang.Runnable

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

A helper class for an Ant task that does the following : stop a running server by calling an Ant target to stop it in another thread and wait for the servlet engine to be stopped by trying to continously connect to a test URL. If it succeeds it means the server is not stopped yet !

Version:
$Id: StopServerHelper.java,v 1.3 2002/07/21 11:48:58 vmassol Exp $
Author:
Vincent Massol

Constructor Summary
StopServerHelper(org.apache.tools.ant.Task theTask)
           
 
Method Summary
 void execute()
           
 void run()
          The thread that calls the Ant target that stops the web server/servlet engine.
 void setStopTarget(java.lang.String theStopTarget)
           
 void setTestURL(java.lang.String theTestURL)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StopServerHelper

public StopServerHelper(org.apache.tools.ant.Task theTask)
Parameters:
theTask - the Ant task that is calling this helper
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
See Also:
Task.execute()

run

public void run()
The thread that calls the Ant target that stops the web server/servlet engine.
Specified by:
run in interface java.lang.Runnable

setTestURL

public void setTestURL(java.lang.String theTestURL)
Parameters:
theTestURL - the test URL to ping

setStopTarget

public void setStopTarget(java.lang.String theStopTarget)
Parameters:
theStopTarget - the Ant target to call


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.