Java Doc for MBeanServer.java in  » JMX » jfoxmx » 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 » jfoxmx » javax.management 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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  voidaddNotificationListener(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  voidaddNotificationListener(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  ObjectInstancecreateMBean(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  ObjectInstancecreateMBean(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  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.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  ObjectInstancecreateMBean(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  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  ClassLoadergetClassLoader(ObjectName loaderName)
    

Return the named java.lang.ClassLoader .


Parameters:
  loaderName - The ObjectName of the ClassLoader.
public  ClassLoadergetClassLoaderFor(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  ClassLoaderRepositorygetClassLoaderRepository()
    

Return the ClassLoaderRepository for this MBeanServer.

public  StringgetDefaultDomain()
     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  IntegergetMBeanCount()
     Returns the number of MBeans registered in the MBean server.
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  Objectinstantiate(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  Objectinstantiate(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  Objectinstantiate(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  Objectinstantiate(String className, ObjectName loaderName, Object params, String signature)
     Instantiates an object.
public  Objectinvoke(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  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.
public  voidremoveNotificationListener(ObjectName name, ObjectName listener)
     Enables to remove a listener from a registered MBean.
public  voidremoveNotificationListener(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  voidremoveNotificationListener(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  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 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.



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 is to be retrieved.
Parameters:
  attribute - A String specifying the name of the attribute to beretrieved. The value of the retrieved attribute.
exception:
  AttributeNotFoundException - The attribute specified is not accessible in the MBean.
exception:
  MBeanException - Wraps an exception thrown by the MBean's getter.
exception:
  InstanceNotFoundException - The MBean specified is not registered in the MBean server.
exception:
  ReflectionException - Wraps a java.lang.Exception thrown when trying to invoke the setter.
exception:
  RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The object name in parameter is null orthe 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 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.



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 retrieval of all attributes and operationsof this MBean.
exception:
  IntrospectionException - An exception occurs during introspection.
exception:
  InstanceNotFoundException - The MBean specified is not found.
exception:
  ReflectionException - An exception occurred when trying to 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 the MBean specified by name.
exception:
  InstanceNotFoundException - The MBean specified is not 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.



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 MBean that has been registered.
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:
  NotCompliantMBeanException - This object is not a JMX compliant MBean
exception:
  RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The object passed in parameter is null orno 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 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



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 and the value it is to be set to.
exception:
  InstanceNotFoundException - The MBean specified is not registered in the MBean server.
exception:
  AttributeNotFoundException - The attribute specified is not accessible in the MBean.
exception:
  InvalidAttributeValueException - The value specified for the attribute is not valid.
exception:
  MBeanException - Wraps an exception thrown by the MBean's setter.
exception:
  ReflectionException - Wraps a java.lang.Exception thrown when trying to invoke the setter.
exception:
  RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The object name in parameter is null orthe 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 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.



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 is not registered in the MBean server.
exception:
  MBeanRegistrationException - The preDeregister ((MBeanRegistration interface) method of the MBeanhas thrown an exception.
exception:
  RuntimeOperationsException - Wraps a java.lang.IllegalArgumentException: The object name in parameter is null orthe MBean you are when trying to de-register is the javax.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.