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 an
MBeanServerNotification
Notification is emitted. To register an object as listener to
MBeanServerNotifications you should call the MBean server method
addNotificationListener with
the ObjectName of the
MBeanServerDelegate.
This ObjectName is:
JMImplementation:type=MBeanServerDelegate.
| Modifier and Type | Field and Description |
|---|---|
| public static final boolean | DEFAULT_FAIR_LOCK_POLICY
Control the default locking policy of the repository. |
| private final MBeanInstantiator | |
| private final boolean | interceptorsEnabled
true if interceptors are enabled |
| private final MBeanServerDelegate | mBeanServerDelegateObject
The MBeanServerDelegate object representing the MBean Server |
| private volatile MBeanServer | |
| private final MBeanServer | |
| private final SecureClassLoaderRepository |
| Access | Constructor and Description |
|---|---|
| pack-priv | JmxMBeanServer(String
The default domain name used by this MBeanServer. domain, MBeanServer A pointer to the MBeanServer object that must be
passed to the MBeans when invoking their
outer, MBeanServerDelegate javax. interface.A pointer to the MBeanServerDelegate associated
with the new MBeanServer. The new MBeanServer must register
this MBean in its MBean repository. delegate)Package: Creates an MBeanServer with the specified default domain name, outer interface, and delegate. |
| pack-priv | JmxMBeanServer(String
The default domain name used by this MBeanServer. domain, MBeanServer A pointer to the MBeanServer object that must be
passed to the MBeans when invoking their
outer, MBeanServerDelegate javax. interface.A pointer to the MBeanServerDelegate associated
with the new MBeanServer. The new MBeanServer must register
this MBean in its MBean repository. delegate, boolean If interceptors)true,
MBeanServerInterceptor will be enabled (default is
false)
Note: this parameter is not taken into account by this
implementation - the default value false is
always used.Package: Creates an MBeanServer with the specified default domain name, outer interface, and delegate. |
| pack-priv | JmxMBeanServer(String
The default domain name used by this MBeanServer. domain, MBeanServer A pointer to the MBeanServer object that must be
passed to the MBeans when invoking their
outer, MBeanServerDelegate javax. interface.A pointer to the MBeanServerDelegate associated
with the new MBeanServer. The new MBeanServer must register
this MBean in its MBean repository. delegate, MBeanInstantiator The MBeanInstantiator that will be used to
instantiate MBeans and take care of class loading issues. instantiator, boolean interceptors)Package: Creates an MBeanServer. |
| pack-priv | JmxMBeanServer(String
The default domain name used by this MBeanServer. domain, MBeanServer A pointer to the MBeanServer object that must be
passed to the MBeans when invoking their
outer, MBeanServerDelegate javax. interface.A pointer to the MBeanServerDelegate associated
with the new MBeanServer. The new MBeanServer must register
this MBean in its MBean repository. delegate, MBeanInstantiator The MBeanInstantiator that will be used to
instantiate MBeans and take care of class loading issues. instantiator, boolean interceptors, boolean If fairLock)true, the MBean repository will use a fair locking policy.Package: Creates an MBeanServer. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addNotificationListener(ObjectName
The name of the MBean on which the listener should be added. name, NotificationListener The listener object which will handle the
notifications emitted by the registered MBean. listener, NotificationFilter The filter object. If filter is null, no filtering
will be performed before handling notifications. filter, Object The context to be sent to the listener when a
notification is emitted. handback)Implements javax. Adds a listener to a registered MBean. |
| public void | addNotificationListener(ObjectName
The name of the MBean on which the listener should be added. name, ObjectName The object name of the listener which will handle the
notifications emitted by the registered MBean. listener, NotificationFilter The filter object. If filter is null, no filtering will
be performed before handling notifications. filter, Object The context to be sent to the listener when a
notification is emitted. handback)Implements javax. Adds a listener to a registered MBean. |
| private Attribute | |
| private AttributeList | |
| private ObjectName | |
| public ObjectInstance | Returns: AnObjectInstance, containing the
ObjectName and the Java class name of the newly
instantiated MBean.The class name of the MBean to be instantiated. className, ObjectName The object name of the MBean. May be null. name)Implements javax. Instantiates and registers an MBean in the MBean server. |
| public ObjectInstance | Returns: AnObjectInstance, containing the
ObjectName and the Java class name
of the newly instantiated MBean.The class name of the MBean to be instantiated. className, ObjectName The object name of the MBean. May be null. name, ObjectName The object name of the class loader to be used. loaderName)Implements javax. Instantiates and registers an MBean in the MBean server. |
| public ObjectInstance | Returns: AnObjectInstance, containing the
ObjectName and the Java class name
of the newly instantiated MBean.The class name of the MBean to be instantiated. className, ObjectName The object name of the MBean. May be null. name, Object[] An array containing the parameters of the constructor
to be invoked. params, String[] An array containing the signature of the
constructor to be invoked. signature)Implements javax. Instantiates and registers an MBean in the MBean server. |
| public ObjectInstance | Returns: AnObjectInstance, containing the
ObjectName and the Java class name of the newly
instantiated MBean.The class name of the MBean to be instantiated. className, ObjectName The object name of the MBean. May be null. name, ObjectName The object name of the class loader to be used. loaderName, Object[] An array containing the parameters of the constructor
to be invoked. params, String[] An array containing the signature of the
constructor to be invoked. signature)Implements javax. Instantiates and registers an MBean in the MBean server. |
| public ObjectInputStream | Returns: The de-serialized object stream.The name of the MBean whose class loader should
be used for the de-serialization. name, byte[] The byte array to be de-sererialized. data)Overrides default javax.
Deprecated
De-serializes a byte array in the context of the class loader of an MBean. |
| public ObjectInputStream | Returns: The de-serialized object stream.The name of the class whose class loader should be
used for the de-serialization. className, byte[] The byte array to be de-sererialized. data)Overrides default javax.
Deprecated
De-serializes a byte array in the context of a given MBean class loader. |
| public ObjectInputStream | Returns: The de-serialized object stream.The name of the class whose class loader should be
used for the de-serialization. className, ObjectName 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. loaderName, byte[] The byte array to be de-sererialized. data)Overrides default javax.
Deprecated
De-serializes a byte array in the context of a given MBean class loader. |
| public Object | Returns: The value of the retrieved attribute.The object name of the MBean from which the attribute
is to be retrieved. name, String A String specifying the name of the attribute to be
retrieved. attribute)Implements javax. Gets the value of a specific attribute of a named MBean. |
| public AttributeList | Returns: The list of the retrieved attributes.The object name of the MBean from which the attributes are
retrieved. name, String[] A list of the attributes to be retrieved. attributes)Implements javax. Enables the values of several attributes of a named MBean. |
| public ClassLoader | Returns: The named ClassLoader.The ObjectName of the ClassLoader. loaderName)Implements javax. Return the named |
| public ClassLoader | Returns: The ClassLoader used for that MBean.The ObjectName of the MBean. mbeanName)Implements javax. Return the |
| public ClassLoaderRepository | Returns: The ClassLoaderRepository for that MBeanServer.Implements javax. Return the ClassLoaderRepository for that MBeanServer. |
| public String | getDefaultDomain()
Implements javax. Returns the default domain used for naming the MBean. |
| public String[] | getDomains()
Implements javax. Returns the list of domains in which any MBean is currently registered. |
| public Integer | getMBeanCount()
Implements javax. Returns the number of MBeans registered in the MBean server. |
| public MBeanInfo | Returns: An instance ofMBeanInfo allowing the retrieval of
all attributes and operations of this MBean.The name of the MBean to analyze name)Implements javax. This method discovers the attributes and operations that an MBean exposes for management. |
| public MBeanInstantiator | getMBeanInstantiator()
Implements com. Return the MBeanInstantiator associated to this MBeanServer. |
| public MBeanServerDelegate | getMBeanServerDelegate()
Implements com. Return the MBeanServerDelegate representing the MBeanServer. |
| public synchronized MBeanServer | getMBeanServerInterceptor()
Implements com. Return the MBeanServerInterceptor. |
| public ObjectInstance | Returns: TheObjectInstance associated to the MBean
specified by name.The object name of the MBean. name)Implements javax. Gets the |
| private void | |
| public Object | Returns: The newly instantiated object.The class name of the object to be instantiated. className)Implements javax. Instantiates an object using the list of all class loaders registered
in the MBean server (using its
|
| public Object | Returns: The newly instantiated object.The class name of the MBean to be instantiated. className, ObjectName The object name of the class loader to be used. loaderName)Implements javax. Instantiates an object using the class Loader specified by its
|
| public Object | Returns: The newly instantiated object.The class name of the object to be instantiated. className, Object[] An array containing the parameters of the constructor
to be invoked. params, String[] An array containing the signature of the
constructor to be invoked. signature)Implements javax. Instantiates an object using the list of all class loaders registered
in the MBean server (using its
|
| public Object | Returns: The newly instantiated object.The class name of the object to be instantiated. className, ObjectName The object name of the class loader to be used. loaderName, Object[] An array containing the parameters of the constructor
to be invoked. params, String[] An array containing the signature of the constructor
to be invoked. signature)Implements javax. Instantiates an object. |
| public boolean | interceptorsEnabled()
Implements com. Tell whether |
| public Object | Returns: The object returned by the operation, which represents the result ofinvoking the operation on the MBean specified.The object name of the MBean on which the method is to be
invoked. name, String The name of the operation to be invoked. operationName, Object[] An array containing the parameters to be set when
the operation is invoked params, String[] 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. signature)Implements javax. Invokes an operation on an MBean. |
| public boolean | Returns: true if the MBean specified is an instance of the specified class, false otherwise.The name, String ObjectName of the MBean.The name of the class. className)Implements javax. Returns true if the MBean specified is an instance of the specified class, false otherwise. |
| public boolean | Returns: True if the MBean is already registered in the MBean server, false otherwise.The object name of the MBean to be checked. name)Implements javax. Checks whether an MBean, identified by its object name, is already registered with the MBean server. |
| public static MBeanServer | Returns: A new private implementation of an MBeanServer.Default domain of the new MBeanServer. defaultDomain, MBeanServer A pointer to the MBeanServer object that must be
passed to the MBeans when invoking their
outer, MBeanServerDelegate javax. interface.A pointer to the MBeanServerDelegate associated
with the new MBeanServer. The new MBeanServer must register
this MBean in its MBean repository. delegate, boolean If interceptors)true,
MBeanServerInterceptors will be enabled (default is
false).
Note this parameter is not taken into account by this
implementation - the default value This method creates a new MBeanServer implementation object. |
| public static MBeanServerDelegate | Returns: A newjavax..This method creates a new MBeanServerDelegate for a new MBeanServer. |
| public Set | Returns: A set containing theObjectInstance objects
for the selected MBeans.
If no MBean satisfies the query an empty list is returned.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. name, QueryExp The query expression to be applied for selecting
MBeans. If null no query expression will be applied for
selecting MBeans. query)Implements javax. Gets MBeans controlled by the MBean server. |
| public Set | Returns: A set containing the ObjectNames for the MBeans selected. If no MBean satisfies the query, an empty list is returned.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. name, QueryExp The query expression to be applied for selecting
MBeans. If null no query expression will be applied for
selecting MBeans. query)Implements javax. Gets the names of MBeans controlled by the MBean server. |
| public ObjectInstance | Returns: TheObjectInstance for the MBean that has been
registered.The MBean to be registered as an MBean. object, ObjectName The object name of the MBean. May be null. name)Implements javax. Registers a pre-existing object as an MBean with the MBean server. |
| public void | removeNotificationListener(ObjectName name, NotificationListener listener)
Implements javax. Removes a listener from a registered MBean. |
| public void | removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback)
Implements javax. Removes a listener from a registered MBean. |
| public void | removeNotificationListener(ObjectName name, ObjectName listener)
Implements javax. Removes a listener from a registered MBean. |
| public void | removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback)
Implements javax. Removes a listener from a registered MBean. |
| public void | setAttribute(ObjectName
The name of the MBean within which the attribute is
to be set. name, Attribute The identification of the attribute to be set
and the value it is to be set to. attribute)Implements javax. Sets the value of a specific attribute of a named MBean. |
| public AttributeList | Returns: The list of attributes that were set, with their new values.The object name of the MBean within which the
attributes are to be set. name, AttributeList A list of attributes: The identification of the
attributes to be set and the values they are to be set to. attributes)Implements javax. Sets the values of several attributes of a named MBean. |
| public synchronized void | setMBeanServerInterceptor(MBeanServer interceptor)
Implements com. Set the MBeanServerInterceptor. |
| public void | unregisterMBean(ObjectName
The object name of the MBean to be de-registered. name)Implements javax. De-registers an MBean from the MBean server. |