javax.management
Interface MBeanServer

All Superinterfaces:
MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
All Known Subinterfaces:
MBeanServerForwarder sample code for javax.management.remote.MBeanServerForwarder definition code for javax.management.remote.MBeanServerForwarder

public interface MBeanServer
extends MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection

This is the interface for MBean manipulation on the agent side. It contains the methods necessary for the creation, registration, and deletion of MBeans as well as the access methods for registered MBeans. This is the core component of the JMX infrastructure.

User code does not usually implement this interface. Instead, an object that implements this interface is obtained with one of the methods in the MBeanServerFactory sample code for javax.management.MBeanServerFactory definition code for javax.management.MBeanServerFactory class.

Every MBean which is added to the MBean server becomes manageable: its attributes and operations become remotely accessible through the connectors/adaptors connected to that MBean server. A Java object cannot be registered in the MBean server unless it is a JMX compliant MBean.

When an MBean is registered or unregistered in the MBean server a MBeanServerNotification sample code for javax.management.MBeanServerNotification definition code for javax.management.MBeanServerNotification Notification is emitted. To register an object as listener to MBeanServerNotifications you should call the MBean server method addNotificationListener sample code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) with ObjectName the ObjectName of the MBeanServerDelegate sample code for javax.management.MBeanServerDelegate definition code for javax.management.MBeanServerDelegate . This ObjectName is:
JMImplementation:type=MBeanServerDelegate.

An object obtained from the createMBeanServer sample code for javax.management.MBeanServerFactory.createMBeanServer(java.lang.String) definition code for javax.management.MBeanServerFactory.createMBeanServer(java.lang.String) or newMBeanServer sample code for javax.management.MBeanServerFactory.newMBeanServer(java.lang.String) definition code for javax.management.MBeanServerFactory.newMBeanServer(java.lang.String) methods of the MBeanServerFactory sample code for javax.management.MBeanServerFactory definition code for javax.management.MBeanServerFactory class applies security checks to its methods, as follows.

First, if there is no security manager (System.getSecurityManager() sample code for java.lang.System.getSecurityManager() definition code for java.lang.System.getSecurityManager() is null), then no checks are made.

Assuming there is a security manager, the checks are made as detailed below. In what follows, className is the string returned by MBeanInfo.getClassName() sample code for javax.management.MBeanInfo.getClassName() definition code for javax.management.MBeanInfo.getClassName() for the target MBean.

If a security check fails, the method throws SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException .

For methods that can throw InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException , this exception is thrown for a non-existent MBean, regardless of permissions. This is because a non-existent MBean has no className.

Since:
1.5

