Please note that this documentation is not final and is subject to change.

Java™ Platform
Standard Ed. 7

DRAFT ea-b34

javax.management
Interface DynamicWrapperMBean

All Superinterfaces:
DynamicMBean
All Known Implementing Classes:
RequiredModelMBean, StandardEmitterMBean, StandardMBean

public interface DynamicWrapperMBean
extends DynamicMBean

An MBean can implement this interface to affect how the MBeanServer's getClassLoaderFor and isInstanceOf methods behave. If these methods should refer to a wrapped object rather than the MBean object itself, then the getWrappedObject() method should return that wrapped object.

See Also:
MBeanServer.getClassLoaderFor(javax.management.ObjectName), MBeanServer.isInstanceOf(javax.management.ObjectName, java.lang.String)

Method Summary
 ClassLoader getWrappedClassLoader()
          The ClassLoader for this MBean, which can be used to retrieve resources associated with the MBean for example.
 Object getWrappedObject()
          The resource corresponding to this MBean.
 
Methods inherited from interface javax.management.DynamicMBean
getAttribute, getAttributes, getMBeanInfo, invoke, setAttribute, setAttributes
 

Method Detail

getWrappedObject

Object getWrappedObject()

The resource corresponding to this MBean. This is the object whose class name should be reflected by the MBean's getMBeanInfo().getClassName() for example. For a "plain" DynamicMBean it will be "this". For an MBean that wraps another object, in the manner of StandardMBean, it will be the wrapped object.

Returns:
The resource corresponding to this MBean.

getWrappedClassLoader

ClassLoader getWrappedClassLoader()

The ClassLoader for this MBean, which can be used to retrieve resources associated with the MBean for example. Usually, it will be getWrappedObject().getClass().getClassLoader().

Returns:
The ClassLoader for this MBean.

Java™ Platform
Standard Ed. 7

DRAFT ea-b34

Submit a bug or feature

Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.