| java.lang.Object org.apache.catalina.core.StandardHostDeployer
StandardHostDeployer | public class StandardHostDeployer implements Deployer(Code) | | Implementation of Deployer that is delegated to by the
StandardHost implementation class.
author: Craig R. McClanahan version: $Revision: 1.23 $ $Date: 2004/04/12 22:05:15 $ |
Field Summary | |
protected StandardHost | host The StandardHost instance we are associated with. | protected static StringManager | sm The string manager for this package. |
Method Summary | |
public void | addChild(Container child) Delegate a request to add a child Context to our associated Host. | protected Digester | createDigester() Create (if necessary) and return a Digester configured to process the
context configuration descriptor for an application. | public Context | findDeployedApp(String contextPath) Return the Context for the deployed application that is associated
with the specified context path (if any); otherwise return
null . | public String[] | findDeployedApps() Return the context paths of all deployed web applications in this
Container. | public Host | getHost() | public String | getName() Return the name of the Container with which this Deployer is associated. | public ClassLoader | getParentClassLoader() Delegate a request for the parent class loader to our associated Host. | public synchronized void | install(String contextPath, URL war) Install a new web application, whose web application archive is at the
specified URL, into this container with the specified context path.
A context path of "" (the empty string) should be used for the root
application for this container. | public synchronized void | install(String contextPath, URL war, String configFile) Install a new web application, whose web application archive is at the
specified URL, into this container with the specified context path.
A context path of "" (the empty string) should be used for the root
application for this container. | public synchronized void | install(URL config, 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.
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. | public synchronized void | install(URL war) Installs a new web application from the web application archive at the
specified URL, which must contain a META-INF/context.xml context
configuration file (consisting of a <Context>
element).
The web application is installed at the path specified inside the
embedded META-INF/context.xml. | public boolean | isDeployXML() Returns true if context.xml config files are supported. | public void | remove(String contextPath) Remove an existing web application, attached to the specified context
path. | public void | remove(String contextPath, boolean undeploy) Remove an existing web application, attached to the specified context
path. | public void | setHost(Host host) | public void | start(String contextPath) Start an existing web application, attached to the specified context
path. | public void | stop(String contextPath) Stop an existing web application, attached to the specified context
path. |
StandardHostDeployer | public StandardHostDeployer()(Code) | | |
StandardHostDeployer | public StandardHostDeployer(StandardHost host)(Code) | | Create a new StandardHostDeployer associated with the specified
StandardHost.
Parameters: host - The StandardHost we are associated with |
addChild | public void addChild(Container child)(Code) | | Delegate a request to add a child Context to our associated Host.
Parameters: child - The child Context to be added |
createDigester | protected Digester createDigester()(Code) | | Create (if necessary) and return a Digester configured to process the
context configuration descriptor for an application.
|
findDeployedApp | public Context findDeployedApp(String contextPath)(Code) | | Return the Context for the deployed application that is associated
with the specified context path (if any); otherwise return
null .
Parameters: contextPath - The context path of the requested web application |
findDeployedApps | public String[] findDeployedApps()(Code) | | Return the context paths of all deployed web applications in this
Container. If there are no deployed applications, a zero-length
array is returned.
|
getName | public String getName()(Code) | | Return the name of the Container with which this Deployer is associated.
|
getParentClassLoader | public ClassLoader getParentClassLoader()(Code) | | Delegate a request for the parent class loader to our associated Host.
|
install | public synchronized void install(String contextPath, URL war) throws IOException(Code) | | Install a new web application, whose web application archive is at the
specified URL, into this container with the specified context path.
A context path of "" (the empty string) should be used for the root
application for this container. Otherwise, the context path must
start with a slash.
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.
Parameters: contextPath - The context path to which this application shouldbe installed (must be unique) Parameters: war - A URL of type "jar:" that points to a WAR file, or type"file:" that points to an unpacked directory structure containingthe web application to be installed exception: IllegalArgumentException - if the specified context pathis malformed (it must be "" or start with a slash) exception: IllegalStateException - if the specified context pathis already attached to an existing web application exception: IOException - if an input/output error was encounteredduring installation |
install | public synchronized void install(String contextPath, URL war, String configFile) throws IOException(Code) | | Install a new web application, whose web application archive is at the
specified URL, into this container with the specified context path.
A context path of "" (the empty string) should be used for the root
application for this container. Otherwise, the context path must
start with a slash.
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.
Parameters: contextPath - The context path to which this application shouldbe installed (must be unique) Parameters: war - A URL of type "jar:" that points to a WAR file, or type"file:" that points to an unpacked directory structure containingthe web application to be installed Parameters: configFile - The path to a file to save the Context information.If configFile is null, the Context information is saved in server.xml;if it is NOT null, the Context information is saved in configFile. exception: IllegalArgumentException - if the specified context pathis malformed (it must be "" or start with a slash) exception: IllegalStateException - if the specified context pathis already attached to an existing web application exception: IOException - if an input/output error was encounteredduring installation |
install | public synchronized void install(URL config, URL war) throws IOException(Code) | | Install a new web application, whose context configuration file
(consisting of a <Context> element) and (optional)
web application archive are at the specified URLs.
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.
Parameters: config - A URL that points to the context configuration descriptorto be used for configuring the new Context Parameters: war - A URL of type "jar:" that points to a WAR file, or type"file:" that points to an unpacked directory structure containingthe web application to be installed, or null to usethe docBase attribute from the configuration descriptor exception: IllegalArgumentException - if one of the specified URLs isnull exception: IllegalStateException - if the context path specified in thecontext configuration file is already attached to an existing webapplication exception: IOException - if an input/output error was encounteredduring installation |
install | public synchronized void install(URL war) throws IOException(Code) | | Installs a new web application from the web application archive at the
specified URL, which must contain a META-INF/context.xml context
configuration file (consisting of a <Context>
element).
The web application is installed at the path specified inside the
embedded META-INF/context.xml. The docBase (if any) specified inside the
embedded META-INF/context.xml is overridden with the web application's
location.
If the installation succeeds, a ContainerEvent of type
INSTALL_EVENT is sent to all registered listeners,
with the newly created Context as its argument.
Parameters: war - URL pointing to web application location (WAR-packaged orunpacked directory) exception: IllegalArgumentException - if war is null, or ifthe deployment host does not support any context.xmlconfiguration files exception: IllegalStateException - if the context path specified in thecontext configuration file is already in use by an existingweb application exception: IOException - if an input/output error was encounteredduring installation |
isDeployXML | public boolean isDeployXML()(Code) | | Returns true if context.xml config files are supported.
true of context.xml config files are supported, false otherwise |
remove | public void remove(String contextPath) throws IOException(Code) | | Remove an existing web application, attached to the specified context
path. If this application is successfully removed, a
ContainerEvent of type REMOVE_EVENT will be sent to all
registered listeners, with the removed Context as
an argument.
Parameters: contextPath - The context path of the application to be removed exception: IllegalArgumentException - if the specified context pathis malformed (it must be "" or start with a slash) exception: IllegalArgumentException - if the specified context path doesnot identify a currently installed web application exception: IOException - if an input/output error occurs duringremoval |
remove | public void remove(String contextPath, boolean undeploy) throws IOException(Code) | | Remove an existing web application, attached to the specified context
path. If this application is successfully removed, a
ContainerEvent of type 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.
Parameters: contextPath - The context path of the application to be removed Parameters: undeploy - boolean flag to remove web application from server exception: IllegalArgumentException - if the specified context pathis malformed (it must be "" or start with a slash) exception: IllegalArgumentException - if the specified context path doesnot identify a currently installed web application exception: IOException - if an input/output error occurs duringremoval |
start | public void start(String contextPath) throws IOException(Code) | | Start an existing web application, attached to the specified context
path. Only starts a web application if it is not running.
Parameters: contextPath - The context path of the application to be started exception: IllegalArgumentException - if the specified context pathis malformed (it must be "" or start with a slash) exception: IllegalArgumentException - if the specified context path doesnot identify a currently installed web application exception: IOException - if an input/output error occurs duringstartup |
stop | public void stop(String contextPath) throws IOException(Code) | | Stop an existing web application, attached to the specified context
path. Only stops a web application if it is running.
Parameters: contextPath - The context path of the application to be stopped exception: IllegalArgumentException - if the specified context pathis malformed (it must be "" or start with a slash) exception: IllegalArgumentException - if the specified context path doesnot identify a currently installed web application exception: IOException - if an input/output error occurs while stoppingthe web application |
|
|