|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.catalina.core.StandardHostDeployer
Implementation of Deployer that is delegated to by the
StandardHost
implementation class.
Field Summary | |
protected StandardHost |
host
The StandardHost instance we are associated with. |
protected static StringManager |
sm
The string manager for this package. |
Fields inherited from interface org.apache.catalina.Deployer |
INSTALL_EVENT, PRE_INSTALL_EVENT, REMOVE_EVENT |
Constructor Summary | |
StandardHostDeployer(StandardHost host)
Create a new StandardHostDeployer associated with the specified StandardHost. |
Method Summary | |
void |
addChild(Container child)
Delegate a request to add a child Context to our associated Host. |
protected org.apache.commons.digester.Digester |
createDigester()
Create (if necessary) and return a Digester configured to process the context configuration descriptor for an application. |
protected void |
deleteDir(java.io.File dir)
Delete the specified directory, including all of its contents and subdirectories recursively. |
Context |
findDeployedApp(java.lang.String contextPath)
Return the Context for the deployed application that is associated with the specified context path (if any); otherwise return null . |
java.lang.String[] |
findDeployedApps()
Return the context paths of all deployed web applications in this Container. |
java.lang.String |
getName()
Return the name of the Container with which this Deployer is associated. |
java.lang.ClassLoader |
getParentClassLoader()
Delegate a request for the parent class loader to our associated Host. |
void |
install(java.lang.String contextPath,
java.net.URL war)
Install a new web application, whose web application archive is at the specified URL, into this container with the specified context path. |
void |
install(java.net.URL config,
java.net.URL war)
Install a new web application, whose context configuration file (consisting of a <Context> element) and (optional)
web application archive are at the specified URLs. |
void |
remove(java.lang.String contextPath)
Remove an existing web application, attached to the specified context path. |
void |
remove(java.lang.String contextPath,
boolean undeploy)
Remove an existing web application, attached to the specified context path. |
void |
start(java.lang.String contextPath)
Start an existing web application, attached to the specified context path. |
void |
stop(java.lang.String contextPath)
Stop an existing web application, attached to the specified context path. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected StandardHost host
StandardHost
instance we are associated with.
protected static StringManager sm
Constructor Detail |
public StandardHostDeployer(StandardHost host)
host
- The StandardHost we are associated withMethod Detail |
public java.lang.String getName()
getName
in interface Deployer
public void install(java.lang.String contextPath, java.net.URL war) throws java.io.IOException
If this application is successfully installed, a ContainerEvent of type
PRE_INSTALL_EVENT
will be sent to registered listeners
before the associated Context is started, and a ContainerEvent of type
INSTALL_EVENT
will be sent to all registered listeners
after the associated Context is started, with the newly created
Context
as an argument.
install
in interface Deployer
contextPath
- The context path to which this application should
be installed (must be unique)war
- A URL of type "jar:" that points to a WAR file, or type
"file:" that points to an unpacked directory structure containing
the web application to be installed
java.lang.IllegalArgumentException
- if the specified context path
is malformed (it must be "" or start with a slash)
java.lang.IllegalStateException
- if the specified context path
is already attached to an existing web application
java.io.IOException
- if an input/output error was encountered
during installationpublic void install(java.net.URL config, java.net.URL war) throws java.io.IOException
Install a new web application, whose context configuration file
(consisting of a <Context>
element) and (optional)
web application archive are at the specified URLs.
PRE_INSTALL_EVENT
will be sent to registered listeners
before the associated Context is started, and a ContainerEvent of type
INSTALL_EVENT
will be sent to all registered listeners
after the associated Context is started, with the newly created
Context
as an argument.
install
in interface Deployer
config
- A URL that points to the context configuration descriptor
to be used for configuring the new Contextwar
- A URL of type "jar:" that points to a WAR file, or type
"file:" that points to an unpacked directory structure containing
the web application to be installed, or null
to use
the docBase
attribute from the configuration descriptor
java.lang.IllegalArgumentException
- if one of the specified URLs is
null
java.lang.IllegalStateException
- if the context path specified in the
context configuration file is already attached to an existing web
application
java.io.IOException
- if an input/output error was encountered
during installationpublic Context findDeployedApp(java.lang.String contextPath)
null
.
findDeployedApp
in interface Deployer
contextPath
- The context path of the requested web applicationpublic java.lang.String[] findDeployedApps()
findDeployedApps
in interface Deployer
public void remove(java.lang.String contextPath) throws java.io.IOException
REMOVE_EVENT
will be sent to all
registered listeners, with the removed Context
as
an argument.
remove
in interface Deployer
contextPath
- The context path of the application to be removed
java.lang.IllegalArgumentException
- if the specified context path
is malformed (it must be "" or start with a slash)
java.lang.IllegalArgumentException
- if the specified context path does
not identify a currently installed web application
java.io.IOException
- if an input/output error occurs during
removalpublic void remove(java.lang.String contextPath, boolean undeploy) throws java.io.IOException
REMOVE_EVENT
will be sent to all
registered listeners, with the removed Context
as
an argument. Deletes the web application war file and/or directory
if they exist in the Host's appBase.
remove
in interface Deployer
contextPath
- The context path of the application to be removedundeploy
- boolean flag to remove web application from server
java.lang.IllegalArgumentException
- if the specified context path
is malformed (it must be "" or start with a slash)
java.lang.IllegalArgumentException
- if the specified context path does
not identify a currently installed web application
java.io.IOException
- if an input/output error occurs during
removalpublic void start(java.lang.String contextPath) throws java.io.IOException
start
in interface Deployer
contextPath
- The context path of the application to be started
java.lang.IllegalArgumentException
- if the specified context path
is malformed (it must be "" or start with a slash)
java.lang.IllegalArgumentException
- if the specified context path does
not identify a currently installed web application
java.io.IOException
- if an input/output error occurs during
startuppublic void stop(java.lang.String contextPath) throws java.io.IOException
stop
in interface Deployer
contextPath
- The context path of the application to be stopped
java.lang.IllegalArgumentException
- if the specified context path
is malformed (it must be "" or start with a slash)
java.lang.IllegalArgumentException
- if the specified context path does
not identify a currently installed web application
java.io.IOException
- if an input/output error occurs while stopping
the web applicationpublic void addChild(Container child)
child
- The child Context to be addedpublic java.lang.ClassLoader getParentClassLoader()
protected org.apache.commons.digester.Digester createDigester()
protected void deleteDir(java.io.File dir)
dir
- File object representing the directory to be deleted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |