org.ow2.jonas.lib.management.domain.cluster
Class ClusterMember

java.lang.Object
  extended by org.ow2.jonas.lib.management.domain.cluster.ClusterMember
Direct Known Subclasses:
CmiClusterMember, EjbHaClusterMember, JkClusterMember, LogicalClusterMember, TomcatClusterMember

public abstract class ClusterMember
extends Object

A ClusterMember object refers to the ServerProxy corresponding to the managed server which is being member of a given cluster. There may be several ClusterMember instances for the same ServerProxy object.

Author:
Philippe Durieux

Field Summary
protected static org.objectweb.util.monolog.api.Logger logger
          logger for traces
protected  MBeanServer mbeanServer
          MBeanServer where the MBean is registered.
protected  String name
          Name of this Member.
protected  ObjectName objectName
          MBean ObjectName
protected  ServerProxy proxy
          The ServerProxy representing the managed server.
 
Constructor Summary
ClusterMember(String name, ServerProxy proxy)
          Constructor in case of Remote Server
 
Method Summary
 MBeanServer getMbeanServer()
           
 String getName()
           
 ObjectName getObjectName()
          Get the Mbean ObjectName (for jonasAdmin)
 ServerProxy getProxy()
           
 String getServerName()
          The JOnAS server's name which is represented by the proxy, null if the memeber is not connected to a proxy.
 String getServerProxy()
           
 String getState()
           
 void setMbeanServer(MBeanServer mbeanServer)
          Set the MBeanServer reference
 void setObjectName(ObjectName on)
          Set the ObjectName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name
Name of this Member. Depend on the derived class.


objectName

protected ObjectName objectName
MBean ObjectName


proxy

protected ServerProxy proxy
The ServerProxy representing the managed server.


mbeanServer

protected MBeanServer mbeanServer
MBeanServer where the MBean is registered.


logger

protected static org.objectweb.util.monolog.api.Logger logger
logger for traces

Constructor Detail

ClusterMember

public ClusterMember(String name,
                     ServerProxy proxy)
Constructor in case of Remote Server

Parameters:
name - serverName
proxy - The ServerProxy representing the managed server.
Method Detail

getMbeanServer

public MBeanServer getMbeanServer()
Returns:
the MBeanServer reference

setMbeanServer

public void setMbeanServer(MBeanServer mbeanServer)
Set the MBeanServer reference

Parameters:
mbeanServer - MBeanServer reference

getState

public String getState()
Returns:
the member state if it is connected to a ServerProxy as a String
Throws:
JMException - could not get ServerProxy state because of a JMX exception

getName

public String getName()
Returns:
name of this member

getObjectName

public ObjectName getObjectName()
Get the Mbean ObjectName (for jonasAdmin)

Returns:
ObjectName of this member

setObjectName

public void setObjectName(ObjectName on)
Set the ObjectName. Should be called when the MBean is registered.


getServerProxy

public String getServerProxy()
Returns:
The ServerProxy OBJECT_NAME referenced by this cluster member

getProxy

public ServerProxy getProxy()
Returns:
The proxy pointed by this Member

getServerName

public String getServerName()
                     throws JMException
The JOnAS server's name which is represented by the proxy, null if the memeber is not connected to a proxy.

Returns:
the JOnAS server's name which is represented by the proxy
Throws:
JMException - could not get serverName from the ServerProxy because of a JMX exception


Copyright © 2010 OW2 Consortium. All Rights Reserved.