Method Summary
 void addNotificationListener sample code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener, NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter, Object sample code for java.lang.Object definition code for java.lang.Object  handback)
          Adds a listener to a registered MBean.
 void addNotificationListener sample code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  listener, NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter, Object sample code for java.lang.Object definition code for java.lang.Object  handback)
          Adds a listener to a registered MBean.
 ObjectInstance sample code for javax.management.ObjectInstance definition code for javax.management.ObjectInstance createMBean sample code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName) definition code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName) (String sample code for java.lang.String definition code for java.lang.String  className, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
          Instantiates and registers an MBean in the MBean server.
 ObjectInstance sample code for javax.management.ObjectInstance definition code for javax.management.ObjectInstance createMBean sample code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) (String sample code for java.lang.String definition code for java.lang.String  className, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, Object sample code for java.lang.Object definition code for java.lang.Object [] params, String sample code for java.lang.String definition code for java.lang.String [] signature)
          Instantiates and registers an MBean in the MBean server.
 ObjectInstance sample code for javax.management.ObjectInstance definition code for javax.management.ObjectInstance createMBean sample code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName) definition code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName) (String sample code for java.lang.String definition code for java.lang.String  className, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  loaderName)
          Instantiates and registers an MBean in the MBean server.
 ObjectInstance sample code for javax.management.ObjectInstance definition code for javax.management.ObjectInstance createMBean sample code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) (String sample code for java.lang.String definition code for java.lang.String  className, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  loaderName, Object sample code for java.lang.Object definition code for java.lang.Object [] params, String sample code for java.lang.String definition code for java.lang.String [] signature)
          Instantiates and registers an MBean in the MBean server.
 ObjectInputStream sample code for java.io.ObjectInputStream definition code for java.io.ObjectInputStream deserialize sample code for javax.management.MBeanServer.deserialize(javax.management.ObjectName, byte[]) definition code for javax.management.MBeanServer.deserialize(javax.management.ObjectName, byte[]) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, byte[] data)
          Deprecated. Use getClassLoaderFor sample code for javax.management.MBeanServer.getClassLoaderFor(javax.management.ObjectName) definition code for javax.management.MBeanServer.getClassLoaderFor(javax.management.ObjectName) to obtain the appropriate class loader for deserialization.
 ObjectInputStream sample code for java.io.ObjectInputStream definition code for java.io.ObjectInputStream deserialize sample code for javax.management.MBeanServer.deserialize(java.lang.String, byte[]) definition code for javax.management.MBeanServer.deserialize(java.lang.String, byte[]) (String sample code for java.lang.String definition code for java.lang.String  className, byte[] data)
          Deprecated. Use getClassLoaderRepository() sample code for javax.management.MBeanServer.getClassLoaderRepository() definition code for javax.management.MBeanServer.getClassLoaderRepository() to obtain the class loader repository and use it to deserialize.
 ObjectInputStream sample code for java.io.ObjectInputStream definition code for java.io.ObjectInputStream deserialize sample code for javax.management.MBeanServer.deserialize(java.lang.String, javax.management.ObjectName, byte[]) definition code for javax.management.MBeanServer.deserialize(java.lang.String, javax.management.ObjectName, byte[]) (String sample code for java.lang.String definition code for java.lang.String  className, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  loaderName, byte[] data)
          Deprecated. Use getClassLoader sample code for javax.management.MBeanServer.getClassLoader(javax.management.ObjectName) definition code for javax.management.MBeanServer.getClassLoader(javax.management.ObjectName) to obtain the class loader for deserialization.
 Object sample code for java.lang.Object definition code for java.lang.Object getAttribute sample code for javax.management.MBeanServer.getAttribute(javax.management.ObjectName, java.lang.String) definition code for javax.management.MBeanServer.getAttribute(javax.management.ObjectName, java.lang.String) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, String sample code for java.lang.String definition code for java.lang.String  attribute)
          Gets the value of a specific attribute of a named MBean.
 AttributeList sample code for javax.management.AttributeList definition code for javax.management.AttributeList getAttributes sample code for javax.management.MBeanServer.getAttributes(javax.management.ObjectName, java.lang.String[]) definition code for javax.management.MBeanServer.getAttributes(javax.management.ObjectName, java.lang.String[]) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, String sample code for java.lang.String definition code for java.lang.String [] attributes)
          Gets the values of several attributes of a named MBean.
 ClassLoader sample code for java.lang.ClassLoader definition code for java.lang.ClassLoader getClassLoader sample code for javax.management.MBeanServer.getClassLoader(javax.management.ObjectName) definition code for javax.management.MBeanServer.getClassLoader(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  loaderName)
          Return the named ClassLoader sample code for java.lang.ClassLoader definition code for java.lang.ClassLoader .
 ClassLoader sample code for java.lang.ClassLoader definition code for java.lang.ClassLoader getClassLoaderFor sample code for javax.management.MBeanServer.getClassLoaderFor(javax.management.ObjectName) definition code for javax.management.MBeanServer.getClassLoaderFor(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  mbeanName)
          Return the ClassLoader sample code for java.lang.ClassLoader definition code for java.lang.ClassLoader that was used for loading the class of the named MBean.
 ClassLoaderRepository sample code for javax.management.loading.ClassLoaderRepository definition code for javax.management.loading.ClassLoaderRepository getClassLoaderRepository sample code for javax.management.MBeanServer.getClassLoaderRepository() definition code for javax.management.MBeanServer.getClassLoaderRepository() ()
          Return the ClassLoaderRepository for this MBeanServer.
 String sample code for java.lang.String definition code for java.lang.String getDefaultDomain sample code for javax.management.MBeanServer.getDefaultDomain() definition code for javax.management.MBeanServer.getDefaultDomain() ()
          Returns the default domain used for naming the MBean.
 String sample code for java.lang.String definition code for java.lang.String [] getDomains sample code for javax.management.MBeanServer.getDomains() definition code for javax.management.MBeanServer.getDomains() ()
          Returns the list of domains in which any MBean is currently registered.
 Integer sample code for java.lang.Integer definition code for java.lang.Integer getMBeanCount sample code for javax.management.MBeanServer.getMBeanCount() definition code for javax.management.MBeanServer.getMBeanCount() ()
          Returns the number of MBeans registered in the MBean server.
 MBeanInfo sample code for javax.management.MBeanInfo definition code for javax.management.MBeanInfo getMBeanInfo sample code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) definition code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
          This method discovers the attributes and operations that an MBean exposes for management.
 ObjectInstance sample code for javax.management.ObjectInstance definition code for javax.management.ObjectInstance getObjectInstance sample code for javax.management.MBeanServer.getObjectInstance(javax.management.ObjectName) definition code for javax.management.MBeanServer.getObjectInstance(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
          Gets the ObjectInstance for a given MBean registered with the MBean server.
 Object sample code for java.lang.Object definition code for java.lang.Object instantiate sample code for javax.management.MBeanServer.instantiate(java.lang.String) definition code for javax.management.MBeanServer.instantiate(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  className)
          Instantiates an object using the list of all class loaders registered in the MBean server's Class Loader Repository sample code for javax.management.loading.ClassLoaderRepository definition code for javax.management.loading.ClassLoaderRepository .
 Object sample code for java.lang.Object definition code for java.lang.Object instantiate sample code for javax.management.MBeanServer.instantiate(java.lang.String, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.instantiate(java.lang.String, java.lang.Object[], java.lang.String[]) (String sample code for java.lang.String definition code for java.lang.String  className, Object sample code for java.lang.Object definition code for java.lang.Object [] params, String sample code for java.lang.String definition code for java.lang.String [] signature)
          Instantiates an object using the list of all class loaders registered in the MBean server Class Loader Repository sample code for javax.management.loading.ClassLoaderRepository definition code for javax.management.loading.ClassLoaderRepository .
 Object sample code for java.lang.Object definition code for java.lang.Object instantiate sample code for javax.management.MBeanServer.instantiate(java.lang.String, javax.management.ObjectName) definition code for javax.management.MBeanServer.instantiate(java.lang.String, javax.management.ObjectName) (String sample code for java.lang.String definition code for java.lang.String  className, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  loaderName)
          Instantiates an object using the class Loader specified by its ObjectName.
 Object sample code for java.lang.Object definition code for java.lang.Object instantiate sample code for javax.management.MBeanServer.instantiate(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.instantiate(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) (String sample code for java.lang.String definition code for java.lang.String  className, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  loaderName, Object sample code for java.lang.Object definition code for java.lang.Object [] params, String sample code for java.lang.String definition code for java.lang.String [] signature)
          Instantiates an object.
 Object sample code for java.lang.Object definition code for java.lang.Object invoke sample code for javax.management.MBeanServer.invoke(javax.management.ObjectName, java.lang.String, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.invoke(javax.management.ObjectName, java.lang.String, java.lang.Object[], java.lang.String[]) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, String sample code for java.lang.String definition code for java.lang.String  operationName, Object sample code for java.lang.Object definition code for java.lang.Object [] params, String sample code for java.lang.String definition code for java.lang.String [] signature)
          Invokes an operation on an MBean.
 boolean isInstanceOf sample code for javax.management.MBeanServer.isInstanceOf(javax.management.ObjectName, java.lang.String) definition code for javax.management.MBeanServer.isInstanceOf(javax.management.ObjectName, java.lang.String) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, String sample code for java.lang.String definition code for java.lang.String  className)
          Returns true if the MBean specified is an instance of the specified class, false otherwise.
 boolean isRegistered sample code for javax.management.MBeanServer.isRegistered(javax.management.ObjectName) definition code for javax.management.MBeanServer.isRegistered(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
          Checks whether an MBean, identified by its object name, is already registered with the MBean server.
 Set sample code for java.util.Set definition code for java.util.Set queryMBeans sample code for javax.management.MBeanServer.queryMBeans(javax.management.ObjectName, javax.management.QueryExp) definition code for javax.management.MBeanServer.queryMBeans(javax.management.ObjectName, javax.management.QueryExp) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, QueryExp sample code for javax.management.QueryExp definition code for javax.management.QueryExp  query)
          Gets MBeans controlled by the MBean server.
 Set sample code for java.util.Set definition code for java.util.Set queryNames sample code for javax.management.MBeanServer.queryNames(javax.management.ObjectName, javax.management.QueryExp) definition code for javax.management.MBeanServer.queryNames(javax.management.ObjectName, javax.management.QueryExp) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, QueryExp sample code for javax.management.QueryExp definition code for javax.management.QueryExp  query)
          Gets the names of MBeans controlled by the MBean server.
 ObjectInstance sample code for javax.management.ObjectInstance definition code for javax.management.ObjectInstance registerMBean sample code for javax.management.MBeanServer.registerMBean(java.lang.Object, javax.management.ObjectName) definition code for javax.management.MBeanServer.registerMBean(java.lang.Object, javax.management.ObjectName) (Object sample code for java.lang.Object definition code for java.lang.Object  object, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
          Registers a pre-existing object as an MBean with the MBean server.
 void removeNotificationListener sample code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener) definition code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener)
          Removes a listener from a registered MBean.
 void removeNotificationListener sample code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener, NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter, Object sample code for java.lang.Object definition code for java.lang.Object  handback)
          Removes a listener from a registered MBean.
 void removeNotificationListener sample code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName) definition code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  listener)
          Removes a listener from a registered MBean.
 void removeNotificationListener sample code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  listener, NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter, Object sample code for java.lang.Object definition code for java.lang.Object  handback)
          Removes a listener from a registered MBean.
 void setAttribute sample code for javax.management.MBeanServer.setAttribute(javax.management.ObjectName, javax.management.Attribute) definition code for javax.management.MBeanServer.setAttribute(javax.management.ObjectName, javax.management.Attribute) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, Attribute sample code for javax.management.Attribute definition code for javax.management.Attribute  attribute)
          Sets the value of a specific attribute of a named MBean.
 AttributeList sample code for javax.management.AttributeList definition code for javax.management.AttributeList setAttributes sample code for javax.management.MBeanServer.setAttributes(javax.management.ObjectName, javax.management.AttributeList) definition code for javax.management.MBeanServer.setAttributes(javax.management.ObjectName, javax.management.AttributeList) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name, AttributeList sample code for javax.management.AttributeList definition code for javax.management.AttributeList  attributes)
          Sets the values of several attributes of a named MBean.
 void unregisterMBean sample code for javax.management.MBeanServer.unregisterMBean(javax.management.ObjectName) definition code for javax.management.MBeanServer.unregisterMBean(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
          Unregisters an MBean from the MBean server.
 

Method Detail

createMBean sample code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName) definition code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName)

