| java.lang.Object org.apache.catalina.cluster.deploy.FarmWarDeployer
FarmWarDeployer | public class FarmWarDeployer implements ClusterDeployer,FileChangeListener(Code) | |
A farm war deployer is a class that is able to
deploy/undeploy web applications in WAR form
within the cluster.
Any host can act as the admin, and will have three directories
- deployDir - the directory where we watch for changes
- applicationDir - the directory where we install applications
- tempDir - a temporaryDirectory to store binary data when downloading a war
from the cluster
Currently we only support deployment of WAR files since they are easier to send
across the wire.
author: Filip Hanik version: 1.0 |
Method Summary | |
public boolean | accept(ClusterMessage msg) Before the cluster invokes messageReceived the
cluster will ask the receiver to accept or decline the message,
In the future, when messages get big, the accept method will only take
a message header
Parameters: msg - ClusterMessage boolean - returns true to indicate that messageReceivedshould be invoked. | public void | cleanDeployDir() | public boolean | equals(Object listener) | public void | fileModified(File newWar) | public void | fileRemoved(File removeWar) | public CatalinaCluster | getCluster() | public String | getDeployDir() | public Deployer | getDeployer() | public synchronized FileMessageFactory | getFactory(FileMessage msg) | public String | getTempDir() | public String | getWatchDir() | public boolean | getWatchEnabled() | public int | hashCode() | public void | install(String contextPath, URL war) 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 path.
A context path of "" (the empty string) should be used for the root
application for this container. | public boolean | isWatchEnabled() | public void | messageReceived(ClusterMessage msg) Callback from the cluster, when a message is received,
The cluster will broadcast it invoking the messageReceived
on the receiver. | public void | remove(String contextPath, boolean undeploy) Remove an existing web application, attached to the specified context
path. | public void | removeFactory(FileMessage msg) | public void | setCluster(CatalinaCluster cluster) | public void | setDeployDir(String deployDir) | public void | setDeployer(Deployer deployer) | public void | setTempDir(String tempDir) | public void | setWatchDir(String watchDir) | public void | setWatchEnabled(boolean watchEnabled) | public void | start() | public void | stop() |
deployer | protected Deployer deployer(Code) | | |
log | public static org.apache.commons.logging.Log log(Code) | | |
started | protected boolean started(Code) | | |
watchEnabled | protected boolean watchEnabled(Code) | | |
FarmWarDeployer | public FarmWarDeployer()(Code) | | |
accept | public boolean accept(ClusterMessage msg)(Code) | | Before the cluster invokes messageReceived the
cluster will ask the receiver to accept or decline the message,
In the future, when messages get big, the accept method will only take
a message header
Parameters: msg - ClusterMessage boolean - returns true to indicate that messageReceivedshould be invoked. If false is returned, the messageReceived methodwill not be invoked. |
cleanDeployDir | public void cleanDeployDir()(Code) | | |
fileModified | public void fileModified(File newWar)(Code) | | |
fileRemoved | public void fileRemoved(File removeWar)(Code) | | |
getDeployer | public Deployer getDeployer()(Code) | | |
getWatchEnabled | public boolean getWatchEnabled()(Code) | | |
hashCode | public int hashCode()(Code) | | |
install | public 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 and all the other
members of the cluster 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 locally,
a ContainerEvent of type
INSTALL_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 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 |
isWatchEnabled | public boolean isWatchEnabled()(Code) | | |
messageReceived | public void messageReceived(ClusterMessage msg)(Code) | | Callback from the cluster, when a message is received,
The cluster will broadcast it invoking the messageReceived
on the receiver.
Parameters: msg - ClusterMessage - the message received from the cluster |
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 |
setDeployDir | public void setDeployDir(String deployDir)(Code) | | |
setDeployer | public void setDeployer(Deployer deployer)(Code) | | |
setWatchEnabled | public void setWatchEnabled(boolean watchEnabled)(Code) | | |
stop | public void stop() throws LifecycleException(Code) | | |
|
|