org.apache.cactus.ant
Class StartServerHelper
java.lang.Object
|
+--org.apache.cactus.ant.StartServerHelper
- All Implemented Interfaces:
- java.lang.Runnable
- public class StartServerHelper
- extends java.lang.Object
- implements java.lang.Runnable
A helper class for an Ant Task that does the following :
- create a java thread,
- start another Ant target in that thread. This target must be a
blocking target that starts a web server/servlet engine,
- wait for that server to be started. This is done by continuously
trying to call a URL.
.
- Version:
- $Id: StartServerHelper.html,v 1.1 2003/04/14 12:27:21 sinisa Exp $
- Author:
- Vincent Massol
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StartServerHelper
public StartServerHelper(org.apache.tools.ant.Task theTask)
- Parameters:
theTask
- the Ant task that is calling this helper
isServerAlreadyStarted
public boolean isServerAlreadyStarted()
- Returns:
- true if the server has already been started.
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 starts the web server/servlet
engine. Must be a blocking target.
- Specified by:
run
in interface java.lang.Runnable
setTestURL
public void setTestURL(java.lang.String theTestURL)
- Parameters:
theTestURL
- the test URL to ping
setStartTarget
public void setStartTarget(java.lang.String theStartTarget)
- Parameters:
theStartTarget
- the Ant target to call
Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.