ObjectInstance sample code for javax.management.ObjectInstance definition code for javax.management.ObjectInstance  createMBean(String sample code for java.lang.String definition code for java.lang.String  className,
                           ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
                           throws ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException ,
                                  InstanceAlreadyExistsException sample code for javax.management.InstanceAlreadyExistsException definition code for javax.management.InstanceAlreadyExistsException ,
                                  MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException ,
                                  MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException ,
                                  NotCompliantMBeanException sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException 

Instantiates and registers an MBean in the MBean server. The MBean server will use its Default Loader Repository sample code for javax.management.loading.ClassLoaderRepository definition code for javax.management.loading.ClassLoaderRepository to load the class of the MBean. An object name is associated to the MBean. If the object name given is null, the MBean must provide its own name by implementing the MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration interface and returning the name from the preRegister sample code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) method.

This method is equivalent to createMBean(className, name, (Object[]) null, (String[]) null) sample code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) .

Specified by:
createMBean sample code for javax.management.MBeanServerConnection.createMBean(java.lang.String, javax.management.ObjectName) definition code for javax.management.MBeanServerConnection.createMBean(java.lang.String, javax.management.ObjectName) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
className - The class name of the MBean to be instantiated.
name - The object name of the MBean. May be null.
Returns:
An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean. If the contained ObjectName is n, the contained Java class name is getMBeanInfo(n) sample code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) definition code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) .getClassName().
Throws:
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - Wraps a java.lang.ClassNotFoundException or a java.lang.Exception that occurred when trying to invoke the MBean's constructor.
InstanceAlreadyExistsException sample code for javax.management.InstanceAlreadyExistsException definition code for javax.management.InstanceAlreadyExistsException - The MBean is already under the control of the MBean server.
MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException - The preRegister (MBeanRegistration interface) method of the MBean has thrown an exception. The MBean will not be registered.
MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException - The constructor of the MBean has thrown an exception
NotCompliantMBeanException sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException - This class is not a JMX compliant MBean
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The className passed in parameter is null, the ObjectName passed in parameter contains a pattern or no ObjectName is specified for the MBean.

createMBean sample code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName) definition code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName)

ObjectInstance sample code for javax.management.ObjectInstance definition code for javax.management.ObjectInstance  createMBean(String sample code for java.lang.String definition code for java.lang.String  className,
                           ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                           ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  loaderName)
                           throws ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException ,
                                  InstanceAlreadyExistsException sample code for javax.management.InstanceAlreadyExistsException definition code for javax.management.InstanceAlreadyExistsException ,
                                  MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException ,
                                  MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException ,
                                  NotCompliantMBeanException sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException ,
                                  InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException 

Instantiates and registers an MBean in the MBean server. The class loader to be used is identified by its object name. An object name is associated to the MBean. If the object name of the loader is null, the ClassLoader that loaded the MBean server will be used. If the MBean's object name given is null, the MBean must provide its own name by implementing the MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration interface and returning the name from the preRegister sample code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) method.

This method is equivalent to createMBean(className, name, loaderName, (Object[]) null, (String[]) null) sample code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) .

Specified by:
createMBean sample code for javax.management.MBeanServerConnection.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName) definition code for javax.management.MBeanServerConnection.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
className - The class name of the MBean to be instantiated.
name - The object name of the MBean. May be null.
loaderName - The object name of the class loader to be used.
Returns:
An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean. If the contained ObjectName is n, the contained Java class name is getMBeanInfo(n) sample code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) definition code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) .getClassName().
Throws:
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - Wraps a java.lang.ClassNotFoundException or a java.lang.Exception that occurred when trying to invoke the MBean's constructor.
InstanceAlreadyExistsException sample code for javax.management.InstanceAlreadyExistsException definition code for javax.management.InstanceAlreadyExistsException - The MBean is already under the control of the MBean server.
MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException - The preRegister (MBeanRegistration interface) method of the MBean has thrown an exception. The MBean will not be registered.
MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException - The constructor of the MBean has thrown an exception
NotCompliantMBeanException sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException - This class is not a JMX compliant MBean
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The specified class loader is not registered in the MBean server.
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The className passed in parameter is null, the ObjectName passed in parameter contains a pattern or no ObjectName is specified for the MBean.

createMBean sample code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[])

ObjectInstance sample code for javax.management.ObjectInstance definition code for javax.management.ObjectInstance  createMBean(String sample code for java.lang.String definition code for java.lang.String  className,
                           ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                           Object sample code for java.lang.Object definition code for java.lang.Object [] params,
                           String sample code for java.lang.String definition code for java.lang.String [] signature)
                           throws ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException ,
                                  InstanceAlreadyExistsException sample code for javax.management.InstanceAlreadyExistsException definition code for javax.management.InstanceAlreadyExistsException ,
                                  MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException ,
                                  MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException ,
                                  NotCompliantMBeanException sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException 
Instantiates and registers an MBean in the MBean server. The MBean server will use its Default Loader Repository sample code for javax.management.loading.ClassLoaderRepository definition code for javax.management.loading.ClassLoaderRepository to load the class of the MBean. An object name is associated to the MBean. If the object name given is null, the MBean must provide its own name by implementing the MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration interface and returning the name from the preRegister sample code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) method.

Specified by:
createMBean sample code for javax.management.MBeanServerConnection.createMBean(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServerConnection.createMBean(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
className - The class name of the MBean to be instantiated.
name - The object name of the MBean. May be null.
params - An array containing the parameters of the constructor to be invoked.
signature - An array containing the signature of the constructor to be invoked.
Returns:
An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean. If the contained ObjectName is n, the contained Java class name is getMBeanInfo(n) sample code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) definition code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) .getClassName().
Throws:
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - Wraps a java.lang.ClassNotFoundException or a java.lang.Exception that occurred when trying to invoke the MBean's constructor.
InstanceAlreadyExistsException sample code for javax.management.InstanceAlreadyExistsException definition code for javax.management.InstanceAlreadyExistsException - The MBean is already under the control of the MBean server.
MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException - The preRegister (MBeanRegistration interface) method of the MBean has thrown an exception. The MBean will not be registered.
MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException - The constructor of the MBean has thrown an exception
NotCompliantMBeanException sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException - This class is not a JMX compliant MBean
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The className passed in parameter is null, the ObjectName passed in parameter contains a pattern or no ObjectName is specified for the MBean.

createMBean sample code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, java.lang.Object[], java.lang.String[])

ObjectInstance sample code for javax.management.ObjectInstance definition code for javax.management.ObjectInstance  createMBean(String sample code for java.lang.String definition code for java.lang.String  className,
                           ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                           ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  loaderName,
                           Object sample code for java.lang.Object definition code for java.lang.Object [] params,
                           String sample code for java.lang.String definition code for java.lang.String [] signature)
                           throws ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException ,
                                  InstanceAlreadyExistsException sample code for javax.management.InstanceAlreadyExistsException definition code for javax.management.InstanceAlreadyExistsException ,
                                  MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException ,
                                  MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException ,
                                  NotCompliantMBeanException sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException ,
                                  InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException 
