|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.cactus.integration.ant.container.AbstractContainer
org.apache.cactus.integration.ant.container.GenericContainer
A generic container that can be nested in the
CactusTask
to support complete
customization of the container lifecycle from a build file.
Nested Class Summary | |
class |
GenericContainer.Hook
Class that represents the nested 'startup' and 'shutdown' elements. |
Constructor Summary | |
GenericContainer()
|
Method Summary | |
GenericContainer.Hook |
createShutDown()
Creates a nested 'shutdown' element. |
GenericContainer.Hook |
createStartUp()
Creates a nested 'startup' element. |
java.lang.String |
getName()
Returns a displayable name of the container for logging purposes. |
int |
getPort()
Returns the port to which the container should listen. |
boolean |
isShutDownSet()
Returns whether a way to start the container has already been set, either as a target, or as a nested task container. |
boolean |
isStartUpSet()
Returns whether a way to stop the container has already been set, either as a target, or as a nested task container. |
void |
setName(java.lang.String theName)
Sets the name of the container for logging purposes. |
void |
setPort(int thePort)
Sets the port to which the container should listen. |
void |
setShutDownTarget(java.lang.String theShutDownTarget)
Sets the target to call to stop the server. |
void |
setStartUpTarget(java.lang.String theStartUpTarget)
Sets the target to call to start the server. |
void |
shutDown()
Shuts down the container by delegating to the shutdown hook. |
void |
startUp()
Starts up the container by delegating to the startup hook. |
Methods inherited from class org.apache.cactus.integration.ant.container.AbstractContainer |
createExclude, getExcludePatterns, getStartUpWait, getSystemProperties, getToDir, init, isEnabled, isExcluded, setAntTaskFactory, setDeployableFile, setIf, setLog, setStartUpWait, setSystemProperties, setToDir, setUnless |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, log, log, setProject |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GenericContainer()
Method Detail |
public GenericContainer.Hook createStartUp() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
- If a startup hook has already been addedpublic GenericContainer.Hook createShutDown() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
- If a shutdown hook has already been addedpublic boolean isShutDownSet()
true
if the shut down procedure has been setpublic boolean isStartUpSet()
true
if the start up procedure has been setpublic void setName(java.lang.String theName)
theName
- The container namepublic void setPort(int thePort)
thePort
- The port to setpublic void setStartUpTarget(java.lang.String theStartUpTarget)
theStartUpTarget
- the Ant target to callpublic void setShutDownTarget(java.lang.String theShutDownTarget)
theShutDownTarget
- the Ant target to callpublic java.lang.String getName()
Container
Container.getName()
public int getPort()
public void startUp() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
- If thrown by the startup hookpublic void shutDown() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
- If thrown by the shutdown hook
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |