com.caucho.jmx
Class AbstractMBeanServer

java.lang.Object
  extended by com.caucho.jmx.AbstractMBeanServer
All Implemented Interfaces:
javax.management.MBeanServer, javax.management.MBeanServerConnection
Direct Known Subclasses:
EnvironmentMBeanServer, GlobalMBeanServer, LocalMBeanServer

public abstract class AbstractMBeanServer
extends java.lang.Object
implements javax.management.MBeanServer

The main interface for retrieving and managing JMX objects.


Constructor Summary
AbstractMBeanServer(java.lang.String defaultDomain)
          Creats a new MBeanServer implementation.
 
Method Summary
 void addNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
          Adds a listener to a registered MBean
 void addNotificationListener(javax.management.ObjectName name, javax.management.ObjectName listenerName, javax.management.NotificationFilter filter, java.lang.Object handback)
          Adds a listener to a registered MBean
protected  MBeanContext createContext()
          Returns the context implementation.
protected abstract  MBeanContext createContext(java.lang.ClassLoader loader)
          Returns the context implementation, creating if necessary.
 javax.management.ObjectInstance createMBean(java.lang.String className, javax.management.ObjectName name)
          Instantiate and register an MBean.
 javax.management.ObjectInstance createMBean(java.lang.String className, javax.management.ObjectName name, java.lang.Object[] params, java.lang.String[] signature)
          Instantiate and register an MBean.
 javax.management.ObjectInstance createMBean(java.lang.String className, javax.management.ObjectName name, javax.management.ObjectName loaderName)
          Instantiate and register an MBean.
 javax.management.ObjectInstance createMBean(java.lang.String className, javax.management.ObjectName name, javax.management.ObjectName loaderName, java.lang.Object[] params, java.lang.String[] signature)
          Instantiate and register an MBean.
 java.io.ObjectInputStream deserialize(javax.management.ObjectName name, byte[] data)
          Deserializes a byte array in the class loader of the mbean.
 java.io.ObjectInputStream deserialize(java.lang.String className, byte[] data)
          Deserializes a byte array in the class loader of the mbean.
 java.io.ObjectInputStream deserialize(java.lang.String className, javax.management.ObjectName loaderName, byte[] data)
          Deserializes a byte array in the class loader of the mbean.
 void destroy()
          Handles the case where a class loader is dropped.
 java.lang.Object getAttribute(javax.management.ObjectName name, java.lang.String attribute)
          Returns a specific attribute of a named MBean.
 javax.management.AttributeList getAttributes(javax.management.ObjectName name, java.lang.String[] attributes)
          Returns a list of several MBean attributes.
 java.lang.ClassLoader getClassLoader(javax.management.ObjectName loaderName)
          Returns the named ClassLoader.
 java.lang.ClassLoader getClassLoaderFor(javax.management.ObjectName name)
          Returns the ClassLoader that was used for loading the MBean.
 javax.management.loading.ClassLoaderRepository getClassLoaderRepository()
          Returns the ClassLoaderRepository for this MBeanServer
protected abstract  MBeanContext getContext(java.lang.ClassLoader loader)
          Returns the context implementation.
protected  MBeanContext getCurrentContext()
          Returns the context implementation.
protected abstract  MBeanContext getCurrentContext(java.lang.ClassLoader loader)
          Returns the context implementation.
 java.lang.String getDefaultDomain()
          Returns the default domain for naming the MBean
 java.lang.String[] getDomains()
          Returns the domains for all registered MBeans
protected  MBeanContext getGlobalContext()
          Returns the context implementation.
protected  MBeanView getGlobalView()
          Returns the view implementation.
 java.lang.Integer getMBeanCount()
          Returns the number of MBeans registered.
 javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name)
          Returns the analyzed information for an MBean
 javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName name)
          Returns the MBean registered with the given name.
protected  MBeanView getParentView()
          Returns the view implementation.
protected  MBeanView getView()
          Returns the view implementation.
 java.lang.Object instantiate(java.lang.String className)
          Instantiate an MBean object to be registered with the server.
 java.lang.Object instantiate(java.lang.String className, java.lang.Object[] params, java.lang.String[] signature)
          Instantiate an MBean object with the given arguments to be passed to the constructor.
 java.lang.Object instantiate(java.lang.String className, javax.management.ObjectName loaderName)
          Instantiate an MBean object to be registered with the server.
 java.lang.Object instantiate(java.lang.String className, javax.management.ObjectName loaderName, java.lang.Object[] params, java.lang.String[] signature)
          Instantiate an MBean object with the given arguments to be passed to the constructor.
 java.lang.Object invoke(javax.management.ObjectName name, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)
          Invokers an operation on an MBean.
 boolean isInstanceOf(javax.management.ObjectName name, java.lang.String className)
          Returns true if the MBean is an instance of the specified class.
 boolean isRegistered(javax.management.ObjectName name)
          Returns true if the given object is registered with the server.
 java.util.Set<javax.management.ObjectInstance> queryMBeans(javax.management.ObjectName name, javax.management.QueryExp query)
          Returns a set of MBeans matching the query.
 java.util.Set<javax.management.ObjectName> queryNames(javax.management.ObjectName name, javax.management.QueryExp query)
          Returns a set of names for MBeans matching the query.
 javax.management.ObjectInstance registerMBean(java.lang.Object object, javax.management.ObjectName name)
          Registers an MBean with the server.
protected  void removeContext(MBeanContext context, java.lang.ClassLoader loader)
          Removes the context implementation.
 void removeNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener)
          Removes a listener from a registered MBean
 void removeNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
          Removes a listener from a registered MBean
 void removeNotificationListener(javax.management.ObjectName name, javax.management.ObjectName listenerName)
          Removes a listener from a registered MBean
 void removeNotificationListener(javax.management.ObjectName name, javax.management.ObjectName listenerName, javax.management.NotificationFilter filter, java.lang.Object handback)
          Removes a listener from a registered MBean
 void setAttribute(javax.management.ObjectName name, javax.management.Attribute attribute)
          Sets an attribute in the MBean.
 javax.management.AttributeList setAttributes(javax.management.ObjectName name, javax.management.AttributeList attributes)
          Set an attributes in the MBean.
protected abstract  void setCurrentContext(MBeanContext context, java.lang.ClassLoader loader)
          Sets the context implementation.
 java.lang.String toString()
          Returns the string form.
 void unregisterMBean(javax.management.ObjectName name)
          Unregisters an MBean from the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractMBeanServer

public AbstractMBeanServer(java.lang.String defaultDomain)
Creats a new MBeanServer implementation.

Method Detail

createContext

protected MBeanContext createContext()
Returns the context implementation.


getCurrentContext

protected final MBeanContext getCurrentContext()
Returns the context implementation.


getGlobalContext

protected final MBeanContext getGlobalContext()
Returns the context implementation.


createContext

protected abstract MBeanContext createContext(java.lang.ClassLoader loader)
Returns the context implementation, creating if necessary.


getCurrentContext

protected abstract MBeanContext getCurrentContext(java.lang.ClassLoader loader)
Returns the context implementation.


setCurrentContext

protected abstract void setCurrentContext(MBeanContext context,
                                          java.lang.ClassLoader loader)
Sets the context implementation.


getContext

protected abstract MBeanContext getContext(java.lang.ClassLoader loader)
Returns the context implementation.


removeContext

protected void removeContext(MBeanContext context,
                             java.lang.ClassLoader loader)
Removes the context implementation.


getView

protected MBeanView getView()
Returns the view implementation.


getGlobalView

protected MBeanView getGlobalView()
Returns the view implementation.


getParentView

protected MBeanView getParentView()
Returns the view implementation.


instantiate

public java.lang.Object instantiate(java.lang.String className)
                             throws javax.management.ReflectionException,
                                    javax.management.MBeanException
Instantiate an MBean object to be registered with the server.

Specified by:
instantiate in interface javax.management.MBeanServer
Parameters:
className - the className to be instantiated.
Returns:
the instantiated object.
Throws:
javax.management.ReflectionException
javax.management.MBeanException

instantiate

public java.lang.Object instantiate(java.lang.String className,
                                    javax.management.ObjectName loaderName)
                             throws javax.management.ReflectionException,
                                    javax.management.MBeanException,
                                    javax.management.InstanceNotFoundException
Instantiate an MBean object to be registered with the server.

Specified by:
instantiate in interface javax.management.MBeanServer
Parameters:
className - the className to be instantiated.
loaderName - names the classloader to be used
Returns:
the instantiated object.
Throws:
javax.management.ReflectionException
javax.management.MBeanException
javax.management.InstanceNotFoundException

instantiate

public java.lang.Object instantiate(java.lang.String className,
                                    java.lang.Object[] params,
                                    java.lang.String[] signature)
                             throws javax.management.ReflectionException,
                                    javax.management.MBeanException
Instantiate an MBean object with the given arguments to be passed to the constructor.

Specified by:
instantiate in interface javax.management.MBeanServer
Parameters:
className - the className to be instantiated.
params - the parameters for the constructor.
signature - the signature of the constructor
Returns:
the instantiated object.
Throws:
javax.management.ReflectionException
javax.management.MBeanException

instantiate

public java.lang.Object instantiate(java.lang.String className,
                                    javax.management.ObjectName loaderName,
                                    java.lang.Object[] params,
                                    java.lang.String[] signature)
                             throws javax.management.ReflectionException,
                                    javax.management.MBeanException,
                                    javax.management.InstanceNotFoundException
Instantiate an MBean object with the given arguments to be passed to the constructor.

Specified by:
instantiate in interface javax.management.MBeanServer
Parameters:
className - the className to be instantiated.
loaderName - names the classloader to be used
params - the parameters for the constructor.
signature - the signature of the constructor
Returns:
the instantiated object.
Throws:
javax.management.ReflectionException
javax.management.MBeanException
javax.management.InstanceNotFoundException

createMBean

public javax.management.ObjectInstance createMBean(java.lang.String className,
                                                   javax.management.ObjectName name)
                                            throws javax.management.ReflectionException,
                                                   javax.management.InstanceAlreadyExistsException,
                                                   javax.management.MBeanException,
                                                   javax.management.NotCompliantMBeanException
Instantiate and register an MBean.

Specified by:
createMBean in interface javax.management.MBeanServer
Specified by:
createMBean in interface javax.management.MBeanServerConnection
Parameters:
className - the className to be instantiated.
name - the name of the mbean.
Returns:
the instantiated object.
Throws:
javax.management.ReflectionException
javax.management.InstanceAlreadyExistsException
javax.management.MBeanException
javax.management.NotCompliantMBeanException

createMBean

public javax.management.ObjectInstance createMBean(java.lang.String className,
                                                   javax.management.ObjectName name,
                                                   javax.management.ObjectName loaderName)
                                            throws javax.management.ReflectionException,
                                                   javax.management.InstanceAlreadyExistsException,
                                                   javax.management.MBeanException,
                                                   javax.management.NotCompliantMBeanException,
                                                   javax.management.InstanceNotFoundException
Instantiate and register an MBean.

Specified by:
createMBean in interface javax.management.MBeanServer
Specified by:
createMBean in interface javax.management.MBeanServerConnection
Parameters:
className - the className to be instantiated.
name - the name of the mbean.
loaderName - the name of the class loader to user
Returns:
the instantiated object.
Throws:
javax.management.ReflectionException
javax.management.InstanceAlreadyExistsException
javax.management.MBeanException
javax.management.NotCompliantMBeanException
javax.management.InstanceNotFoundException

createMBean

public javax.management.ObjectInstance createMBean(java.lang.String className,
                                                   javax.management.ObjectName name,
                                                   java.lang.Object[] params,
                                                   java.lang.String[] signature)
                                            throws javax.management.ReflectionException,
                                                   javax.management.InstanceAlreadyExistsException,
                                                   javax.management.MBeanException,
                                                   javax.management.NotCompliantMBeanException
Instantiate and register an MBean.

Specified by:
createMBean in interface javax.management.MBeanServer
Specified by:
createMBean in interface javax.management.MBeanServerConnection
Parameters:
className - the className to be instantiated.
name - the name of the mbean.
params - the parameters for the constructor.
signature - the signature of the constructor
Returns:
the instantiated object.
Throws:
javax.management.ReflectionException
javax.management.InstanceAlreadyExistsException
javax.management.MBeanException
javax.management.NotCompliantMBeanException

createMBean

public javax.management.ObjectInstance createMBean(java.lang.String className,
                                                   javax.management.ObjectName name,
                                                   javax.management.ObjectName loaderName,
                                                   java.lang.Object[] params,
                                                   java.lang.String[] signature)
                                            throws javax.management.ReflectionException,
                                                   javax.management.InstanceAlreadyExistsException,
                                                   javax.management.MBeanException,
                                                   javax.management.NotCompliantMBeanException,
                                                   javax.management.InstanceNotFoundException
Instantiate and register an MBean.

Specified by:
createMBean in interface javax.management.MBeanServer
Specified by:
createMBean in interface javax.management.MBeanServerConnection
Parameters:
className - the className to be instantiated.
name - the name of the mbean.
loaderName - the loader name for the mbean.
params - the parameters for the constructor.
signature - the signature of the constructor
Returns:
the instantiated object.
Throws:
javax.management.ReflectionException
javax.management.InstanceAlreadyExistsException
javax.management.MBeanException
javax.management.NotCompliantMBeanException
javax.management.InstanceNotFoundException

registerMBean

public javax.management.ObjectInstance registerMBean(java.lang.Object object,
                                                     javax.management.ObjectName name)
                                              throws javax.management.InstanceAlreadyExistsException,
                                                     javax.management.MBeanRegistrationException,
                                                     javax.management.NotCompliantMBeanException
Registers an MBean with the server.

Specified by:
registerMBean in interface javax.management.MBeanServer
Parameters:
object - the object to be registered as an MBean
name - the name of the mbean.
Returns:
the instantiated object.
Throws:
javax.management.InstanceAlreadyExistsException
javax.management.MBeanRegistrationException
javax.management.NotCompliantMBeanException

unregisterMBean

public void unregisterMBean(javax.management.ObjectName name)
                     throws javax.management.InstanceNotFoundException,
                            javax.management.MBeanRegistrationException
Unregisters an MBean from the server.

Specified by:
unregisterMBean in interface javax.management.MBeanServer
Specified by:
unregisterMBean in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean.
Throws:
javax.management.InstanceNotFoundException
javax.management.MBeanRegistrationException

getObjectInstance

public javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName name)
                                                  throws javax.management.InstanceNotFoundException
Returns the MBean registered with the given name.

Specified by:
getObjectInstance in interface javax.management.MBeanServer
Specified by:
getObjectInstance in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean.
Returns:
the matching mbean object.
Throws:
javax.management.InstanceNotFoundException

queryMBeans

public java.util.Set<javax.management.ObjectInstance> queryMBeans(javax.management.ObjectName name,
                                                                  javax.management.QueryExp query)
Returns a set of MBeans matching the query.

Specified by:
queryMBeans in interface javax.management.MBeanServer
Specified by:
queryMBeans in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean to match.
query - the queryd to match.
Returns:
the set of matching mbean object.

queryNames

public java.util.Set<javax.management.ObjectName> queryNames(javax.management.ObjectName name,
                                                             javax.management.QueryExp query)
Returns a set of names for MBeans matching the query.

Specified by:
queryNames in interface javax.management.MBeanServer
Specified by:
queryNames in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean to match.
query - the query to match.
Returns:
the set of matching mbean names.

isRegistered

public boolean isRegistered(javax.management.ObjectName name)
Returns true if the given object is registered with the server.

Specified by:
isRegistered in interface javax.management.MBeanServer
Specified by:
isRegistered in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean to test.
Returns:
true if the object is registered.

getMBeanCount

public java.lang.Integer getMBeanCount()
Returns the number of MBeans registered.

Specified by:
getMBeanCount in interface javax.management.MBeanServer
Specified by:
getMBeanCount in interface javax.management.MBeanServerConnection
Returns:
the number of registered mbeans.

getAttribute

public java.lang.Object getAttribute(javax.management.ObjectName name,
                                     java.lang.String attribute)
                              throws javax.management.MBeanException,
                                     javax.management.AttributeNotFoundException,
                                     javax.management.InstanceNotFoundException,
                                     javax.management.ReflectionException
Returns a specific attribute of a named MBean.

Specified by:
getAttribute in interface javax.management.MBeanServer
Specified by:
getAttribute in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean to test
attribute - the name of the attribute to retrieve
Returns:
the attribute value
Throws:
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InstanceNotFoundException
javax.management.ReflectionException

getAttributes

