org.apache.catalina
Interface Deployer
- All Superinterfaces:
- Container
- All Known Implementing Classes:
- StandardHost
- public interface Deployer
- extends Container
A Deployer is a specialized Container into which web applications
can be deployed and undeployed. Such a Container will create and install
child Context instances for each deployed application. The unique key
for each web application will be the context path to which it is attached.
- Version:
- $Revision: 1.1 $ $Date: 2000/10/04 23:03:03 $
- Author:
- Craig R. McClanahan
Field Summary |
static java.lang.String |
DEPLOY_EVENT
The ContainerEvent event type sent when a new application is
deployed by deploy() . |
static java.lang.String |
UNDEPLOY_EVENT
The ContainerEvent event type sent when an existing application is
undeployed by undeploy() . |
Method Summary |
void |
deploy(java.lang.String contextPath,
java.net.URL war)
Deploy a new web application, whose web application archive is at the
specified URL, into this container with the specified context path. |
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. |
void |
undeploy(java.lang.String contextPath)
Undeploy an existing web application, attached to the specified context
path. |
Methods inherited from interface org.apache.catalina.Container |
addChild, addContainerListener, addMapper, addPropertyChangeListener, findChild, findChildren, findMapper, findMappers, getInfo, getLoader, getLogger, getManager, getName, getParent, getParentClassLoader, getRealm, getResources, invoke, map, removeChild, removeContainerListener, removeMapper, removePropertyChangeListener, setLoader, setLogger, setManager, setName, setParent, setParentClassLoader, setRealm, setResources |
DEPLOY_EVENT
public static final java.lang.String DEPLOY_EVENT
- The ContainerEvent event type sent when a new application is
deployed by
deploy()
.
UNDEPLOY_EVENT
public static final java.lang.String UNDEPLOY_EVENT
- The ContainerEvent event type sent when an existing application is
undeployed by
undeploy()
.
deploy
public void deploy(java.lang.String contextPath,
java.net.URL war)
throws java.io.IOException
- Deploy 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 deployed, a ContainerEvent of type
DEPLOY_EVENT
will be sent to all registered listeners,
with the newly created Context
as an argument.
- Parameters:
contextPath
- The context path to which this application should
be deployed (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 deployed- Throws:
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
is already attached to an existing web applicationjava.io.IOException
- if an input/output error was encountered
during deployment
findDeployedApp
public 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
.
- Parameters:
contextPath
- The context path of the requested web application
findDeployedApps
public java.lang.String[] findDeployedApps()
- Return the context paths of all deployed web applications in this
Container. If there are no deployed applications, a zero-length
array is returned.
undeploy
public void undeploy(java.lang.String contextPath)
throws java.io.IOException
- Undeploy an existing web application, attached to the specified context
path. If this application is successfully undeployed, a
ContainerEvent of type
UNDEPLOY_EVENT
will be sent to all
registered listeners, with the undeployed Context
as
an argument.
- Parameters:
contextPath
- The context path of the application to be undeployed- Throws:
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 deployed web applicationjava.io.IOException
- if an input/output error occurs during
undeployment
Copyright © 2000 Apache Software Foundation. All Rights Reserved.