org.ow2.jonas.lib.management.domain.cluster.cmi
Class CmiCluster

java.lang.Object
  extended by org.ow2.jonas.lib.management.domain.cluster.BaseCluster
      extended by org.ow2.jonas.lib.management.domain.cluster.cmi.CmiCluster
All Implemented Interfaces:
BaseClusterMBean, CmiClusterMBean

public class CmiCluster
extends BaseCluster
implements CmiClusterMBean

Implements Cmi Cluster MBean

Author:
Philippe Durieux

Nested Class Summary
 
Nested classes/interfaces inherited from class org.ow2.jonas.lib.management.domain.cluster.BaseCluster
BaseCluster.DeployThread
 
Field Summary
protected  int delayToRefresh
          This configuration information is provided by a CMI MBean.
protected  String mcastAddr
          mcast addr
protected  int mcastPort
          mcast port
protected  String protocol
          protocol used
protected  String type
          The type of Cluster, that is part of the MBean ObjectName
 
Fields inherited from class org.ow2.jonas.lib.management.domain.cluster.BaseCluster
cf, dm, domainName, 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
CmiCluster(CmiClusterFactory cf)
          CMI cluster constructor
 
Method Summary
 boolean addCmiServer(String serverName, ServerProxy proxy)
          Add a CMI Server to the list of the Cluster Make link between the member and the ServerProxy.
 ClusterMember createClusterMember(String svname, ServerProxy proxy)
          Create a new ClusterMember.
 int getDelayToRefresh()
          Get the value of 'delayToRefresh' attribute.
 String getMcastAddr()
           
 int getMcastPort()
           
 void getMonitoringInfo()
          Update dynamic info for this cluster.
 String getProtocol()
           
 String getType()
           
 void setDelayToRefresh(int delayToRefresh)
          Set new value for the 'delayToRefresh' attribute and propagate this value to one CMI MBean corresponding to a cluster member.
 void setMcastAddr(String addr)
          Set the multicast addr
 void setMcastPort(int port)
          Set the multicast port
 void setProtocol(String protocol)
          Set the protocol.
 
Methods inherited from class org.ow2.jonas.lib.management.domain.cluster.BaseCluster
addMember, addServer, addServer, deployModule, getMembers, getName, getNbMembers, getObjectName, getRunningServerProxy, getServerProxy, getServerProxyList, getState, isMember, 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.ow2.jonas.lib.management.domain.cluster.BaseClusterMBean
addServer, addServer, deployModule, getMembers, getName, getNbMembers, getState, removeServer, startit, stopit, undeployModule, uploadDeployModule, uploadFile
 

Field Detail

type

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


mcastPort

protected int mcastPort
mcast port


mcastAddr

protected String mcastAddr
mcast addr


protocol

protected String protocol
protocol used


delayToRefresh

protected int delayToRefresh
This configuration information is provided by a CMI MBean. Every member has a CMI MBean registered in its MBeanServer

Constructor Detail

CmiCluster

public CmiCluster(CmiClusterFactory cf)
           throws JMException
CMI cluster constructor

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

createClusterMember

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

Specified by:
createClusterMember in class BaseCluster

getMcastPort

public int getMcastPort()
Specified by:
getMcastPort in interface CmiClusterMBean
Returns:
the mcast port

setMcastPort

public void setMcastPort(int port)
Set the multicast port


getMcastAddr

public String getMcastAddr()
Specified by:
getMcastAddr in interface CmiClusterMBean
Returns:
the mcast addr

setMcastAddr

public void setMcastAddr(String addr)
Set the multicast addr


getProtocol

public String getProtocol()
Specified by:
getProtocol in interface CmiClusterMBean
Returns:
the protocol

setProtocol

public void setProtocol(String protocol)
Set the protocol.


getType

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

addCmiServer

public boolean addCmiServer(String serverName,
                            ServerProxy proxy)
Add a CMI Server to the list of the Cluster Make link between the member and the ServerProxy.

Parameters:
serverName - name of the managed server which corresponds to a Tomcat session replication cluster member
proxy - The ServerProxy related object.
Returns:
True if correctly added in the List.

getMonitoringInfo

public void getMonitoringInfo()
Update dynamic info for this cluster. Currently only delayToRefresh can change during runtime.


getDelayToRefresh

public int getDelayToRefresh()
Get the value of 'delayToRefresh' attribute.

Specified by:
getDelayToRefresh in interface CmiClusterMBean
Returns:
delayToRefresh MBean attribute's value

setDelayToRefresh

public void setDelayToRefresh(int delayToRefresh)
Set new value for the 'delayToRefresh' attribute and propagate this value to one CMI MBean corresponding to a cluster member.

Specified by:
setDelayToRefresh in interface CmiClusterMBean
Parameters:
delayToRefresh - new value for the 'delayToRefresh' attribute


Copyright © 2010 OW2 Consortium. All Rights Reserved.