public javax.management.AttributeList getAttributes(javax.management.ObjectName name,
                                                    java.lang.String[] attributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException
Returns a list of several MBean attributes.

Specified by:
getAttributes in interface javax.management.MBeanServer
Specified by:
getAttributes in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean
attributes - the name of the attributes to retrieve
Returns:
the attribute value
Throws:
javax.management.InstanceNotFoundException
javax.management.ReflectionException

setAttribute

public void setAttribute(javax.management.ObjectName name,
                         javax.management.Attribute attribute)
                  throws javax.management.InstanceNotFoundException,
                         javax.management.AttributeNotFoundException,
                         javax.management.InvalidAttributeValueException,
                         javax.management.MBeanException,
                         javax.management.ReflectionException
Sets an attribute in the MBean.

Specified by:
setAttribute in interface javax.management.MBeanServer
Specified by:
setAttribute in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean
attribute - the name/value of the attribute to set.
Throws:
javax.management.InstanceNotFoundException
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException

setAttributes

public javax.management.AttributeList setAttributes(javax.management.ObjectName name,
                                                    javax.management.AttributeList attributes)
                                             throws javax.management.InstanceNotFoundException,
                                                    javax.management.ReflectionException
Set an attributes in the MBean.

Specified by:
setAttributes in interface javax.management.MBeanServer
Specified by:
setAttributes in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean
attributes - the name/value list of the attribute to set.
Throws:
javax.management.InstanceNotFoundException
javax.management.ReflectionException

invoke

public java.lang.Object invoke(javax.management.ObjectName name,
                               java.lang.String operationName,
                               java.lang.Object[] params,
                               java.lang.String[] signature)
                        throws javax.management.InstanceNotFoundException,
                               javax.management.MBeanException,
                               javax.management.ReflectionException
Invokers an operation on an MBean.

Specified by:
invoke in interface javax.management.MBeanServer
Specified by:
invoke in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean
operationName - the name of the method to invoke
params - the parameters for the invocation
signature - the signature of the operation
Throws:
javax.management.InstanceNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

getDefaultDomain

public java.lang.String getDefaultDomain()
Returns the default domain for naming the MBean

Specified by:
getDefaultDomain in interface javax.management.MBeanServer
Specified by:
getDefaultDomain in interface javax.management.MBeanServerConnection

addNotificationListener

public void addNotificationListener(javax.management.ObjectName name,
                                    javax.management.NotificationListener listener,
                                    javax.management.NotificationFilter filter,
                                    java.lang.Object handback)
                             throws javax.management.InstanceNotFoundException
Adds a listener to a registered MBean

Specified by:
addNotificationListener in interface javax.management.MBeanServer
Specified by:
addNotificationListener in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean
listener - the listener object
filter - filters events the listener is interested in
handback - context to be returned to the listener
Throws:
javax.management.InstanceNotFoundException

addNotificationListener

public void addNotificationListener(javax.management.ObjectName name,
                                    javax.management.ObjectName listenerName,
                                    javax.management.NotificationFilter filter,
                                    java.lang.Object handback)
                             throws javax.management.InstanceNotFoundException
Adds a listener to a registered MBean

Specified by:
addNotificationListener in interface javax.management.MBeanServer
Specified by:
addNotificationListener in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean
listenerName - the name of the listener
filter - filters events the listener is interested in
handback - context to be returned to the listener
Throws:
javax.management.InstanceNotFoundException

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName name,
                                       javax.management.NotificationListener listener)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException
Removes a listener from a registered MBean

Specified by:
removeNotificationListener in interface javax.management.MBeanServer
Specified by:
removeNotificationListener in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean
listener - the listener object
Throws:
javax.management.InstanceNotFoundException
javax.management.ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName name,
                                       javax.management.ObjectName listenerName)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException
Removes a listener from a registered MBean

Specified by:
removeNotificationListener in interface javax.management.MBeanServer
Specified by:
removeNotificationListener in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean
listenerName - the name of the listener
Throws:
javax.management.InstanceNotFoundException
javax.management.ListenerNotFoundException

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName name,
                                       javax.management.ObjectName listenerName,
                                       javax.management.NotificationFilter filter,
                                       java.lang.Object handback)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException
Removes a listener from a registered MBean

Specified by:
removeNotificationListener in interface javax.management.MBeanServer
Specified by:
removeNotificationListener in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean
listenerName - the name of the listener
filter - the notification filter
handback - context to the listener
Throws:
javax.management.InstanceNotFoundException
javax.management.ListenerNotFoundException
Since:
JMX 1.2

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName name,
                                       javax.management.NotificationListener listener,
                                       javax.management.NotificationFilter filter,
                                       java.lang.Object handback)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException
Removes a listener from a registered MBean