Instantiates and registers an MBean in the MBean server. The class loader to be used is identified by its object name. An object name is associated to the MBean. If the object name of the loader is not specified, the ClassLoader that loaded the MBean server will be used. If the MBean object name given is null, the MBean must provide its own name by implementing the MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration interface and returning the name from the preRegister sample code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) method.

Specified by:
createMBean sample code for javax.management.MBeanServerConnection.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServerConnection.createMBean(java.lang.String, javax.management.ObjectName, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
className - The class name of the MBean to be instantiated.
name - The object name of the MBean. May be null.
params - An array containing the parameters of the constructor to be invoked.
signature - An array containing the signature of the constructor to be invoked.
loaderName - The object name of the class loader to be used.
Returns:
An ObjectInstance, containing the ObjectName and the Java class name of the newly instantiated MBean. If the contained ObjectName is n, the contained Java class name is getMBeanInfo(n) sample code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) definition code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) .getClassName().
Throws:
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - Wraps a java.lang.ClassNotFoundException or a java.lang.Exception that occurred when trying to invoke the MBean's constructor.
InstanceAlreadyExistsException sample code for javax.management.InstanceAlreadyExistsException definition code for javax.management.InstanceAlreadyExistsException - The MBean is already under the control of the MBean server.
MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException - The preRegister (MBeanRegistration interface) method of the MBean has thrown an exception. The MBean will not be registered.
MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException - The constructor of the MBean has thrown an exception
NotCompliantMBeanException sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException - This class is not a JMX compliant MBean
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The specified class loader is not registered in the MBean server.
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The className passed in parameter is null, the ObjectName passed in parameter contains a pattern or no ObjectName is specified for the MBean.

registerMBean sample code for javax.management.MBeanServer.registerMBean(java.lang.Object, javax.management.ObjectName) definition code for javax.management.MBeanServer.registerMBean(java.lang.Object, javax.management.ObjectName)

ObjectInstance sample code for javax.management.ObjectInstance definition code for javax.management.ObjectInstance  registerMBean(Object sample code for java.lang.Object definition code for java.lang.Object  object,
                             ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
                             throws InstanceAlreadyExistsException sample code for javax.management.InstanceAlreadyExistsException definition code for javax.management.InstanceAlreadyExistsException ,
                                    MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException ,
                                    NotCompliantMBeanException sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException 
Registers a pre-existing object as an MBean with the MBean server. If the object name given is null, the MBean must provide its own name by implementing the MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration interface and returning the name from the preRegister sample code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) method.

Parameters:
object - The MBean to be registered as an MBean.
name - The object name of the MBean. May be null.
Returns:
An ObjectInstance, containing the ObjectName and the Java class name of the newly registered MBean. If the contained ObjectName is n, the contained Java class name is getMBeanInfo(n) sample code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) definition code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) .getClassName().
Throws:
InstanceAlreadyExistsException sample code for javax.management.InstanceAlreadyExistsException definition code for javax.management.InstanceAlreadyExistsException - The MBean is already under the control of the MBean server.
MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException - The preRegister (MBeanRegistration interface) method of the MBean has thrown an exception. The MBean will not be registered.
NotCompliantMBeanException sample code for javax.management.NotCompliantMBeanException definition code for javax.management.NotCompliantMBeanException - This object is not a JMX compliant MBean
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The object passed in parameter is null or no object name is specified.

unregisterMBean sample code for javax.management.MBeanServer.unregisterMBean(javax.management.ObjectName) definition code for javax.management.MBeanServer.unregisterMBean(javax.management.ObjectName)

