An object of this class implements the MBeanServer interface and, for each of its methods forwards the request to a wrapped {@link MBeanServerConnection} object. Some methods of the {@link MBeanServer} interface do not haveany equivalent in {@link MBeanServerConnection}. In that case, an {@link UnsupportedOperationException} will be thrown.
A typical use of this class is to apply a QueryExp object locally, on an MBean that resides in a remote MBeanServer. Since an MBeanServerConnection is not an MBeanServer, it cannot be passed to the setMBeanServer()
method of the {@link QueryExp}object. However, this object can.
This is an abstract class, and although only {@link #getMBeanServerConnection()} is declared abstract, implementingthis single method will usually not be sufficient in order to substitute an instance of this class to an MBeanServer in the general case: for instance, the methods like {@link #getClassLoader}, {@link #getClassLoaderFor} etc... which are not part of the {@link MBeanServerConnection} interface willthrow an {@link UnsupportedOperationException} in theirdefault implementation. Therefore, it would not be appropriate to pass an instance of this class to an object that expect these methods to be implemented, unless those methods have been appropriately implemented in a subclass.
@since Java DMK 5.1
|
|