Package org.apache.catalina.ha
Interface ClusterDeployer
-
- All Superinterfaces:
ChannelListener
- All Known Implementing Classes:
FarmWarDeployer
public interface ClusterDeployer extends ChannelListener
A ClusterDeployer interface allows to plug in and out the different deployment implementations
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
backgroundProcess()
call from container Background ProcessCatalinaCluster
getCluster()
Returns the cluster the cluster deployer is associated withvoid
install(java.lang.String contextName, java.io.File webapp)
Install a new web application, whose web application archive is at the specified URL, into this container and all the other members of the cluster with the specified context name.void
remove(java.lang.String contextName, boolean undeploy)
Remove an existing web application, attached to the specified context name.void
setCluster(CatalinaCluster cluster)
Associates the cluster deployer with a clustervoid
start()
Start the cluster deployer, the owning container will invoke thisvoid
stop()
Stops the cluster deployer, the owning container will invoke this-
Methods inherited from interface org.apache.catalina.tribes.ChannelListener
accept, equals, hashCode, messageReceived
-
-
-
-
Method Detail
-
start
void start() throws java.lang.Exception
Start the cluster deployer, the owning container will invoke this- Throws:
java.lang.Exception
- - if failure to start cluster
-
stop
void stop() throws LifecycleException
Stops the cluster deployer, the owning container will invoke this- Throws:
LifecycleException
- Error stopping cluster deployer
-
install
void install(java.lang.String contextName, java.io.File webapp) throws java.io.IOException
Install a new web application, whose web application archive is at the specified URL, into this container and all the other members of the cluster with the specified context name.If this application is successfully installed locally, a ContainerEvent of type
INSTALL_EVENT
will be sent to all registered listeners, with the newly createdContext
as an argument.- Parameters:
contextName
- The context name to which this application should be installed (must be unique)webapp
- A WAR file or unpacked directory structure containing the web application to be installed- Throws:
java.lang.IllegalArgumentException
- if the specified context name is malformedjava.lang.IllegalStateException
- if the specified context name is already attached to an existing web applicationjava.io.IOException
- if an input/output error was encountered during installation
-
remove
void remove(java.lang.String contextName, boolean undeploy) throws java.io.IOException
Remove an existing web application, attached to the specified context name. If this application is successfully removed, a ContainerEvent of typeREMOVE_EVENT
will be sent to all registered listeners, with the removedContext
as an argument. Deletes the web application war file and/or directory if they exist in the Host's appBase.- Parameters:
contextName
- The context name of the application to be removedundeploy
- boolean flag to remove web application from server- Throws:
java.lang.IllegalArgumentException
- if the specified context name is malformedjava.lang.IllegalArgumentException
- if the specified context name does not identify a currently installed web applicationjava.io.IOException
- if an input/output error occurs during removal
-
backgroundProcess
void backgroundProcess()
call from container Background Process
-
getCluster
CatalinaCluster getCluster()
Returns the cluster the cluster deployer is associated with- Returns:
- CatalinaCluster
-
setCluster
void setCluster(CatalinaCluster cluster)
Associates the cluster deployer with a cluster- Parameters:
cluster
- CatalinaCluster
-
-