FileDocCategorySizeDatePackage
MBeanData.javaAPI DocJBoss 4.2.13633Fri Jul 13 21:02:14 BST 2007org.jboss.console.plugins.helpers.jmx

MBeanData

public class MBeanData extends Object implements Comparable
An mbean ObjectNamd and MBeanInfo pair
author
Scott.Stark@jboss.org
version
$Revision: 57191 $

Fields Summary
private ObjectName
objectName
private MBeanInfo
metaData
Constructors Summary
public MBeanData(ObjectName objectName, MBeanInfo metaData)
Creates a new instance of MBeanInfo

      this.objectName = objectName;
      this.metaData = metaData;
   
Methods Summary
public intcompareTo(java.lang.Object o)
Compares MBeanData based on the ObjectName domain name and canonical key properties

param
o MBeanData to compare against
return
< 0 if this is less than o, > 0 if this is greater than o, 0 if equal.

      MBeanData md = (MBeanData) o;
      String d1 = objectName.getDomain();
      String d2 = md.objectName.getDomain();
      int compare = d1.compareTo(d2);
      if( compare == 0 )
      {
         String p1 = objectName.getCanonicalKeyPropertyListString();
         String p2 = md.objectName.getCanonicalKeyPropertyListString();
         compare = p1.compareTo(p2);
      }
      return compare;
   
public booleanequals(java.lang.Object o)

      if (o == null || (o instanceof MBeanData) == false)
         return false;
      if (this == o)
         return true;
      return (this.compareTo(o) == 0);
   
public java.lang.StringgetClassName()

return
The MBeanInfo.getClassName() value

      return metaData.getClassName();
   
public javax.management.MBeanInfogetMetaData()
Getter for property metaData.

return
Value of property metaData.

      return metaData;
   
public java.lang.StringgetName()

return
The ObjectName.toString()

      return objectName.toString();
   
public java.lang.StringgetNameProperties()

return
The canonical key properties string

      return objectName.getCanonicalKeyPropertyListString();
   
public javax.management.ObjectNamegetObjectName()
Getter for property objectName.

return
Value of property objectName.

      return objectName;
   
public voidsetMetaData(javax.management.MBeanInfo metaData)
Setter for property metaData.

param
metaData New value of property metaData.

      this.metaData = metaData;
   
public voidsetObjectName(javax.management.ObjectName objectName)
Setter for property objectName.

param
objectName New value of property objectName.

      this.objectName = objectName;