void unregisterMBean(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
                     throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                            MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException 
Unregisters an MBean from the MBean server. The MBean is identified by its object name. Once the method has been invoked, the MBean may no longer be accessed by its object name.

Specified by:
unregisterMBean sample code for javax.management.MBeanServerConnection.unregisterMBean(javax.management.ObjectName) definition code for javax.management.MBeanServerConnection.unregisterMBean(javax.management.ObjectName) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The object name of the MBean to be unregistered.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean specified is not registered in the MBean server.
MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException - The preDeregister ((MBeanRegistration interface) method of the MBean has thrown an exception.
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The object name in parameter is null or the MBean you are when trying to unregister is the MBeanServerDelegate sample code for javax.management.MBeanServerDelegate definition code for javax.management.MBeanServerDelegate MBean.

getObjectInstance sample code for javax.management.MBeanServer.getObjectInstance(javax.management.ObjectName) definition code for javax.management.MBeanServer.getObjectInstance(javax.management.ObjectName)

ObjectInstance sample code for javax.management.ObjectInstance definition code for javax.management.ObjectInstance  getObjectInstance(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
                                 throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException 
Gets the ObjectInstance for a given MBean registered with the MBean server.

Specified by:
getObjectInstance sample code for javax.management.MBeanServerConnection.getObjectInstance(javax.management.ObjectName) definition code for javax.management.MBeanServerConnection.getObjectInstance(javax.management.ObjectName) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The object name of the MBean.
Returns:
The ObjectInstance associated with the MBean specified by name. The contained ObjectName is name and the contained class name is getMBeanInfo(name) sample code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) definition code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) .getClassName().
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean specified is not registered in the MBean server.

queryMBeans sample code for javax.management.MBeanServer.queryMBeans(javax.management.ObjectName, javax.management.QueryExp) definition code for javax.management.MBeanServer.queryMBeans(javax.management.ObjectName, javax.management.QueryExp)

Set sample code for java.util.Set definition code for java.util.Set  queryMBeans(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                QueryExp sample code for javax.management.QueryExp definition code for javax.management.QueryExp  query)
Gets MBeans controlled by the MBean server. This method allows any of the following to be obtained: All MBeans, a set of MBeans specified by pattern matching on the ObjectName and/or a Query expression, a specific MBean. When the object name is null or no domain and key properties are specified, all objects are to be selected (and filtered if a query is specified). It returns the set of ObjectInstance objects (containing the ObjectName and the Java Class name) for the selected MBeans.

Specified by:
queryMBeans sample code for javax.management.MBeanServerConnection.queryMBeans(javax.management.ObjectName, javax.management.QueryExp) definition code for javax.management.MBeanServerConnection.queryMBeans(javax.management.ObjectName, javax.management.QueryExp) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The object name pattern identifying the MBeans to be retrieved. If null or no domain and key properties are specified, all the MBeans registered will be retrieved.
query - The query expression to be applied for selecting MBeans. If null no query expression will be applied for selecting MBeans.
Returns:
A set containing the ObjectInstance objects for the selected MBeans. If no MBean satisfies the query an empty set is returned.

queryNames sample code for javax.management.MBeanServer.queryNames(javax.management.ObjectName, javax.management.QueryExp) definition code for javax.management.MBeanServer.queryNames(javax.management.ObjectName, javax.management.QueryExp)

Set sample code for java.util.Set definition code for java.util.Set  queryNames(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
               QueryExp sample code for javax.management.QueryExp definition code for javax.management.QueryExp  query)
Gets the names of MBeans controlled by the MBean server. This method enables any of the following to be obtained: The names of all MBeans, the names of a set of MBeans specified by pattern matching on the ObjectName and/or a Query expression, a specific MBean name (equivalent to testing whether an MBean is registered). When the object name is null or no domain and key properties are specified, all objects are selected (and filtered if a query is specified). It returns the set of ObjectNames for the MBeans selected.

Specified by:
queryNames sample code for javax.management.MBeanServerConnection.queryNames(javax.management.ObjectName, javax.management.QueryExp) definition code for javax.management.MBeanServerConnection.queryNames(javax.management.ObjectName, javax.management.QueryExp) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The object name pattern identifying the MBean names to be retrieved. If null or no domain and key properties are specified, the name of all registered MBeans will be retrieved.
query - The query expression to be applied for selecting MBeans. If null no query expression will be applied for selecting MBeans.
Returns:
A set containing the ObjectNames for the MBeans selected. If no MBean satisfies the query, an empty set is returned.

isRegistered sample code for javax.management.MBeanServer.isRegistered(javax.management.ObjectName) definition code for javax.management.MBeanServer.isRegistered(javax.management.ObjectName)

boolean isRegistered(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
Checks whether an MBean, identified by its object name, is already registered with the MBean server.

Specified by:
isRegistered sample code for javax.management.MBeanServerConnection.isRegistered(javax.management.ObjectName) definition code for javax.management.MBeanServerConnection.isRegistered(javax.management.ObjectName) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The object name of the MBean to be checked.
Returns:
True if the MBean is already registered in the MBean server, false otherwise.
Throws:
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The object name in parameter is null.

getMBeanCount sample code for javax.management.MBeanServer.getMBeanCount() definition code for javax.management.MBeanServer.getMBeanCount()

Integer sample code for java.lang.Integer definition code for java.lang.Integer  getMBeanCount()
Returns the number of MBeans registered in the MBean server.

Specified by:
getMBeanCount sample code for javax.management.MBeanServerConnection.getMBeanCount() definition code for javax.management.MBeanServerConnection.getMBeanCount() in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Returns:
the number of registered MBeans, wrapped in an Integer. If the caller's permissions are restricted, this number may be greater than the number of MBeans the caller can access.

getAttribute sample code for javax.management.MBeanServer.getAttribute(javax.management.ObjectName, java.lang.String) definition code for javax.management.MBeanServer.getAttribute(javax.management.ObjectName, java.lang.String)

Object sample code for java.lang.Object definition code for java.lang.Object  getAttribute(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                    String sample code for java.lang.String definition code for java.lang.String  attribute)
                    throws MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException ,
                           AttributeNotFoundException sample code for javax.management.AttributeNotFoundException definition code for javax.management.AttributeNotFoundException ,
                           InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                           ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException 
Gets the value of a specific attribute of a named MBean. The MBean is identified by its object name.

Specified by:
getAttribute sample code for javax.management.MBeanServerConnection.getAttribute(javax.management.ObjectName, java.lang.String) definition code for javax.management.MBeanServerConnection.getAttribute(javax.management.ObjectName, java.lang.String) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The object name of the MBean from which the attribute is to be retrieved.
attribute - A String specifying the name of the attribute to be retrieved.
Returns:
The value of the retrieved attribute.
Throws:
AttributeNotFoundException sample code for javax.management.AttributeNotFoundException definition code for javax.management.AttributeNotFoundException - The attribute specified is not accessible in the MBean.
MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException - Wraps an exception thrown by the MBean's getter.
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean specified is not registered in the MBean server.
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - Wraps a java.lang.Exception thrown when trying to invoke the setter.
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The object name in parameter is null or the attribute in parameter is null.
See Also:
setAttribute(javax.management.ObjectName, javax.management.Attribute) sample code for javax.management.MBeanServer.setAttribute(javax.management.ObjectName, javax.management.Attribute) definition code for javax.management.MBeanServer.setAttribute(javax.management.ObjectName, javax.management.Attribute)

getAttributes sample code for javax.management.MBeanServer.getAttributes(javax.management.ObjectName, java.lang.String[]) definition code for javax.management.MBeanServer.getAttributes(javax.management.ObjectName, java.lang.String[])

AttributeList sample code for javax.management.AttributeList definition code for javax.management.AttributeList  getAttributes(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                            String sample code for java.lang.String definition code for java.lang.String [] attributes)
                            throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                                   ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException 
Gets the values of several attributes of a named MBean. The MBean is identified by its object name.

Specified by:
getAttributes sample code for javax.management.MBeanServerConnection.getAttributes(javax.management.ObjectName, java.lang.String[]) definition code for javax.management.MBeanServerConnection.getAttributes(javax.management.ObjectName, java.lang.String[]) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The object name of the MBean from which the attributes are retrieved.
attributes - A list of the attributes to be retrieved.
Returns:
The list of the retrieved attributes.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean specified is not registered in the MBean server.
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - An exception occurred when trying to invoke the getAttributes method of a Dynamic MBean.
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wrap a java.lang.IllegalArgumentException: The object name in parameter is null or attributes in parameter is null.
See Also:
setAttributes(javax.management.ObjectName, javax.management.AttributeList) sample code for javax.management.MBeanServer.setAttributes(javax.management.ObjectName, javax.management.AttributeList) definition code for javax.management.MBeanServer.setAttributes(javax.management.ObjectName, javax.management.AttributeList)

setAttribute sample code for javax.management.MBeanServer.setAttribute(javax.management.ObjectName, javax.management.Attribute) definition code for javax.management.MBeanServer.setAttribute(javax.management.ObjectName, javax.management.Attribute)

void setAttribute(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                  Attribute sample code for javax.management.Attribute definition code for javax.management.Attribute  attribute)
                  throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                         AttributeNotFoundException sample code for javax.management.AttributeNotFoundException definition code for javax.management.AttributeNotFoundException ,
                         InvalidAttributeValueException sample code for javax.management.InvalidAttributeValueException definition code for javax.management.InvalidAttributeValueException ,
                         MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException ,
                         ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException 
Sets the value of a specific attribute of a named MBean. The MBean is identified by its object name.

Specified by:
setAttribute sample code for javax.management.MBeanServerConnection.setAttribute(javax.management.ObjectName, javax.management.Attribute) definition code for javax.management.MBeanServerConnection.setAttribute(javax.management.ObjectName, javax.management.Attribute) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The name of the MBean within which the attribute is to be set.
attribute - The identification of the attribute to be set and the value it is to be set to.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean specified is not registered in the MBean server.
AttributeNotFoundException sample code for javax.management.AttributeNotFoundException definition code for javax.management.AttributeNotFoundException - The attribute specified is not accessible in the MBean.
InvalidAttributeValueException sample code for javax.management.InvalidAttributeValueException definition code for javax.management.InvalidAttributeValueException - The value specified for the attribute is not valid.
MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException - Wraps an exception thrown by the MBean's setter.
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - Wraps a java.lang.Exception thrown when trying to invoke the setter.
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The object name in parameter is null or the attribute in parameter is null.
See Also:
getAttribute(javax.management.ObjectName, java.lang.String) sample code for javax.management.MBeanServer.getAttribute(javax.management.ObjectName, java.lang.String) definition code for javax.management.MBeanServer.getAttribute(javax.management.ObjectName, java.lang.String)

setAttributes sample code for javax.management.MBeanServer.setAttributes(javax.management.ObjectName, javax.management.AttributeList) definition code for javax.management.MBeanServer.setAttributes(javax.management.ObjectName, javax.management.AttributeList)

AttributeList sample code for javax.management.AttributeList definition code for javax.management.AttributeList  setAttributes(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                            AttributeList sample code for javax.management.AttributeList definition code for javax.management.AttributeList  attributes)
                            throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                                   ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException 
Sets the values of several attributes of a named MBean. The MBean is identified by its object name.

Specified by:
setAttributes sample code for javax.management.MBeanServerConnection.setAttributes(javax.management.ObjectName, javax.management.AttributeList) definition code for javax.management.MBeanServerConnection.setAttributes(javax.management.ObjectName, javax.management.AttributeList) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The object name of the MBean within which the attributes are to be set.
attributes - A list of attributes: The identification of the attributes to be set and the values they are to be set to.
Returns:
The list of attributes that were set, with their new values.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean specified is not registered in the MBean server.
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - An exception occurred when trying to invoke the setAttributes method of a Dynamic MBean.
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The object name in parameter is null or attributes in parameter is null.
See Also:
getAttributes(javax.management.ObjectName, java.lang.String[]) sample code for javax.management.MBeanServer.getAttributes(javax.management.ObjectName, java.lang.String[]) definition code for javax.management.MBeanServer.getAttributes(javax.management.ObjectName, java.lang.String[])

invoke sample code for javax.management.MBeanServer.invoke(javax.management.ObjectName, java.lang.String, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.invoke(javax.management.ObjectName, java.lang.String, java.lang.Object[], java.lang.String[])

Object sample code for java.lang.Object definition code for java.lang.Object  invoke(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
              String sample code for java.lang.String definition code for java.lang.String  operationName,
              Object sample code for java.lang.Object definition code for java.lang.Object [] params,
              String sample code for java.lang.String definition code for java.lang.String [] signature)
              throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                     MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException ,
                     ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException 
Invokes an operation on an MBean.

Specified by:
invoke sample code for javax.management.MBeanServerConnection.invoke(javax.management.ObjectName, java.lang.String, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServerConnection.invoke(javax.management.ObjectName, java.lang.String, java.lang.Object[], java.lang.String[]) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The object name of the MBean on which the method is to be invoked.
operationName - The name of the operation to be invoked.
params - An array containing the parameters to be set when the operation is invoked
signature - An array containing the signature of the operation. The class objects will be loaded using the same class loader as the one used for loading the MBean on which the operation was invoked.
Returns:
The object returned by the operation, which represents the result of invoking the operation on the MBean specified.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean specified is not registered in the MBean server.
MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException - Wraps an exception thrown by the MBean's invoked method.
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - Wraps a java.lang.Exception thrown while trying to invoke the method.

getDefaultDomain sample code for javax.management.MBeanServer.getDefaultDomain() definition code for javax.management.MBeanServer.getDefaultDomain()

String sample code for java.lang.String definition code for java.lang.String  getDefaultDomain()
Returns the default domain used for naming the MBean. The default domain name is used as the domain part in the ObjectName of MBeans if no domain is specified by the user.

Specified by:
getDefaultDomain sample code for javax.management.MBeanServerConnection.getDefaultDomain() definition code for javax.management.MBeanServerConnection.getDefaultDomain() in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Returns:
the default domain.

getDomains sample code for javax.management.MBeanServer.getDomains() definition code for javax.management.MBeanServer.getDomains()

String sample code for java.lang.String definition code for java.lang.String [] getDomains()

Returns the list of domains in which any MBean is currently registered. A string is in the returned array if and only if there is at least one MBean registered with an ObjectName whose getDomain() sample code for javax.management.ObjectName.getDomain() definition code for javax.management.ObjectName.getDomain() is equal to that string. The order of strings within the returned array is not defined.

Specified by:
getDomains sample code for javax.management.MBeanServerConnection.getDomains() definition code for javax.management.MBeanServerConnection.getDomains() in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Returns:
the list of domains.

addNotificationListener sample code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

void addNotificationListener(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                             NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener,
                             NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter,
                             Object sample code for java.lang.Object definition code for java.lang.Object  handback)
                             throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException 

Adds a listener to a registered MBean.

A notification emitted by the MBean will be forwarded by the MBeanServer to the listener. If the source of the notification is a reference to the MBean object, the MBean server will replace it by the MBean's ObjectName. Otherwise the source is unchanged.

Specified by:
addNotificationListener sample code for javax.management.MBeanServerConnection.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServerConnection.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The name of the MBean on which the listener should be added.
listener - The listener object which will handle the notifications emitted by the registered MBean.
filter - The filter object. If filter is null, no filtering will be performed before handling notifications.
handback - The context to be sent to the listener when a notification is emitted.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans.
See Also:
removeNotificationListener(ObjectName, NotificationListener) sample code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener) definition code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener) , removeNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object) sample code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

addNotificationListener sample code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object)

