org.objectweb.jonas.management.cluster
Class JkCluster

java.lang.Object
  extended byorg.objectweb.jonas.management.cluster.BaseCluster
      extended byorg.objectweb.jonas.management.cluster.JkCluster
All Implemented Interfaces:
BaseClusterMBean, JkClusterMBean

public class JkCluster
extends BaseCluster
implements JkClusterMBean

JkCluster are used for Web level load balancing

Author:
Adriana Danes, Philippe Durieux

Nested Class Summary
 
Nested classes inherited from class org.objectweb.jonas.management.cluster.BaseCluster
BaseCluster.DeployThread
 
Field Summary
protected  java.lang.String type
          The type of Cluster, that is part of the MBean ObjectName
 
Fields inherited from class org.objectweb.jonas.management.cluster.BaseCluster
cf, dm, j2eedomain, jmx, logger, members, name, objectName, state, STATE_DOWN, STATE_FAILED, STATE_INIT, STATE_PARTIALLY_DOWN, STATE_PARTIALLY_FAILED, STATE_PARTIALLY_UP, STATE_UNKNOWN, STATE_UP
 
Constructor Summary
JkCluster(JkClusterFactory cf)
          Web level loadbalancing cluster constructor Lookup for configuration file in JONAS_BASE/conf This is the "workers.properties" file from TOMCAT.
 
Method Summary
 boolean addWorker(java.lang.String serverName, java.lang.String workerName, int workerPort, ServerProxy proxy)
          Add a Worker to the list of the JkCluster It should be known in workers.properties Make link between the member and the ServerProxy.
 ClusterMember createClusterMember(java.lang.String svname, ServerProxy proxy)
          Create a new ClusterMember.
 java.lang.String getType()
           
 
Methods inherited from class org.objectweb.jonas.management.cluster.BaseCluster
addMember, addServer, deployModule, getMembers, getName, getNbMembers, getObjectName, getServer, getServerProxy, getServerProxyList, getState, removeServer, setName, startit, stopit, undeployModule, uploadDeployModule, uploadFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jonas.management.cluster.BaseClusterMBean
addServer, deployModule, getMembers, getName, getNbMembers, getState, removeServer, startit, stopit, undeployModule, uploadDeployModule, uploadFile
 

Field Detail

type

protected java.lang.String type
The type of Cluster, that is part of the MBean ObjectName

Constructor Detail

JkCluster

public JkCluster(JkClusterFactory cf)
          throws javax.management.JMException
Web level loadbalancing cluster constructor Lookup for configuration file in JONAS_BASE/conf This is the "workers.properties" file from TOMCAT.

Parameters:
cf - ClusterFactory
Throws:
javax.management.JMException - could not create MBean instance
Method Detail

createClusterMember

public ClusterMember createClusterMember(java.lang.String svname,
                                         ServerProxy proxy)
Description copied from class: BaseCluster
Create a new ClusterMember. Depends on the underlaying class.

Specified by:
createClusterMember in class BaseCluster
Parameters:
svname -
proxy -

getType

public java.lang.String getType()
Specified by:
getType in class BaseCluster
Returns:
The String type to be put in the ObjectName

addWorker

public boolean addWorker(java.lang.String serverName,
                         java.lang.String workerName,
                         int workerPort,
                         ServerProxy proxy)
Add a Worker to the list of the JkCluster It should be known in workers.properties Make link between the member and the ServerProxy.

Parameters:
serverName - name of the managed server which corresponds to a worker
workerName - the worker name
workerPort - the worker port
proxy - The ServerProxy related object.
Returns:
True if correctly added in the List.