org.apache.catalina
Interface Deployer
- StandardHost, StandardHostDeployer
public interface Deployer
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:
- Craig R. McClanahan
static String | INSTALL_EVENT - The ContainerEvent event type sent when a new application is
installed by
install() , after it has been started.
|
static String | PRE_INSTALL_EVENT - The ContainerEvent event type sent when a new application is
being installed by
install() , before it has been
started.
|
static String | REMOVE_EVENT - The ContainerEvent event type sent when an existing application is
removed by
remove() .
|
Context | findDeployedApp(String contextPath) - Return the Context for the deployed application that is associated
with the specified context path (if any); otherwise return
null .
|
String[] | findDeployedApps() - Return the context paths of all deployed web applications in this
Container.
|
String | getName() - Return the name of the Container with which this Deployer is associated.
|
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.
|
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).
|
void | install(URL config, URL war) - Install a new web application, whose context configuration file
(consisting of a
<Context> element) and web
application archive are at the specified URLs.
|
boolean | isDeployXML() - Returns true if context.xml config files are supported.
|
void | remove(String contextPath) - Remove an existing web application, attached to the specified context
path.
|
void | remove(String contextPath, boolean undeploy) - Remove an existing web application, attached to the specified context
path.
|
void | start(String contextPath) - Start an existing web application, attached to the specified context
path.
|
void | stop(String contextPath) - Stop an existing web application, attached to the specified context
path.
|
INSTALL_EVENT
public static final String INSTALL_EVENT
The ContainerEvent event type sent when a new application is
installed by install()
, after it has been started.
PRE_INSTALL_EVENT
public static final String PRE_INSTALL_EVENT
The ContainerEvent event type sent when a new application is
being installed by install()
, before it has been
started.
REMOVE_EVENT
public static final String REMOVE_EVENT
The ContainerEvent event type sent when an existing application is
removed by remove()
.
findDeployedApp
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
.
contextPath
- The context path of the requested web application
findDeployedApps
public 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.
getName
public String getName()
Return the name of the Container with which this Deployer is associated.
install
public void install(String contextPath,
URL war)
throws IOException
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
INSTALL_EVENT
will be sent to all registered listeners,
with the newly created
Context
as an argument.
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
install
public void install(URL war)
throws IOException
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.
war
- URL pointing to web application location (WAR-packaged or
unpacked directory)
install
public void install(URL config,
URL war)
throws IOException
Install a new web application, whose context configuration file
(consisting of a
<Context>
element) and web
application archive are at the specified URLs.
If this application is successfully installed, a ContainerEvent
of type
INSTALL_EVENT
will be sent to all registered
listeners, with the newly created
Context
as an argument.
config
- A URL that points to the context configuration file 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
isDeployXML
public boolean isDeployXML()
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
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.
contextPath
- The context path of the application to be removed
remove
public void remove(String contextPath,
boolean undeploy)
throws IOException
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.
contextPath
- The context path of the application to be removedundeploy
- boolean flag to remove web application from server
start
public void start(String contextPath)
throws IOException
Start an existing web application, attached to the specified context
path. Only starts a web application if it is not running.
contextPath
- The context path of the application to be started
stop
public void stop(String contextPath)
throws IOException
Stop an existing web application, attached to the specified context
path. Only stops a web application if it is running.
contextPath
- The context path of the application to be stopped
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.