void addNotificationListener(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                             ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  listener,
                             NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter,
                             Object sample code for java.lang.Object definition code for java.lang.Object  handback)
                             throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException 

Adds a listener to a registered MBean.

A notification emitted by the MBean will be forwarded by the MBeanServer to the listener. If the source of the notification is a reference to the MBean object, the MBean server will replace it by the MBean's ObjectName. Otherwise the source is unchanged.

The listener object that receives notifications is the one that is registered with the given name at the time this method is called. Even if it is subsequently unregistered, it will continue to receive notifications.

Specified by:
addNotificationListener sample code for javax.management.MBeanServerConnection.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServerConnection.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The name of the MBean on which the listener should be added.
listener - The object name of the listener which will handle the notifications emitted by the registered MBean.
filter - The filter object. If filter is null, no filtering will be performed before handling notifications.
handback - The context to be sent to the listener when a notification is emitted.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean name of the notification listener or of the notification broadcaster does not match any of the registered MBeans.
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps an IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException . The MBean named by listener exists but does not implement the NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener interface.
See Also:
removeNotificationListener(ObjectName, ObjectName) sample code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName) definition code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName) , removeNotificationListener(ObjectName, ObjectName, NotificationFilter, Object) sample code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object)

removeNotificationListener sample code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName) definition code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName)

void removeNotificationListener(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                                ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  listener)
                                throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                                       ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException 
Removes a listener from a registered MBean.

If the listener is registered more than once, perhaps with different filters or callbacks, this method will remove all those registrations.

Specified by:
removeNotificationListener sample code for javax.management.MBeanServerConnection.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName) definition code for javax.management.MBeanServerConnection.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The name of the MBean on which the listener should be removed.
listener - The object name of the listener to be removed.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans.
ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException - The listener is not registered in the MBean.
See Also:
addNotificationListener(ObjectName, ObjectName, NotificationFilter, Object) sample code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object)

removeNotificationListener sample code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object)

void removeNotificationListener(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                                ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  listener,
                                NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter,
                                Object sample code for java.lang.Object definition code for java.lang.Object  handback)
                                throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                                       ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException 

Removes a listener from a registered MBean.

The MBean must have a listener that exactly matches the given listener, filter, and handback parameters. If there is more than one such listener, only one is removed.

The filter and handback parameters may be null if and only if they are null in a listener to be removed.

Specified by:
removeNotificationListener sample code for javax.management.MBeanServerConnection.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServerConnection.removeNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The name of the MBean on which the listener should be removed.
listener - A listener that was previously added to this MBean.
filter - The filter that was specified when the listener was added.
handback - The handback that was specified when the listener was added.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans.
ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException - The listener is not registered in the MBean, or it is not registered with the given filter and handback.
See Also:
addNotificationListener(ObjectName, ObjectName, NotificationFilter, Object) sample code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.ObjectName, javax.management.NotificationFilter, java.lang.Object)

removeNotificationListener sample code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener) definition code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener)

void removeNotificationListener(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                                NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener)
                                throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                                       ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException 

Removes a listener from a registered MBean.

If the listener is registered more than once, perhaps with different filters or callbacks, this method will remove all those registrations.

