| javax.management.MBeanServer
MBeanServer | public interface MBeanServer extends MBeanServerConnection(Code) | | 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.
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
javax.management.MBeanServerNotification MBeanServerNotification Notification is emitted. To register an object as listener to MBeanServerNotifications
you should call the MBean server method
MBeanServer.addNotificationListener addNotificationListener with ObjectName
the ObjectName of the
javax.management.MBeanServerDelegate MBeanServerDelegate .
This ObjectName is:
JMImplementation:type=MBeanServerDelegate .
author: Young Yang |
Method Summary | |
public void | addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) Enables to add a listener to a registered MBean.
Parameters: name - The name of the MBean on which the listener should be added. Parameters: listener - The listener object which will handle the notifications emitted by the registered MBean. Parameters: filter - The filter object. | public void | addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) Enables to add a listener to a registered MBean.
Parameters: name - The name of the MBean on which the listener should be added. Parameters: listener - The object name of the listener which will handle the notifications emitted by the registered MBean. Parameters: filter - The filter object. | public ObjectInstance | createMBean(String className, ObjectName name) Instantiates and registers an MBean in the MBean server.
The MBean server will use the javax.management.MBeanServerFactory.getClassLoaderRepository(MBeanServer server) Default Loader Repository
to load the class of the MBean.
An object name is associated to the MBean.
If the object name given is null, the MBean can automatically provide its
own name by implementing the
javax.management.MBeanRegistration MBeanRegistration interface.
The call returns an ObjectInstance object representing the newly created MBean.
Parameters: className - The class name of the MBean to be instantiated. Parameters: name - The object name of the MBean. | public ObjectInstance | createMBean(String className, ObjectName name, ObjectName loaderName) Instantiates and registers an MBean in the MBean server.
The class loader to be used is identified by its object name. | public ObjectInstance | createMBean(String className, ObjectName name, Object params, String signature) Instantiates and registers an MBean in the MBean server.
The MBean server will use the javax.management.MBeanServerFactory.getClassLoaderRepository(MBeanServer server) Default Loader Repository
to load the class of the MBean.
An object name is associated to the MBean.
If the object name given is null, the MBean can automatically provide its
own name by implementing the
javax.management.MBeanRegistration MBeanRegistration interface.
The call returns an ObjectInstance object representing the newly created MBean.
Parameters: className - The class name of the MBean to be instantiated. Parameters: name - The object name of the MBean. | public ObjectInstance | createMBean(String className, ObjectName name, ObjectName loaderName, Object params, String signature) Instantiates and registers an MBean in the MBean server.
The class loader to be used is identified by its object
name. | public Object | getAttribute(ObjectName name, String attribute) Gets the value of a specific attribute of a named MBean. | public AttributeList | getAttributes(ObjectName name, String[] attributes) Enables the values of several attributes of a named MBean. | public ClassLoader | getClassLoader(ObjectName loaderName) Return the named
java.lang.ClassLoader .
Parameters: loaderName - The ObjectName of the ClassLoader. | public ClassLoader | getClassLoaderFor(ObjectName mbeanName) Return the
java.lang.ClassLoader that was used for
loading the class of the named MBean.
Parameters: mbeanName - The ObjectName of the MBean. | public ClassLoaderRepository | getClassLoaderRepository() Return the ClassLoaderRepository for this MBeanServer. | public String | getDefaultDomain() Returns the default domain used for naming the MBean. | public String[] | getDomains() Returns the list of domains in which any MBean is currently
registered. | public Integer | getMBeanCount() Returns the number of MBeans registered in the MBean server. | public MBeanInfo | getMBeanInfo(ObjectName name) This method discovers the attributes and operations that an MBean exposes
for management. | public ObjectInstance | getObjectInstance(ObjectName name) Gets the ObjectInstance for a given MBean registered with the MBean server.
Parameters: name - The object name of the MBean. | public Object | instantiate(String className) Instantiates an object using the list of all class loaders registered
The MBean server will use the javax.management.MBeanServerFactory.getClassLoaderRepository(MBeanServer server) Default Loader Repository
The object's class should have a public constructor.
It 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. | public Object | instantiate(String className, ObjectName loaderName) 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.
It 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 MBean to be instantiated. Parameters: loaderName - The object name of the class loader to be used. | public Object | instantiate(String className, Object params, String signature) Instantiates an object using the list of all class loaders registered
The MBean server will use the javax.management.MBeanServerFactory.getClassLoaderRepository(MBeanServer server) Default Loader Repository
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. Parameters: params - An array containing the parameters of the constructor to be invoked. Parameters: signature - An array containing the signature of the constructor to be invoked. | public Object | instantiate(String className, ObjectName loaderName, Object params, String signature) Instantiates an object. | public Object | invoke(ObjectName name, String operationName, Object params, String signature) Invokes an operation on an MBean.
Parameters: name - The object name of the MBean on which the method is to be invoked. Parameters: operationName - The name of the operation to be invoked. Parameters: params - An array containing the parameters to be set when the operation isinvoked Parameters: signature - An array containing the signature of the operation. | public boolean | isInstanceOf(ObjectName name, String className) Returns true if the MBean specified is an instance of the specified class, false otherwise.
Parameters: name - The ObjectName of the MBean. Parameters: className - The name of the class. | public boolean | isRegistered(ObjectName name) Checks whether an MBean, identified by its object name, is already registered
with the MBean server.
Parameters: name - The object name of the MBean to be checked. | public Set | queryMBeans(ObjectName name, QueryExp query) Gets MBeans controlled by the MBean server. | public Set | queryNames(ObjectName name, QueryExp query) Gets the names of MBeans controlled by the MBean server. | public ObjectInstance | registerMBean(Object object, ObjectName name) Registers a pre-existing object as an MBean with the MBean server. | public void | removeNotificationListener(ObjectName name, NotificationListener listener) Enables to remove a listener from a registered MBean. | public void | removeNotificationListener(ObjectName name, ObjectName listener) Enables to remove a listener from a registered MBean. | public void | removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) Removes a listener from a registered MBean.
The MBean must have a listener that exactly matches the
given listener , filter , and
handback parameters. | public void | removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) Removes a listener from a registered MBean.
The MBean must have a listener that exactly matches the
given listener , filter , and
handback parameters. | public void | setAttribute(ObjectName name, Attribute attribute) Sets the value of a specific attribute of a named MBean. | public AttributeList | setAttributes(ObjectName name, AttributeList attributes) Sets the values of several attributes of a named MBean. | public void | unregisterMBean(ObjectName name) De-registers an MBean from the MBean server. |
addNotificationListener | public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException(Code) | | Enables to add a listener to a registered MBean.
Parameters: name - The name of the MBean on which the listener should be added. Parameters: listener - The listener object which will handle the notifications emitted by the registered MBean. Parameters: filter - The filter object. If filter is null, no filtering will be performed before handling notifications. Parameters: handback - The context to be sent to the listener when a notification is emitted. exception: InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans. |
addNotificationListener | public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException(Code) | | Enables to add a listener to a registered MBean.
Parameters: name - The name of the MBean on which the listener should be added. Parameters: listener - The object name of the listener which will handle the notifications emitted by the registered MBean. Parameters: filter - The filter object. If filter is null, no filtering will be performed before handling notifications. Parameters: handback - The context to be sent to the listener when a notification is emitted. exception: InstanceNotFoundException - The MBean name of the notification listener or of the notification broadcasterdoes not match any of the registered MBeans. |
createMBean | public ObjectInstance createMBean(String className, ObjectName name) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException(Code) | | Instantiates and registers an MBean in the MBean server.
The MBean server will use the javax.management.MBeanServerFactory.getClassLoaderRepository(MBeanServer server) Default Loader Repository
to load the class of the MBean.
An object name is associated to the MBean.
If the object name given is null, the MBean can automatically provide its
own name by implementing the
javax.management.MBeanRegistration MBeanRegistration interface.
The call returns an ObjectInstance object representing the newly created MBean.
Parameters: className - The class name of the MBean to be instantiated. Parameters: name - The object name of the MBean. May be null. An ObjectInstance , containing the ObjectName and the Java class nameof the newly instantiated MBean. exception: ReflectionException - Wraps a java.lang.ClassNotFoundException or a java.lang.Exception that occurredwhen trying to invoke the MBean's constructor. exception: InstanceAlreadyExistsException - The MBean is already under the control of the MBean server. exception: MBeanRegistrationException - The preRegister (MBeanRegistration interface) method of the MBeanhas thrown an exception. The MBean will not be registered. exception: MBeanException - The constructor of the MBean has thrown an exception exception: NotCompliantMBeanException - This class is not a JMX compliant MBean exception: 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 specifiedfor the MBean. |
createMBean | public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException(Code) | | 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 can automatically provide its
own name by implementing the
javax.management.MBeanRegistration MBeanRegistration interface.
The call returns an ObjectInstance object representing the newly created MBean.
Parameters: className - The class name of the MBean to be instantiated. Parameters: name - The object name of the MBean. May be null. Parameters: loaderName - The object name of the class loader to be used. An ObjectInstance , containing the ObjectName and the Java class nameof the newly instantiated MBean. exception: ReflectionException - Wraps a java.lang.ClassNotFoundException or a java.lang.Exception that occurredwhen trying to invoke the MBean's constructor. exception: InstanceAlreadyExistsException - The MBean is already under the control of the MBean server. exception: MBeanRegistrationException - The preRegister (MBeanRegistration interface) method of the MBeanhas thrown an exception. The MBean will not be registered. exception: MBeanException - The constructor of the MBean has thrown an exception exception: NotCompliantMBeanException - This class is not a JMX compliant MBean exception: InstanceNotFoundException - The specified class loader is not registered in the MBean server. exception: 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 | public ObjectInstance createMBean(String className, ObjectName name, Object params, String signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException(Code) | | Instantiates and registers an MBean in the MBean server.
The MBean server will use the javax.management.MBeanServerFactory.getClassLoaderRepository(MBeanServer server) Default Loader Repository
to load the class of the MBean.
An object name is associated to the MBean.
If the object name given is null, the MBean can automatically provide its
own name by implementing the
javax.management.MBeanRegistration MBeanRegistration interface.
The call returns an ObjectInstance object representing the newly created MBean.
Parameters: className - The class name of the MBean to be instantiated. Parameters: name - The object name of the MBean. May be null. Parameters: params - An array containing the parameters of the constructor to be invoked. Parameters: signature - An array containing the signature of the constructor to be invoked. An ObjectInstance , containing the ObjectName and the Java class nameof the newly instantiated MBean. exception: ReflectionException - Wraps a java.lang.ClassNotFoundException or a java.lang.Exception that occurredwhen trying to invoke the MBean's constructor. exception: InstanceAlreadyExistsException - The MBean is already under the control of the MBean server. exception: MBeanRegistrationException - The preRegister (MBeanRegistration interface) method of the MBeanhas thrown an exception. The MBean will not be registered. exception: MBeanException - The constructor of the MBean has thrown an exception exception: 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 | public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object params, String signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException(Code) | | 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 can automatically provide its
own name by implementing the
javax.management.MBeanRegistration MBeanRegistration interface.
The call returns an ObjectInstance object representing the newly created MBean.
Parameters: className - The class name of the MBean to be instantiated. Parameters: name - The object name of the MBean. May be null. Parameters: params - An array containing the parameters of the constructor to be invoked. Parameters: signature - An array containing the signature of the constructor to be invoked. Parameters: loaderName - The object name of the class loader to be used. An ObjectInstance , containing the ObjectName and the Java class nameof the newly instantiated MBean. exception: ReflectionException - Wraps a java.lang.ClassNotFoundException or a java.lang.Exception that occurredwhen trying to invoke the MBean's constructor. exception: InstanceAlreadyExistsException - The MBean is already under the control of the MBean server. exception: MBeanRegistrationException - The preRegister (MBeanRegistration interface) method of the MBeanhas thrown an exception. The MBean will not be registered. exception: MBeanException - The constructor of the MBean has thrown an exception exception: InstanceNotFoundException - The specified class loader is not registered in the MBean server. exception: 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. |
getAttributes | public AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException, ReflectionException(Code) | | Enables the values of several attributes of a named MBean. The MBean
is identified by its object name.
Parameters: name - The object name of the MBean from which the attributes areretrieved. Parameters: attributes - A list of the attributes to be retrieved. The list of the retrieved attributes. exception: InstanceNotFoundException - The MBean specified is not registered in the MBean server. exception: ReflectionException - An exception occurred when trying to invoke the getAttributes method of a Dynamic MBean. exception: RuntimeOperationsException - Wrap a java.lang.IllegalArgumentException : The object name in parameter is null orattributes in parameter is null. |
getClassLoader | public ClassLoader getClassLoader(ObjectName loaderName) throws InstanceNotFoundException(Code) | | Return the named
java.lang.ClassLoader .
Parameters: loaderName - The ObjectName of the ClassLoader. May benull, in which case the MBean server's own ClassLoader isreturned. The named ClassLoader. If l is the actualClassLoader with that name, and r is the returnedvalue, then either:What this means is that the ClassLoader may be wrapped inanother ClassLoader for security or other reasons. exception: InstanceNotFoundException - if the named ClassLoader isnot found. since: JMX 1.2 |
getClassLoaderFor | public ClassLoader getClassLoaderFor(ObjectName mbeanName) throws InstanceNotFoundException(Code) | | Return the
java.lang.ClassLoader that was used for
loading the class of the named MBean.
Parameters: mbeanName - The ObjectName of the MBean. The ClassLoader used for that MBean. If lis the MBean's actual ClassLoader, and r is thereturned value, then either:What this means is that the ClassLoader may be wrapped inanother ClassLoader for security or other reasons. exception: InstanceNotFoundException - if the named MBean is not found. since: JMX 1.2 |
getClassLoaderRepository | public ClassLoaderRepository getClassLoaderRepository()(Code) | | Return the ClassLoaderRepository for this MBeanServer.
The ClassLoaderRepository for this MBeanServer. since: JMX 1.2 |
getDefaultDomain | public String getDefaultDomain()(Code) | | 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.
|
getDomains | public String[] getDomains()(Code) | | 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
ObjectName.getDomain getDomain() is equal to that
string. The order of strings within the returned array is
not defined.
the list of domains. since: JMX 1.2 |
getMBeanCount | public Integer getMBeanCount()(Code) | | Returns the number of MBeans registered in the MBean server.
|
instantiate | public Object instantiate(String className) throws ReflectionException, MBeanException(Code) | | Instantiates an object using the list of all class loaders registered
The MBean server will use the javax.management.MBeanServerFactory.getClassLoaderRepository(MBeanServer server) Default Loader Repository
The object's class should have a public constructor.
It 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. The newly instantiated object. exception: ReflectionException - Wraps a java.lang.ClassNotFoundException or the java.lang.Exception thatoccurred when trying to invoke the object's constructor. exception: MBeanException - The constructor of the object has thrown an exception exception: RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException : The className passed in parameter is null. |
instantiate | public Object instantiate(String className, ObjectName loaderName) throws ReflectionException, MBeanException, InstanceNotFoundException(Code) | | 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.
It 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 MBean to be instantiated. Parameters: loaderName - The object name of the class loader to be used. The newly instantiated object. exception: ReflectionException - Wraps a java.lang.ClassNotFoundException or the java.lang.Exception thatoccurred when trying to invoke the object's constructor. exception: MBeanException - The constructor of the object has thrown an exception. exception: InstanceNotFoundException - The specified class loader is not registered in the MBaenServer. exception: RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException : The className passed in parameter is null. |
instantiate | public Object instantiate(String className, Object params, String signature) throws ReflectionException, MBeanException(Code) | | Instantiates an object using the list of all class loaders registered
The MBean server will use the javax.management.MBeanServerFactory.getClassLoaderRepository(MBeanServer server) Default Loader Repository
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. Parameters: params - An array containing the parameters of the constructor to be invoked. Parameters: signature - An array containing the signature of the constructor to be invoked. The newly instantiated object. exception: ReflectionException - Wraps a java.lang.ClassNotFoundException or the java.lang.Exception thatoccurred when trying to invoke the object's constructor. exception: MBeanException - The constructor of the object has thrown an exception exception: RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException : The className passed in parameter is null. |
instantiate | public Object instantiate(String className, ObjectName loaderName, Object params, String signature) throws ReflectionException, MBeanException, InstanceNotFoundException(Code) | | 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. Parameters: params - An array containing the parameters of the constructor to be invoked. Parameters: signature - An array containing the signature of the constructor to be invoked. Parameters: loaderName - The object name of the class loader to be used. The newly instantiated object. exception: ReflectionException - Wraps a java.lang.ClassNotFoundException or the java.lang.Exception thatoccurred when trying to invoke the object's constructor. exception: MBeanException - The constructor of the object has thrown an exception exception: InstanceNotFoundException - The specified class loader is not registered in the MBean server. exception: RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException : The className passed in parameter is null. |
invoke | public Object invoke(ObjectName name, String operationName, Object params, String signature) throws InstanceNotFoundException, MBeanException, ReflectionException(Code) | | Invokes an operation on an MBean.
Parameters: name - The object name of the MBean on which the method is to be invoked. Parameters: operationName - The name of the operation to be invoked. Parameters: params - An array containing the parameters to be set when the operation isinvoked Parameters: signature - An array containing the signature of the operation. The class objects willbe loaded using the same class loader as the one used for loading the MBean on which the operation was invoked. The object returned by the operation, which represents the result ofinvoking the operation on theMBean specified. exception: InstanceNotFoundException - The MBean specified is not registered in the MBean server. exception: MBeanException - Wraps an exception thrown by the MBean's invoked method. exception: ReflectionException - Wraps a java.lang.Exception thrown while trying to invoke the method. |
isInstanceOf | public boolean isInstanceOf(ObjectName name, String className) throws InstanceNotFoundException(Code) | | Returns true if the MBean specified is an instance of the specified class, false otherwise.
Parameters: name - The ObjectName of the MBean. Parameters: className - The name of the class. true if the MBean specified is an instance of the specified class, false otherwise. exception: InstanceNotFoundException - The MBean specified is not registered in the MBean server. |
isRegistered | public boolean isRegistered(ObjectName name)(Code) | | Checks whether an MBean, identified by its object name, is already registered
with the MBean server.
Parameters: name - The object name of the MBean to be checked. True if the MBean is already registered in the MBean server, false otherwise. exception: RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException : The object name in parameter is null. |
queryMBeans | public Set queryMBeans(ObjectName name, QueryExp query)(Code) | | 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.
Parameters: name - The object name pattern identifying the MBeans to be retrieved. Ifnull or no domain and key properties are specified, all the MBeans registered will be retrieved. Parameters: query - The query expression to be applied for selecting MBeans. If nullno query expression will be applied for selecting MBeans. A set containing the ObjectInstance objects for the selected MBeans.If no MBean satisfies the query an empty list is returned. |
queryNames | public Set queryNames(ObjectName name, QueryExp query)(Code) | | 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.
Parameters: name - The object name pattern identifying the MBeans to be retrieved. Ifnull or no domain and key properties are specified, all the MBeans registered will be retrieved. Parameters: query - The query expression to be applied for selecting MBeans. If nullno query expression will be applied for selecting MBeans. A set containing the ObjectNames for the MBeans selected.If no MBean satisfies the query, an empty list is returned. |
removeNotificationListener | public void removeNotificationListener(ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException(Code) | | Enables to remove a listener from a registered MBean.
Parameters: name - The name of the MBean on which the listener should be removed. Parameters: listener - The listener object which will handle the notifications emitted by the registered MBean.This method will remove all the information related to this listener. exception: InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans. exception: ListenerNotFoundException - The listener is not registered in the MBean. |
removeNotificationListener | public void removeNotificationListener(ObjectName name, ObjectName listener) throws InstanceNotFoundException, ListenerNotFoundException(Code) | | Enables to remove a listener from a registered MBean.
Parameters: name - The name of the MBean on which the listener should be removed. Parameters: listener - The object name of the listener which will handle the notifications emitted by the registered MBean.This method will remove all the information related to this listener. exception: InstanceNotFoundException - The MBean name provided does not match any of the registered MBeans. exception: ListenerNotFoundException - The listener is not registered in the MBean. |
removeNotificationListener | public void removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException(Code) | | 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.
Parameters: name - The name of the MBean on which the listener shouldbe removed. Parameters: listener - A listener that was previously added to thisMBean. Parameters: filter - The filter that was specified when the listenerwas added. Parameters: handback - The handback that was specified when thelistener was added. exception: InstanceNotFoundException - The MBean name provideddoes not match any of the registered MBeans. exception: ListenerNotFoundException - The listener is notregistered in the MBean, or it is not registered with the givenfilter and handback. See Also: MBeanServer.addNotificationListener(ObjectName,ObjectName,NotificationFilter,Object) since: JMX 1.2 |
removeNotificationListener | public void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException(Code) | | 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.
Parameters: name - The name of the MBean on which the listener shouldbe removed. Parameters: listener - A listener that was previously added to thisMBean. Parameters: filter - The filter that was specified when the listenerwas added. Parameters: handback - The handback that was specified when thelistener was added. exception: InstanceNotFoundException - The MBean name provideddoes not match any of the registered MBeans. exception: ListenerNotFoundException - The listener is notregistered in the MBean, or it is not registered with the givenfilter and handback. See Also: MBeanServer.addNotificationListener(ObjectName,NotificationListener,NotificationFilter,Object) since: JMX 1.2 |
setAttributes | public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException(Code) | | Sets the values of several attributes of a named MBean. The MBean is
identified by its object name.
Parameters: name - The object name of the MBean within which the attributes are tobe set. Parameters: attributes - A list of attributes: The identification of theattributes to be set and the values they are to be set to. The list of attributes that were set, with their new values. exception: InstanceNotFoundException - The MBean specified is not registered in the MBean server. exception: ReflectionException - An exception occurred when trying to invoke the getAttributes method of a Dynamic MBean. exception: RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException : The object name in parameter is null orattributes in parameter is null. |
|
|