Java Doc for MBeanServer.java in  » JMX » XMOJO » javax » management » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » JMX » XMOJO » javax.management 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.management.MBeanServer

MBeanServer
abstract public interface MBeanServer (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.





Method Summary
public  voidaddNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback)
     Enables a couple (listener,handback) for a registered MBean to be added.
Parameters:
  name - The name of the MBean on which the listener should be added.
Parameters:
  listener - The listener object which will handles notificationsemitted by the registered MBean.
Parameters:
  filter - The filter object.
public  voidaddNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback)
     Enables a couple (listener,handback) for a registered MBean to be added.
Parameters:
  name - The name of the MBean on which the listener should be added.
Parameters:
  listener - The listener name which will handles notificationsemitted by the registered MBean.
Parameters:
  filter - The filter object.
public  ObjectInstancecreateMBean(String className, ObjectName name)
     Instantiates and registers an MBean in the MBean server. The MBean server will use the javax.management.loading.DefaultLoaderRepository Default Loader Repository to load the class of the MBean.
public  ObjectInstancecreateMBean(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.loading.DefaultLoaderRepository Default Loader Repository to load the class of the MBean. An object name is associated to the MBean.
public  ObjectInstancecreateMBean(String className, ObjectName name, ObjectName loaderName)
     Instantiates and registers an MBean in the MBean server.
public  ObjectInstancecreateMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature)
     Instantiates and registers an MBean in the MBean server.
public  ObjectInputStreamdeserialize(ObjectName name, byte[] data)
     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 usedfor the de-serialization.
Parameters:
  data - The byte array to be de-sererialized.
public  ObjectInputStreamdeserialize(String className, byte[] data)
     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".
Parameters:
  className - The name of the class whose class loader should be usedfor the de-serialization.
Parameters:
  data - The byte array to be de-sererialized.
public  ObjectInputStreamdeserialize(String className, ObjectName loaderName, byte[] data)
     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.
public  ObjectgetAttribute(ObjectName name, String attribute)
     Gets the value of a specific attribute of a named MBean.
public  AttributeListgetAttributes(ObjectName name, String[] attributes)
     Enables the values of several attributes of a named MBean.
public  StringgetDefaultDomain()
     Returns the default domain used for naming the MBean.
public  IntegergetMBeanCount()
     Returns the number of MBeans controlled by the MBeanServer.
public  MBeanInfogetMBeanInfo(ObjectName name)
     This method discovers the attributes and operations that an MBean exposes for management.
public  ObjectInstancegetObjectInstance(ObjectName name)
     Gets the ObjectInstance for a given MBean registered with the MBean server.
Parameters:
  name - The object name of the MBean.
public  java.lang.Objectinstantiate(String className)
     Instantiates an object using the list of all class loaders registered in the MBean server ( javax.management.loading.DefaultLoaderRepository Default Loader Repository ). The object's class should have a public constructor.
public  java.lang.Objectinstantiate(String className, Object[] params, String[] signature)
     Instantiates an object using the list of all class loaders registered in the MBean server ( javax.management.loading.DefaultLoaderRepository Default Loader Repository ). The object's class should have a public constructor.
public  java.lang.Objectinstantiate(String className, ObjectName loaderName)
     Instantiates an object using the class Loader specified by its ObjectName.
public  java.lang.Objectinstantiate(String className, ObjectName loaderName, Object[] params, String[] signature)
     Instantiates an object.