Specified by:
removeNotificationListener sample code for javax.management.MBeanServerConnection.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener) definition code for javax.management.MBeanServerConnection.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The name of the MBean on which the listener should be removed.
listener - The object name of the listener to be removed.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans.
ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException - The listener is not registered in the MBean.
See Also:
addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object) sample code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

removeNotificationListener sample code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

void removeNotificationListener(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                                NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener,
                                NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter,
                                Object sample code for java.lang.Object definition code for java.lang.Object  handback)
                                throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                                       ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException 

Removes a listener from a registered MBean.

The MBean must have a listener that exactly matches the given listener, filter, and handback parameters. If there is more than one such listener, only one is removed.

The filter and handback parameters may be null if and only if they are null in a listener to be removed.

Specified by:
removeNotificationListener sample code for javax.management.MBeanServerConnection.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServerConnection.removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The name of the MBean on which the listener should be removed.
listener - A listener that was previously added to this MBean.
filter - The filter that was specified when the listener was added.
handback - The handback that was specified when the listener was added.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans.
ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException - The listener is not registered in the MBean, or it is not registered with the given filter and handback.
See Also:
addNotificationListener(ObjectName, NotificationListener, NotificationFilter, Object) sample code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.MBeanServer.addNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

getMBeanInfo sample code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName) definition code for javax.management.MBeanServer.getMBeanInfo(javax.management.ObjectName)