Specified by:
removeNotificationListener in interface javax.management.MBeanServer
Specified by:
removeNotificationListener in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean
listenerName - the name of the listener
filter - the notification filter
handback - context to the listener
Throws:
javax.management.InstanceNotFoundException
javax.management.ListenerNotFoundException
Since:
JMX 1.2

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName name)
                                        throws javax.management.InstanceNotFoundException,
                                               javax.management.IntrospectionException,
                                               javax.management.ReflectionException
Returns the analyzed information for an MBean

Specified by:
getMBeanInfo in interface javax.management.MBeanServer
Specified by:
getMBeanInfo in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean
Returns:
the introspected information
Throws:
javax.management.InstanceNotFoundException
javax.management.IntrospectionException
javax.management.ReflectionException

isInstanceOf

public boolean isInstanceOf(javax.management.ObjectName name,
                            java.lang.String className)
                     throws javax.management.InstanceNotFoundException
Returns true if the MBean is an instance of the specified class.

Specified by:
isInstanceOf in interface javax.management.MBeanServer
Specified by:
isInstanceOf in interface javax.management.MBeanServerConnection
Parameters:
name - the name of the mbean
className - the className to test.
Returns:
true if the bean is an instance
Throws:
javax.management.InstanceNotFoundException

getClassLoaderFor

public java.lang.ClassLoader getClassLoaderFor(javax.management.ObjectName name)
                                        throws javax.management.InstanceNotFoundException
Returns the ClassLoader that was used for loading the MBean.

Specified by:
getClassLoaderFor in interface javax.management.MBeanServer
Parameters:
mbeanName - the name of the mbean
Returns:
the class loader
Throws:
javax.management.InstanceNotFoundException
Since:
JMX 1.2

getClassLoader

public java.lang.ClassLoader getClassLoader(javax.management.ObjectName loaderName)
                                     throws javax.management.InstanceNotFoundException
Returns the named ClassLoader.

Specified by:
getClassLoader in interface javax.management.MBeanServer
Parameters:
loaderName - the name of the class loader
Returns:
the class loader
Throws:
javax.management.InstanceNotFoundException
Since:
JMX 1.2

getClassLoaderRepository

public javax.management.loading.ClassLoaderRepository getClassLoaderRepository()
Returns the ClassLoaderRepository for this MBeanServer

Specified by:
getClassLoaderRepository in interface javax.management.MBeanServer
Since:
JMX 1.2

deserialize

public java.io.ObjectInputStream deserialize(javax.management.ObjectName name,
                                             byte[] data)
                                      throws javax.management.InstanceNotFoundException,
                                             javax.management.OperationsException
Deserializes a byte array in the class loader of the mbean.

Specified by:
deserialize in interface javax.management.MBeanServer
Parameters:
name - the name of the mbean
data - the data to deserialize
Returns:
the deserialization stream
Throws:
javax.management.InstanceNotFoundException
javax.management.OperationsException

deserialize

public java.io.ObjectInputStream deserialize(java.lang.String className,
                                             byte[] data)
                                      throws javax.management.OperationsException,
                                             javax.management.ReflectionException
Deserializes a byte array in the class loader of the mbean.

Specified by:
deserialize in interface javax.management.MBeanServer
Parameters:
className - the className matches to the loader
data - the data to deserialize
Returns:
the deserialization stream
Throws:
javax.management.OperationsException
javax.management.ReflectionException

deserialize

public java.io.ObjectInputStream deserialize(java.lang.String className,
                                             javax.management.ObjectName loaderName,
                                             byte[] data)
                                      throws javax.management.OperationsException,
                                             javax.management.ReflectionException,
                                             javax.management.InstanceNotFoundException
Deserializes a byte array in the class loader of the mbean.

Specified by:
deserialize in interface javax.management.MBeanServer
Parameters:
className - the className matches to the loader
loaderName - the loader to use for deserialization
data - the data to deserialize
Returns:
the deserialization stream
Throws:
javax.management.OperationsException
javax.management.ReflectionException
javax.management.InstanceNotFoundException

getDomains

public java.lang.String[] getDomains()
Returns the domains for all registered MBeans

Specified by:
getDomains in interface javax.management.MBeanServer
Specified by:
getDomains in interface javax.management.MBeanServerConnection
Since:
JMX 1.2

destroy

public void destroy()
Handles the case where a class loader is dropped.


toString

public java.lang.String toString()
Returns the string form.

Overrides:
toString in class java.lang.Object