A Cluster implementation using simple multicast.
Responsible for setting
up a cluster and provides callers with a valid multicast receiver/sender.
author: Filip Hanik author: Remy Maucherat version: $Revision: 1.41 $, $Date: 2004/06/04 20:22:27 $
getInfo() Return descriptive information about this Cluster implementation and
the corresponding version number, in the format
<description>/<version>.
installContext(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 void installContext(String contextPath, URL war)(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
lifecycleEvent
public void lifecycleEvent(LifecycleEvent lifecycleEvent)(Code)
Sets the configurable protocol stack. This is a setting in server.xml
where you can configure your protocol.
Parameters: protocol - the protocol stack - this method is called bythe server configuration at startup See Also:JavaGroups for details
setUseDirtyFlag
public void setUseDirtyFlag(boolean useDirtyFlag)(Code)
start
public void start() throws LifecycleException(Code)
Prepare for the beginning of active use of the public methods of this
component. This method should be called after configure(),
and before any of the public methods of the component are utilized.
Starts the cluster communication channel, this will connect with the
other nodes in the cluster, and request the current session state to
be transferred to this node.
exception: IllegalStateException - if this component has already beenstarted exception: LifecycleException - if this component detects a fatal errorthat prevents this component from being used
Start an existing web application, attached to the specified context
path in all the other nodes in the cluster.
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() throws LifecycleException(Code)
Gracefully terminate the active use of the public methods of this
component. This method should be the last one called on a given
instance of this component.
This will disconnect the cluster communication channel and stop
the listener thread.
exception: IllegalStateException - if this component has not been started exception: LifecycleException - if this component detects a fatal errorthat needs to be reported
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