public  Objectinvoke(ObjectName name, String actionName, 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 whenthe operation is invoked.
Parameters:
  signature - An array containing the signature of the operation.The class objects will be loaded using the sameclass loader as the one used for loading the MBean onwhich the operation was invoked.
public  booleanisInstanceOf(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  booleanisRegistered(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  SetqueryMBeans(ObjectName name, QueryExp query)
     Gets MBeans controlled by the MBean server.
public  SetqueryNames(ObjectName name, QueryExp query)
     Gets the names of MBeans controlled by the MBean server.
public  ObjectInstanceregisterMBean(Object object, ObjectName name)
     Registers a pre-existing object as an MBean with the MBean server.
public  voidremoveNotificationListener(ObjectName name, NotificationListener listener)
     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 notificationsemitted by the registered MBean.
public  voidremoveNotificationListener(ObjectName name, ObjectName listener)
     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 thenotifications emitted by the registered MBean.
public  voidsetAttribute(ObjectName name, Attribute attribute)
     Sets the value of a specific attribute of a named MBean.
public  AttributeListsetAttributes(ObjectName name, AttributeList attributes)
     Sets the values of several attributes of a named MBean.
public  voidunregisterMBean(ObjectName name)
     De-registers an MBean from the MBean server.



Method Detail
addNotificationListener
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException(Code)
Enables a couple (listener,handback) for a registered MBean to be added.
Parameters:
  name - The name of the MBean on which the listener should be added.
Parameters:
  listener - The listener object which will handles notificationsemitted by the registered MBean.
Parameters:
  filter - The filter object. If not specified, no filtering will beperformed before handling notifications.
Parameters:
  handback - The context to be sent to the listener when anotification is emitted.
exception:
  javax.management.InstanceNotFoundException - The MBean namedoesn't correspond to a registered MBean.



addNotificationListener
public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException(Code)
Enables a couple (listener,handback) for a registered MBean to be added.
Parameters:
  name - The name of the MBean on which the listener should be added.
Parameters:
  listener - The listener name which will handles notificationsemitted by the registered MBean.
Parameters:
  filter - The filter object. If not specified, no filtering will beperformed before handling notifications.
Parameters:
  handback - The context to be sent to the listener when anotification is emitted.
exception:
  javax.management.InstanceNotFoundException - The MBean namedoesn't correspond to a registered MBean.



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.loading.DefaultLoaderRepository 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 theObjectName and the Java class name ofthe newly instantiated MBean.
exception:
  ReflectionException - Wraps ajava.lang.ClassNotFoundExceptionor a java.lang.Exception thatoccurred when trying to invoke the MBean's constructor.
exception:
  InstanceAlreadyExistsException - The MBean is already underthe control of the MBean server.
exception:
  MBeanRegistrationException - The preRegister(MBeanRegistration interface) method of theMBean has 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 ajava.lang.IllegalArgumentException:The className passed in parameter is null,the ObjectName passed in parameter containsa patternor 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.loading.DefaultLoaderRepository 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 constructor to be invoked.
Parameters:
  signature - An array containing the signature of constructor to be invoked. An ObjectInstance, containing theObjectName and the Java class name ofthe newly instantiated MBean.
exception:
  ReflectionException - Wraps ajava.lang.ClassNotFoundExceptionor a java.lang.Exception that occurredwhen trying to invoke the MBean's constructor.
exception:
  InstanceAlreadyExistsException - The MBean is already underthe control of the MBean server.
exception:
  MBeanRegistrationException - The preRegister(MBeanRegistration interface) method of theMBean has thrown an exception. The MBean will not be registered.
exception:
  MBeanException - The constructor of the MBean has thrown an exception.
exception:
  RuntimeOperationsException - Wraps ajava.lang.IllegalArgumentException:The className passed in parameter is null,the ObjectName passed in parameter contains a patternor no ObjectName is specified for 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 theObjectName and the Java class name ofthe newly instantiated MBean.
exception:
  ReflectionException - Wraps ajava.lang.ClassNotFoundExceptionor a java.lang.Exception that occurredwhen trying to invoke the MBean's constructor.
exception:
  InstanceAlreadyExistsException - The MBean is already underthe control of the MBean server.
exception:
  MBeanRegistrationException - The preRegister(MBeanRegistration interface) method of theMBean has 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 loaderis not registered in the MBean server.
exception:
  RuntimeOperationsException - Wraps ajava.lang.IllegalArgumentException:The className passed in parameter is null,the ObjectName passed in parameter contains a patternor 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 constructor to be invoked.
Parameters:
  signature - An array containing the signature of constructor to be invoked.
Parameters:
  loaderName - The object name of the class loader to be used. An ObjectInstance, containing theObjectName and the Java class name ofthe newly instantiated MBean.
exception:
  ReflectionException - Wraps ajava.lang.ClassNotFoundExceptionor a java.lang.Exception that occurredwhen trying to invoke the MBean's constructor.
exception:
  InstanceAlreadyExistsException - The MBean is already underthe control of the MBean server.
exception:
  MBeanRegistrationException - The preRegister(MBeanRegistration interface) method of theMBean has 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 loaderis not registered in the MBean server.
exception:
  RuntimeOperationsException - Wraps ajava.lang.IllegalArgumentException:The className passed in parameter is null,the ObjectName passed in parameter contains a patternor no ObjectName is specified for the MBean.



deserialize
public ObjectInputStream deserialize(ObjectName name, byte[] data) throws InstanceNotFoundException, OperationsException(Code)
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 usedfor the de-serialization.
Parameters:
  data - The byte array to be de-sererialized. The de-serialized object stream.
exception:
  InstanceNotFoundException - The MBean specified is not found.
exception:
  OperationsException - Any of the usual Input/Output related exceptions.



deserialize
public ObjectInputStream deserialize(String className, byte[] data) throws OperationsException, ReflectionException(Code)
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".
Parameters:
  className - The name of the class whose class loader should be usedfor the de-serialization.
Parameters:
  data - The byte array to be de-sererialized. The de-serialized object stream.
exception:
  OperationsException - Any of the usual Input/Output related exceptions.
exception:
  ReflectionException - The specified class could not beloaded by the default loader repository.



deserialize
public ObjectInputStream deserialize(String className, ObjectName loaderName, byte[] data) throws InstanceNotFoundException, OperationsException, ReflectionException(Code)
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 beused for the de-serialization.
Parameters:
  data - The byte array to be de-sererialized.
Parameters:
  loaderName - The name of the class loader to be used forloading the specified class. If null, the MBean Server'sclass loader will be used. The de-serialized object stream.
exception:
  InstanceNotFoundException - The specified class loader MBeanis not found.
exception:
  OperationsException - Any of the usual Input/Output related exceptions.
exception:
  ReflectionException - The specified class could not beloaded by the specified class loader.



getAttribute
public Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException(Code)
Gets the value of a specific attribute of a named MBean. The MBean is identified by its object name.
Parameters:
  name - The object name of the MBean from which the attribute isto be retrieved.
Parameters:
  attribute - A String specifying the name of the attribute to be retrieved. The value of the retrieved attribute.
exception:
  AttributeNotFoundException - The attribute specified isnot accessible in the MBean.
exception:
  MBeanException - Wraps an exception thrown by the MBean's getter.
exception:
  InstanceNotFoundException - The MBean specified is notregistered in the MBean server.
exception:
  ReflectionException - Wraps a java.lang.Exceptionthrown when trying to invoke the setter.
exception:
  RuntimeOperationsException - Wraps ajava.lang.IllegalArgumentException:The object name in parameter is nullor the attribute in parameter is null.



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 isnot registered in the MBean server.
exception:
  ReflectionException - An exception occurred when trying toinvoke the getAttributes method of a Dynamic MBean.
exception:
  RuntimeOperationsException - Wrap ajava.lang.IllegalArgumentException:The object name in parameter is nullor attributes in parameter is null.



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.



getMBeanCount
public Integer getMBeanCount()(Code)
Returns the number of MBeans controlled by the MBeanServer.



getMBeanInfo
public MBeanInfo getMBeanInfo(ObjectName name) throws InstanceNotFoundException, IntrospectionException, ReflectionException(Code)
This method discovers the attributes and operations that an MBean exposes for management.
Parameters:
  name - The name of the MBean to analyze An instance of MBeanInfo allowing the retrievalof all attributes and operations of this MBean.
exception:
  IntrospectionException - An exception occurs during introspection.
exception:
  InstanceNotFoundException - The MBean specified is not found.
exception:
  ReflectionException - An exception occurred when tryingto invoke the getMBeanInfo of a Dynamic MBean.



getObjectInstance
public ObjectInstance getObjectInstance(ObjectName name) throws InstanceNotFoundException(Code)
Gets the ObjectInstance for a given MBean registered with the MBean server.
Parameters:
  name - The object name of the MBean. The ObjectInstance associated to theMBean specified by name.
exception:
  InstanceNotFoundException - The MBean specified is notregistered in the MBean server.



instantiate
public java.lang.Object instantiate(String className) throws ReflectionException, MBeanException(Code)
Instantiates an object using the list of all class loaders registered in the MBean server ( javax.management.loading.DefaultLoaderRepository 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 ajava.lang.ClassNotFoundExceptionor the java.lang.Exception that occurredwhen trying to invoke the object's constructor.
exception:
  MBeanException - The constructor of the object has thrown an exception.
exception:
  RuntimeOperationsException - Wraps ajava.lang.IllegalArgumentException:The className passed in parameter is null.



instantiate
public java.lang.Object instantiate(String className, Object[] params, String[] signature) throws ReflectionException, MBeanException(Code)
Instantiates an object using the list of all class loaders registered in the MBean server ( javax.management.loading.DefaultLoaderRepository 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 ajava.lang.ClassNotFoundExceptionor the java.lang.Exception that occurredwhen trying to invoke the object's constructor.
exception:
  MBeanException - The constructor of the object has thrown an exception
exception:
  RuntimeOperationsException - Wraps ajava.lang.IllegalArgumentException:The className passed in parameter is null.



instantiate
public java.lang.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 ajava.lang.ClassNotFoundExceptionor the java.lang.Exception that occurredwhen trying to invoke the object's constructor.
exception:
  MBeanException - The constructor of the object has thrown an exception.
exception:
  InstanceNotFoundException - The specified class loader isnot registered in the MBaenServer.
exception:
  RuntimeOperationsException - Wraps ajava.lang.IllegalArgumentException:The className passed in parameter is null.



instantiate
public java.lang.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 ajava.lang.ClassNotFoundExceptionor the java.lang.Exception that occurredwhen trying to invoke the object's constructor.
exception:
  MBeanException - The constructor of the object has thrownan exception.
exception:
  InstanceNotFoundException - The specified class loader isnot registered in the MBean server.
exception:
  RuntimeOperationsException - Wraps ajava.lang.IllegalArgumentException:The className passed in parameter is null.



invoke
public Object invoke(ObjectName name, String actionName, 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 whenthe operation is invoked.
Parameters:
  signature - An array containing the signature of the operation.The class objects will be loaded using the sameclass loader as the one used for loading the MBean onwhich the operation was invoked. The object returned by the operation, which represents theresult ofinvoking the operation on the MBean specified.
exception:
  InstanceNotFoundException - The MBean specified isnot registered in the MBean server.
exception:
  MBeanException - Wraps an exception thrown by the MBean's invoked method.
exception:
  ReflectionException - Wraps a java.lang.Exceptionthrown 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 thespecified class, false otherwise.
exception:
  InstanceNotFoundException - The MBean specified is notregistered 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 theMBean server, false otherwise.
exception:
  RuntimeOperationsException - Wraps ajava.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 beretrieved. If null or no domain and key properties arespecified, all the MBeans registered will be retrieved.
Parameters:
  query - The query expression to be applied for selecting MBeans. Ifnull no query expression will be applied for selecting MBeans. A set containing the ObjectInstance objects forthe selected MBeans. If no MBean satisfies the queryan 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 beretrieved. If null or no domain and key properties arespecified, all the MBeans registered will be retrieved.
Parameters:
  query - The query expression to be applied for selecting MBeans. Ifnull no query expression will be applied for selecting MBeans. A set containing the ObjectNames for the MBeans selected. Ifno MBean satisfies the query, an empty list is returned.



registerMBean
public ObjectInstance registerMBean(Object object, ObjectName name) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException(Code)
Registers a pre-existing object as an MBean with the MBean server. If the object name given is null, the MBean may automatically provide its own name by implementing the javax.management.MBeanRegistration MBeanRegistration interface. The call returns an ObjectInstance object representing the registered MBean.
Parameters:
  object - The MBean to be registered as an MBean.
Parameters:
  name - The object name of the MBean. May be null. The ObjectInstance for the registered MBean.
exception:
  InstanceAlreadyExistsException - The MBean is alreadyunder the control of the MBean server.
exception:
  MBeanRegistrationException - The preRegister(MBeanRegistration interface) method of theMBean has thrown an exception. The MBean will not be registered.
exception:
  NotCompliantMBeanException - This object is not a JMX compliant MBean.
exception:
  RuntimeOperationsException - Wraps ajava.lang.IllegalArgumentException:The object passed in parameter is nullor no object name is specified.



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 notificationsemitted by the registered MBean. This method will removeall the information related to this listener.
exception:
  InstanceNotFoundException - The MBean name provideddoes not match any of the registered MBeans.
exception:
  ListenerNotFoundException - The couple (listener,handback)is not registered in the MBean. The exception messagecontains either "listener", "handback" or the object namedepending on which object cannot be found.



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 thenotifications emitted by the registered MBean. This methodwill remove all the information related to this listener.
exception:
  InstanceNotFoundException - The MBean name provideddoes not match any of the registered MBeans.
exception:
  ListenerNotFoundException - The couple (listener,handback) isnot registered in the MBean. The exception messagecontains either "listener", "handback" or the object namedepending on which object cannot be found.



setAttribute
public void setAttribute(ObjectName name, Attribute attribute) throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException(Code)
Sets the value of a specific attribute of a named MBean. The MBean is identified by its object name.
Parameters:
  name - The name of the MBean within which the attribute is to be set.
Parameters:
  attribute - The identification of the attribute to be set andthe value it is to be set to. The value of the attribute that has been set.
exception:
  InstanceNotFoundException - The MBean specified isnot registered in the MBean server.
exception:
  AttributeNotFoundException - The attribute specified isnot accessible in the MBean.
exception:
  InvalidAttributeValueException - The value specified forthe attribute is not valid.
exception:
  MBeanException - Wraps an exception thrown by the MBean's setter.
exception:
  ReflectionException - Wraps a java.lang.Exceptionthrown when trying to invoke the setter.
exception:
  RuntimeOperationsException - Wraps ajava.lang.IllegalArgumentException:The object name in parameter is nullor the attribute in parameter is null.



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 attributesare to be 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 isnot registered in the MBean server.
exception:
  ReflectionException - An exception occurred when trying toinvoke the getAttributes method of a Dynamic MBean.
exception:
  RuntimeOperationsException - Wraps ajava.lang.IllegalArgumentException:The object name in parameter is nullor attributes in parameter is null.



unregisterMBean
public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException(Code)
De-registers 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.
Parameters:
  name - The object name of the MBean to be de-registered.
exception:
  InstanceNotFoundException - The MBean specified isnot registered in the MBean server.
exception:
  MBeanRegistrationException - The preDeregister((MBeanRegistration interface) method ofthe MBean has thrown an exception.
exception:
  RuntimeOperationsException - Wraps ajava.lang.IllegalArgumentException:The object name in parameter is nullor the MBean you are when trying to de-register is thejavax.management.MBeanServerDelegate MBeanServerDelegate MBean.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.