org.progeeks.jmx
Class MBeanMetaKit

java.lang.Object
  extended by org.progeeks.jmx.MBeanMetaKit
All Implemented Interfaces:
MetaKit

public class MBeanMetaKit
extends java.lang.Object
implements MetaKit

MetaKit implementation providing access to the implementation features of the MBean implementation layer. For the MBean adapter layer a meta-kit represents a connection to a single MBean server. Different MBean servers will require different connections and thus different meta-kit instances.

Version:
$Revision: 1.4 $
Author:
Paul Speed

Constructor Summary
protected MBeanMetaKit(javax.management.MBeanServerConnection mbeanServer)
          Limited accessibility to the constructor to force use of the factory methods.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Object getInternalObject(MetaObject object)
          Returns the internal object representation for the specified meta-object if one exists.
 javax.management.MBeanServerConnection getMBeanServer()
          Returns the MBean server associated with this meta-kit.
 MetaClass getMetaClassForObject(java.lang.Object object)
          Returns the appropriate meta-class for the specified object.
 MetaClass getMetaClassForObject(java.lang.Object object, MetaClassRegistry classRegistry)
          Returns the appropriate meta-class for the specified object.
static MBeanMetaKit getMetaKit(javax.management.MBeanServerConnection mbeanServer)
           
 MetaObjectFactory getMetaObjectFactory()
          Returns a factory that can be used to create new MetaObject based values using this kit's underlying implementation.
 int hashCode()
           
 MetaObject wrapObject(java.lang.Object object, MetaClass mClass)
          Wraps the specified object in a meta-object adapter specific to this kit's implementation layer.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBeanMetaKit

protected MBeanMetaKit(javax.management.MBeanServerConnection mbeanServer)
Limited accessibility to the constructor to force use of the factory methods.

Method Detail

getMetaKit

public static MBeanMetaKit getMetaKit(javax.management.MBeanServerConnection mbeanServer)

getMBeanServer

public javax.management.MBeanServerConnection getMBeanServer()
Returns the MBean server associated with this meta-kit.


getInternalObject

public java.lang.Object getInternalObject(MetaObject object)
Returns the internal object representation for the specified meta-object if one exists. For the MBean adapter layer, all meta-objects are considered wrappers to their ObjectName references.

Specified by:
getInternalObject in interface MetaKit

getMetaClassForObject

public MetaClass getMetaClassForObject(java.lang.Object object,
                                       MetaClassRegistry classRegistry)
Returns the appropriate meta-class for the specified object. If an appropriate meta-class has not been registered then this method returns null. For the MBean layer, the object should be an ObjectName reference.

Specified by:
getMetaClassForObject in interface MetaKit

getMetaClassForObject

public MetaClass getMetaClassForObject(java.lang.Object object)
Returns the appropriate meta-class for the specified object. If an appropriate meta-class has not been registered then this method returns null.

Specified by:
getMetaClassForObject in interface MetaKit

wrapObject

public MetaObject wrapObject(java.lang.Object object,
                             MetaClass mClass)
Wraps the specified object in a meta-object adapter specific to this kit's implementation layer. Returns null if the object cannot be wrapped. Throws UnsupportedOperationException if this kit doesn't support wrapping.

Specified by:
wrapObject in interface MetaKit

getMetaObjectFactory

public MetaObjectFactory getMetaObjectFactory()
Returns a factory that can be used to create new MetaObject based values using this kit's underlying implementation.

Specified by:
getMetaObjectFactory in interface MetaKit

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2002-2003 Paul Speed. All Rights Reserved.