org.ow2.jonas.lib.management.domain.cluster.tomcat
Class TomcatCluster

java.lang.Object
  extended by org.ow2.jonas.lib.management.domain.cluster.BaseCluster
      extended by org.ow2.jonas.lib.management.domain.cluster.tomcat.TomcatCluster
All Implemented Interfaces:
BaseClusterMBean, TomcatClusterMBean

public class TomcatCluster
extends BaseCluster
implements TomcatClusterMBean

Implements Tomcat Cluster MBean

Author:
Adriana Danes, Philippe Durieux

Nested Class Summary
 
Nested classes/interfaces inherited from class org.ow2.jonas.lib.management.domain.cluster.BaseCluster
BaseCluster.DeployThread
 
Field Summary
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
TomcatCluster(TomcatClusterFactory cf)
          Tomcat cluster constructor
 
Method Summary
 boolean addTomcatServer(String serverName, ServerProxy proxy)
          Add a Tomcat Server to the list of the TomcatCluster.
 ClusterMember createClusterMember(String svname, ServerProxy proxy)
          Should never be called, as by definition, we can't create a 'physical' cluster member via an administration program or a tool.
 String getHost()
           
 String getMcastAddr()
           
 long getMcastDropTime()
           
 long getMcastFrequency()
           
 int getMcastPort()
           
 int getMcastSocketTimeout()
           
 String getType()
           
 void setHost(String host)
           
 void setMcastAddr(String mcastAddr)
           
 void setMcastDropTime(long mcastDropTime)
           
 void setMcastFrequency(long mcastFrequency)
           
 void setMcastPort(int mcastPort)
           
 void setMcastSocketTimeout(int mcastSocketTimeout)
           
 
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

Constructor Detail

TomcatCluster

public TomcatCluster(TomcatClusterFactory cf)
              throws JMException
Tomcat cluster constructor

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

createClusterMember

public ClusterMember createClusterMember(String svname,
                                         ServerProxy proxy)
Should never be called, as by definition, we can't create a 'physical' cluster member via an administration program or a tool. (only automatic creation is possible via addTomcatServer method)

Specified by:
createClusterMember in class BaseCluster

getType

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

addTomcatServer

public boolean addTomcatServer(String serverName,
                               ServerProxy proxy)
Add a Tomcat Server to the list of the TomcatCluster. Make link between the member and the ServerProxy.

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

getMcastAddr

public String getMcastAddr()
Specified by:
getMcastAddr in interface TomcatClusterMBean

getMcastDropTime

public long getMcastDropTime()
Specified by:
getMcastDropTime in interface TomcatClusterMBean

getMcastFrequency

public long getMcastFrequency()
Specified by:
getMcastFrequency in interface TomcatClusterMBean

getMcastPort

public int getMcastPort()
Specified by:
getMcastPort in interface TomcatClusterMBean

getMcastSocketTimeout

public int getMcastSocketTimeout()
Specified by:
getMcastSocketTimeout in interface TomcatClusterMBean

setMcastAddr

public void setMcastAddr(String mcastAddr)

setMcastDropTime

public void setMcastDropTime(long mcastDropTime)

setMcastFrequency

public void setMcastFrequency(long mcastFrequency)

setMcastPort

public void setMcastPort(int mcastPort)

setMcastSocketTimeout

public void setMcastSocketTimeout(int mcastSocketTimeout)

getHost

public String getHost()

setHost

public void setHost(String host)


Copyright © 2010 OW2 Consortium. All Rights Reserved.