MBeanInfo sample code for javax.management.MBeanInfo definition code for javax.management.MBeanInfo  getMBeanInfo(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
                       throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                              IntrospectionException sample code for javax.management.IntrospectionException definition code for javax.management.IntrospectionException ,
                              ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException 
This method discovers the attributes and operations that an MBean exposes for management.

Specified by:
getMBeanInfo sample code for javax.management.MBeanServerConnection.getMBeanInfo(javax.management.ObjectName) definition code for javax.management.MBeanServerConnection.getMBeanInfo(javax.management.ObjectName) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The name of the MBean to analyze
Returns:
An instance of MBeanInfo allowing the retrieval of all attributes and operations of this MBean.
Throws:
IntrospectionException sample code for javax.management.IntrospectionException definition code for javax.management.IntrospectionException - An exception occurred during introspection.
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean specified was not found.
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - An exception occurred when trying to invoke the getMBeanInfo of a Dynamic MBean.

isInstanceOf sample code for javax.management.MBeanServer.isInstanceOf(javax.management.ObjectName, java.lang.String) definition code for javax.management.MBeanServer.isInstanceOf(javax.management.ObjectName, java.lang.String)

boolean isInstanceOf(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                     String sample code for java.lang.String definition code for java.lang.String  className)
                     throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException 

Returns true if the MBean specified is an instance of the specified class, false otherwise.

If name does not name an MBean, this method throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException .

Otherwise, let
X be the MBean named by name,
L be the ClassLoader of X,
N be the class name in X's MBeanInfo sample code for javax.management.MBeanInfo definition code for javax.management.MBeanInfo .

If N equals className, the result is true.

Otherwise, if L successfully loads both N and className, and the second class is assignable from the first, the result is true.

Otherwise, the result is false.

Specified by:
isInstanceOf sample code for javax.management.MBeanServerConnection.isInstanceOf(javax.management.ObjectName, java.lang.String) definition code for javax.management.MBeanServerConnection.isInstanceOf(javax.management.ObjectName, java.lang.String) in interface MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection
Parameters:
name - The ObjectName of the MBean.
className - The name of the class.
Returns:
true if the MBean specified is an instance of the specified class according to the rules above, false otherwise.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean specified is not registered in the MBean server.
See Also:
Class.isAssignableFrom(Class) sample code for java.lang.Class.isAssignableFrom(java.lang.Class) definition code for java.lang.Class.isAssignableFrom(java.lang.Class)

instantiate sample code for javax.management.MBeanServer.instantiate(java.lang.String) definition code for javax.management.MBeanServer.instantiate(java.lang.String)

Object sample code for java.lang.Object definition code for java.lang.Object  instantiate(String sample code for java.lang.String definition code for java.lang.String  className)
                   throws ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException ,
                          MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException 

Instantiates an object using the list of all class loaders registered in the MBean server's Class Loader Repository sample code for javax.management.loading.ClassLoaderRepository definition code for javax.management.loading.ClassLoaderRepository . The object's class should have a public constructor. This method returns a reference to the newly created object. The newly created object is not registered in the MBean server.

This method is equivalent to instantiate(className, (Object[]) null, (String[]) null) sample code for javax.management.MBeanServer.instantiate(java.lang.String, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.instantiate(java.lang.String, java.lang.Object[], java.lang.String[]) .

Parameters:
className - The class name of the object to be instantiated.
Returns:
The newly instantiated object.
Throws:
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - Wraps a java.lang.ClassNotFoundException or the java.lang.Exception that occurred when trying to invoke the object's constructor.
MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException - The constructor of the object has thrown an exception
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The className passed in parameter is null.

instantiate sample code for javax.management.MBeanServer.instantiate(java.lang.String, javax.management.ObjectName) definition code for javax.management.MBeanServer.instantiate(java.lang.String, javax.management.ObjectName)

Object sample code for java.lang.Object definition code for java.lang.Object  instantiate(String sample code for java.lang.String definition code for java.lang.String  className,
                   ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  loaderName)
                   throws ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException ,
                          MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException ,
                          InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException 

Instantiates an object using the class Loader specified by its ObjectName. If the loader name is null, the ClassLoader that loaded the MBean Server will be used. The object's class should have a public constructor. This method returns a reference to the newly created object. The newly created object is not registered in the MBean server.

This method is equivalent to instantiate(className, loaderName, (Object[]) null, (String[]) null) sample code for javax.management.MBeanServer.instantiate(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.instantiate(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) .

Parameters:
className - The class name of the MBean to be instantiated.
loaderName - The object name of the class loader to be used.
Returns:
The newly instantiated object.
Throws:
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - Wraps a java.lang.ClassNotFoundException or the java.lang.Exception that occurred when trying to invoke the object's constructor.
MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException - The constructor of the object has thrown an exception.
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The specified class loader is not registered in the MBeanServer.
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The className passed in parameter is null.

instantiate sample code for javax.management.MBeanServer.instantiate(java.lang.String, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.instantiate(java.lang.String, java.lang.Object[], java.lang.String[])

Object sample code for java.lang.Object definition code for java.lang.Object  instantiate(String sample code for java.lang.String definition code for java.lang.String  className,
                   Object sample code for java.lang.Object definition code for java.lang.Object [] params,
                   String sample code for java.lang.String definition code for java.lang.String [] signature)
                   throws ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException ,
                          MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException 

Instantiates an object using the list of all class loaders registered in the MBean server Class Loader Repository sample code for javax.management.loading.ClassLoaderRepository definition code for javax.management.loading.ClassLoaderRepository . The object's class should have a public constructor. The call returns a reference to the newly created object. The newly created object is not registered in the MBean server.

Parameters:
className - The class name of the object to be instantiated.
params - An array containing the parameters of the constructor to be invoked.
signature - An array containing the signature of the constructor to be invoked.
Returns:
The newly instantiated object.
Throws:
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - Wraps a java.lang.ClassNotFoundException or the java.lang.Exception that occurred when trying to invoke the object's constructor.
MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException - The constructor of the object has thrown an exception
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The className passed in parameter is null.

instantiate sample code for javax.management.MBeanServer.instantiate(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[]) definition code for javax.management.MBeanServer.instantiate(java.lang.String, javax.management.ObjectName, java.lang.Object[], java.lang.String[])

Object sample code for java.lang.Object definition code for java.lang.Object  instantiate(String sample code for java.lang.String definition code for java.lang.String  className,
                   ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  loaderName,
                   Object sample code for java.lang.Object definition code for java.lang.Object [] params,
                   String sample code for java.lang.String definition code for java.lang.String [] signature)
                   throws ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException ,
                          MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException ,
                          InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException 

Instantiates an object. The class loader to be used is identified by its object name. If the object name of the loader is null, the ClassLoader that loaded the MBean server will be used. The object's class should have a public constructor. The call returns a reference to the newly created object. The newly created object is not registered in the MBean server.

Parameters:
className - The class name of the object to be instantiated.
params - An array containing the parameters of the constructor to be invoked.
signature - An array containing the signature of the constructor to be invoked.
loaderName - The object name of the class loader to be used.
Returns:
The newly instantiated object.
Throws:
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - Wraps a java.lang.ClassNotFoundException or the java.lang.Exception that occurred when trying to invoke the object's constructor.
MBeanException sample code for javax.management.MBeanException definition code for javax.management.MBeanException - The constructor of the object has thrown an exception
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The specified class loader is not registered in the MBean server.
RuntimeOperationsException sample code for javax.management.RuntimeOperationsException definition code for javax.management.RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The className passed in parameter is null.

deserialize sample code for javax.management.MBeanServer.deserialize(javax.management.ObjectName, byte[]) definition code for javax.management.MBeanServer.deserialize(javax.management.ObjectName, byte[])

@Deprecated
ObjectInputStream sample code for java.io.ObjectInputStream definition code for java.io.ObjectInputStream  deserialize(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name,
                                         byte[] data)
                              throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                                     OperationsException sample code for javax.management.OperationsException definition code for javax.management.OperationsException 
Deprecated. Use getClassLoaderFor sample code for javax.management.MBeanServer.getClassLoaderFor(javax.management.ObjectName) definition code for javax.management.MBeanServer.getClassLoaderFor(javax.management.ObjectName) to obtain the appropriate class loader for deserialization.

De-serializes a byte array in the context of the class loader of an MBean.

Parameters:
name - The name of the MBean whose class loader should be used for the de-serialization.
data - The byte array to be de-sererialized.
Returns:
The de-serialized object stream.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The MBean specified is not found.
OperationsException sample code for javax.management.OperationsException definition code for javax.management.OperationsException - Any of the usual Input/Output related exceptions.

deserialize sample code for javax.management.MBeanServer.deserialize(java.lang.String, byte[]) definition code for javax.management.MBeanServer.deserialize(java.lang.String, byte[])

@Deprecated
ObjectInputStream sample code for java.io.ObjectInputStream definition code for java.io.ObjectInputStream  deserialize(String sample code for java.lang.String definition code for java.lang.String  className,
                                         byte[] data)
                              throws OperationsException sample code for javax.management.OperationsException definition code for javax.management.OperationsException ,
                                     ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException 
Deprecated. Use getClassLoaderRepository() sample code for javax.management.MBeanServer.getClassLoaderRepository() definition code for javax.management.MBeanServer.getClassLoaderRepository() to obtain the class loader repository and use it to deserialize.

De-serializes a byte array in the context of a given MBean class loader. The class loader is found by loading the class className through the Class Loader Repository sample code for javax.management.loading.ClassLoaderRepository definition code for javax.management.loading.ClassLoaderRepository . The resultant class's class loader is the one to use.

Parameters:
className - The name of the class whose class loader should be used for the de-serialization.
data - The byte array to be de-sererialized.
Returns:
The de-serialized object stream.
Throws:
OperationsException sample code for javax.management.OperationsException definition code for javax.management.OperationsException - Any of the usual Input/Output related exceptions.
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - The specified class could not be loaded by the class loader repository

deserialize sample code for javax.management.MBeanServer.deserialize(java.lang.String, javax.management.ObjectName, byte[]) definition code for javax.management.MBeanServer.deserialize(java.lang.String, javax.management.ObjectName, byte[])

@Deprecated
ObjectInputStream sample code for java.io.ObjectInputStream definition code for java.io.ObjectInputStream  deserialize(String sample code for java.lang.String definition code for java.lang.String  className,
                                         ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  loaderName,
                                         byte[] data)
                              throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                                     OperationsException sample code for javax.management.OperationsException definition code for javax.management.OperationsException ,
                                     ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException 
Deprecated. Use getClassLoader sample code for javax.management.MBeanServer.getClassLoader(javax.management.ObjectName) definition code for javax.management.MBeanServer.getClassLoader(javax.management.ObjectName) to obtain the class loader for deserialization.

De-serializes a byte array in the context of a given MBean class loader. The class loader is the one that loaded the class with name "className". The name of the class loader to be used for loading the specified class is specified. If null, the MBean Server's class loader will be used.

Parameters:
className - The name of the class whose class loader should be used for the de-serialization.
data - The byte array to be de-sererialized.
loaderName - The name of the class loader to be used for loading the specified class. If null, the MBean Server's class loader will be used.
Returns:
The de-serialized object stream.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - The specified class loader MBean is not found.
OperationsException sample code for javax.management.OperationsException definition code for javax.management.OperationsException - Any of the usual Input/Output related exceptions.
ReflectionException sample code for javax.management.ReflectionException definition code for javax.management.ReflectionException - The specified class could not be loaded by the specified class loader.

getClassLoaderFor sample code for javax.management.MBeanServer.getClassLoaderFor(javax.management.ObjectName) definition code for javax.management.MBeanServer.getClassLoaderFor(javax.management.ObjectName)

ClassLoader sample code for java.lang.ClassLoader definition code for java.lang.ClassLoader  getClassLoaderFor(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  mbeanName)
                              throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException 

Return the ClassLoader sample code for java.lang.ClassLoader definition code for java.lang.ClassLoader that was used for loading the class of the named MBean.

Parameters:
mbeanName - The ObjectName of the MBean.
Returns:
The ClassLoader used for that MBean. If l is the MBean's actual ClassLoader, and r is the returned value, then either: What this means is that the ClassLoader may be wrapped in another ClassLoader for security or other reasons.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - if the named MBean is not found.

getClassLoader sample code for javax.management.MBeanServer.getClassLoader(javax.management.ObjectName) definition code for javax.management.MBeanServer.getClassLoader(javax.management.ObjectName)

ClassLoader sample code for java.lang.ClassLoader definition code for java.lang.ClassLoader  getClassLoader(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  loaderName)
                           throws InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException 

Return the named ClassLoader sample code for java.lang.ClassLoader definition code for java.lang.ClassLoader .

Parameters:
loaderName - The ObjectName of the ClassLoader. May be null, in which case the MBean server's own ClassLoader is returned.
Returns:
The named ClassLoader. If l is the actual ClassLoader with that name, and r is the returned value, then either: What this means is that the ClassLoader may be wrapped in another ClassLoader for security or other reasons.
Throws:
InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - if the named ClassLoader is not found.

getClassLoaderRepository sample code for javax.management.MBeanServer.getClassLoaderRepository() definition code for javax.management.MBeanServer.getClassLoaderRepository()

ClassLoaderRepository sample code for javax.management.loading.ClassLoaderRepository definition code for javax.management.loading.ClassLoaderRepository  getClassLoaderRepository()

Return the ClassLoaderRepository for this MBeanServer.

Returns:
The ClassLoaderRepository for this MBeanServer.