Java Doc for MBeanServerImpl.java in  » JMX » XMOJO » com » adventnet » jmx » 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 » com.adventnet.jmx 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.adventnet.jmx.MBeanServerImpl

MBeanServerImpl
public class MBeanServerImpl implements MBeanServer(Code)
This is the implementation class for MBean manipulation on the agent side. It contains the necessary methods 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.
version:
   C_VERSION



Constructor Summary
public  MBeanServerImpl()
    
public  MBeanServerImpl(String defaultDomain)
    

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 a MBean with the MBeanServer. The MBean server will use the default loader repository to load the class of the MBean.
public  ObjectInstancecreateMBean(String className, ObjectName name, Object[] params, String[] signature)
     Instantiates and registers a MBean with the MBeanServer. The MBean server will use the default loader repository to load the class of the MBean.
public  ObjectInstancecreateMBean(String className, ObjectName name, ObjectName loaderName)
     Instantiates and registers a MBean with the MBeanServer. The class loader to be used is identified by its object name.
public  ObjectInstancecreateMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature)
     Instantiates and registers a MBean with the MBeanServer.
public  java.io.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  java.io.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:
  name - The name of the class whose class loader should be usedfor the de-serialization.
Parameters:
  data - The byte array to be de-sererialized.
public  java.io.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. The MBean is identified by its object name.
Parameters:
  name - The object name of the MBean from which theattribute is to be retrieved.
Parameters:
  attribute - A String specifying the name of theattribute to be retrieved.
public  AttributeListgetAttributes(ObjectName name, String[] attributes)
     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 theattributes are to be retrieved.
Parameters:
  attributes - A list of the attributes to be retrieved.
public  StringgetDefaultDomain()
     Returns the default domain used for the MBean naming.
public  HashtablegetLoaderTable()
     Returns the table that has the loader references os the mbeans.
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  ObjectgetObjectInClassLoader(ObjectName name, byte[] entityBody)
     This method de-serializes an object in the context of a given MBean class loader.
Parameters:
  name - The name of the MBean which defines the class loader
Parameters:
  entityBody - The byte array to be de-sererialized.
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 in the MBeanServer.
public  Objectinstantiate(String className, Object[] params, String[] signature)
     Instantiates an object using the list of all class loaders registered in the MBeanServer.
public  Objectinstantiate(String className, ObjectName loaderName)
     Instantiates an object using the class Loader specified by its ObjectName. If the loader name is null, the system ClassLoader will be used.
public  Objectinstantiate(String className, ObjectName loaderName, Object[] params, String[] signature)
     Instantiates an object.
public  Objectinvoke(ObjectName name, String actionName, Object[] params, String[] signature)
     Invokes an action on an MBean.
Parameters:
  name - The object name of the MBean on which the method is to be invoked.
Parameters:
  actionName - The name of the action to be invoked.
Parameters:
  params - An array containing the parameters to be set when the action is invoked
Parameters:
  signature - An array containing the signature of the action.The class objects will be loaded using the same class loaderas the one used for loading the MBean on which the action was invoked.
public  booleanisInSameClassLoader(ObjectName name, Object object)
     This method checks if an object has been loaded in the context of a MBean class loader.
Parameters:
  name - The name of the MBean which defines the class loader
Parameters:
  object - The object to check.
public  booleanisInstanceOf(ObjectName name, String className)
     Returns true if the MBean specified is an instance of the specified class, false otherwise.
Parameters:
  name - The object name of the MBean to be checked.
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 MBeanServer.
Parameters:
  name - The object name of the MBean to be checked.
public  SetqueryMBeans(ObjectName name, QueryExp query)
     Gets MBeans controlled by the MBeanServer.
public  SetqueryNames(ObjectName name, QueryExp query)
     Gets the names of MBeans controlled by the MBeanServer. 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).
public  ObjectInstanceregisterMBean(Object object, ObjectName name)
     Registers a pre-existing object as an MBean with the MBeanServer. If the object name given is null, the MBean may automatically provide its own name by implementing the MBeanRegistration interface. The call returns the MBean name.
Parameters:
  object - The Java Bean to be registered as an MBean.
Parameters:
  name - The object name of the MBean.
public  voidremoveNotificationListener(ObjectName name, NotificationListener listener)
    
public  voidremoveNotificationListener(ObjectName name, ObjectName listener)
     Enables a listener for an MBean to be removed.
Parameters:
  name - The name of the MBean on which the listener should be removed
Parameters:
  listener - The listener name which will handles notificationsemitted by the registered MBean.
public  voidsetAttribute(ObjectName name, Attribute attribute)
     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 tobe set and the value it is to be set to.
public  AttributeListsetAttributes(ObjectName name, AttributeList attributes)
     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 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.
public  voidunregisterMBean(ObjectName name)
     De-registers an MBean from the MBeanServer.


Constructor Detail
MBeanServerImpl
public MBeanServerImpl()(Code)
Default Constructor



MBeanServerImpl
public MBeanServerImpl(String defaultDomain)(Code)
Creates an MBeanServer with the specified default domain name.*




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 a notificationis emitted.
exception:
  javax.management.InstanceNotFoundException - The MBean namedoesn't correspond to a registered MBean.
exception:
  java.lang.IllegalArgumentException - The object with name "name"doesn't implements NotificationBroadcaster
exception:
  javax.management.InstanceAlreadyExistsException - The couple(listener,handback) is already registered in the 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.
exception:
  java.lang.IllegalArgumentException - The object with name "name"doesn't implements NotificationBroadcaster
exception:
  javax.management.InstanceAlreadyExistsException - The couple(listener,handback) is already registered in the MBean.



createMBean
public ObjectInstance createMBean(String className, ObjectName name) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException(Code)
Instantiates and registers a MBean with the MBeanServer. The MBean server will use the 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 MBeanRegistration interface. The call returns a reference to the new instance and its object name.
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 classname of the newly instantiated MBean.
exception:
  javax.management.ReflectionException - Wraps Wraps aClassNotFoundException or a java.lang.Exception thatoccured trying to invoke the MBean's constructor.
exception:
  javax.management.InstanceAlreadyExistsException - The MBean isalready under the control of the MBeanServer.
exception:
  javax.management.MBeanRegistrationException - The preRegister(MBeanRegistration interface) method of the MBean hasthrown an exception. The MBean will not be registered.
exception:
  javax.management.MBeanException - The constructor of theMBean has thrown an exception
exception:
  javax.management.NotCompliantMBeanException - This class isnot an JMX compliant MBean



createMBean
public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException(Code)
Instantiates and registers a MBean with the MBeanServer. The MBean server will use the 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 MBeanRegistration interface. The call returns a reference to the new instance and its object name.
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 constructorto be invoked.
Parameters:
  signature - An array containing the signature of the constructorto be invoked. An ObjectInstance, containing the ObjectName and the Java classname of the newly instantiated MBean.
exception:
  javax.management.ReflectionException - Wraps Wraps aClassNotFoundException or a java.lang.Exception thatoccured trying to invoke the MBean's constructor.
exception:
  javax.management.InstanceAlreadyExistsException - The MBean isalready under the control of the MBeanServer.
exception:
  javax.management.MBeanRegistrationException - The preRegister(MBeanRegistration interface) method of the MBean hasthrown an exception. The MBean will not be registered.
exception:
  javax.management.MBeanException - The constructor of the MBeanhas thrown an exception



createMBean
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException(Code)
Instantiates and registers a MBean with the MBeanServer. 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 system ClassLoader will be used.If the MBean's object name given is null, the MBean can automatically provide its own name by implementing the MBeanRegistration interface. The call returns a reference to the new instance and its object name.
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 classname of the newly instantiated MBean.
exception:
  javax.management.InstanceAlreadyExistsException - The MBean isalready under the control of the MBeanServer.
exception:
  javax.management.MBeanRegistrationException - The preRegister(MBeanRegistration interface) method of the MBean hasthrown an exception. The MBean will not be registered.
exception:
  javax.management.MBeanException - The constructor of the MBeanhas thrown an exception
exception:
  javax.management.NotCompliantMBeanException - This class is notan JMX compliant MBean
exception:
  javax.management.InstanceNotFoundException - The specified classloader is not registered in the MBeanServer.



createMBean
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, RuntimeMBeanException, NotCompliantMBeanException, InstanceNotFoundException(Code)
Instantiates and registers a MBean with the MBeanServer. 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 system ClassLoader will be used.If the MBean object name given is null, the MBean can automatically provide its own name by implementing the MBeanRegistration interface. The call returns a reference to the new instance and its object name.
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 constructorto be invoked.
Parameters:
  signature - An array containing the signature of the constructorto be invoked.
Parameters:
  loaderName - The object name of the class loader to be used. An ObjectInstance, containing the ObjectName and the Java classname of the newly instantiated MBean.
exception:
  javax.management.ReflectionException - Wraps Wraps aClassNotFoundException or a java.lang.Exception thatoccured trying to invoke the MBean's constructor.
exception:
  javax.management.InstanceAlreadyExistsException - The MBean isalready under the control of the MBeanServer.
exception:
  javax.management.MBeanRegistrationException - The preRegister(MBeanRegistration interface) method of the MBean has thrownan exception. The MBean will not be registered.
exception:
  javax.management.MBeanException - The constructor of the MBeanhas thrown an exception



deserialize
public java.io.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:
  javax.management.InstanceNotFoundException - The MBeanspecified is not found.
exception:
  javax.management.OperationsException - Any of the usualInput/Output related exceptions.



deserialize
public java.io.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:
  name - 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:
  javax.management.OperationsException - Any of the usualInput/Output related exceptions.
exception:
  javax.management.ReflectionException - The specified class couldnot be loaded by the default loader repository



deserialize
public java.io.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:
  name - The name of the class whose class loader should be usedfor the de-serialization.
Parameters:
  data - The byte array to be de-sererialized.
Parameters:
  loaderName - The name of the class loader to be used for loadingthe specified class. If null, the MBean Server'sclass loader will be used. The de-serialized object stream.
exception:
  javax.management.InstanceNotFoundException - The specifiedclass loader MBean is not found.
exception:
  javax.management.OperationsException - Any of the usualInput/Output related exceptions.
exception:
  javax.management.ReflectionException - The specified classcould not be loaded 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 theattribute is to be retrieved.
Parameters:
  attribute - A String specifying the name of theattribute to be retrieved. The value of the retrieved attribute.
exception:
  javax.management.AttributeNotFoundException - Thespecified attribute is not accessible in the MBean.
exception:
  javax.management.MBeanException - Wraps an exceptionthrown by the MBean's getter.
exception:
  javax.management.InstanceNotFoundException - Thespecified MBean is not registered in the MBeanServer.
exception:
  javax.management.ReflectionException - Wraps anjava.lang.Exception thrown while trying to invoke the setter.



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 theattributes are to be retrieved.
Parameters:
  attributes - A list of the attributes to be retrieved. The list of the retrieved attributes.
exception:
  javax.management.InstanceNotFoundException - Thespecified MBean is not registered in the MBeanServer.



getDefaultDomain
public String getDefaultDomain()(Code)
Returns the default domain used for the MBean naming.



getLoaderTable
public Hashtable getLoaderTable()(Code)
Returns the table that has the loader references os the mbeans. Used by the package access class.



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. When flatten is false, inherited attributes are not returned.
Parameters:
  name - The name of the MBean to analyze An instance of MBeanInfo allowing to retrieve all attributesand operations of this MBean.
exception:
  java.beans.IntrospectionException - An exceptionoccurs during introspection.
exception:
  javax.management.InstanceNotFoundException - The specifiedMBean is not found.



getObjectInClassLoader
public Object getObjectInClassLoader(ObjectName name, byte[] entityBody) throws InstanceNotFoundException, ClassNotFoundException, java.io.OptionalDataException, java.io.IOException(Code)
This method de-serializes an object in the context of a given MBean class loader.
Parameters:
  name - The name of the MBean which defines the class loader
Parameters:
  entityBody - The byte array to be de-sererialized. The de-serializaed object. Null can be returned if entityBodyis null or has no element(length to zero).
exception:
  javax.management.InstanceNotFoundException - The specifiedMBean is not found.
exception:
  java.lang.ClassNotFoundException - The object which has to bedeserialized is not found the context the the MBean class loader
exception:
  java.io.OptionalDataException - Primitive data was found inthe stream instead of objects.
exception:
  java.io.IOException - Any of the usual Input/Output relatedexceptions.



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:
  javax.management.InstanceNotFoundException - The MBean specifiedis 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 in the MBeanServer. It returns a reference to the newly created object.
Parameters:
  className - The class name of the object to be instantiated. The newly instantiated object.
exception:
  javax.management.ReflectionException - Wraps aClassNotFoundException or the java.lang.Exception thatoccured trying to invoke the object's constructor.
exception:
  javax.management.MBeanException - The constructor of the objecthas thrown an exception



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 in the MBeanServer. The call returns a reference to the newly created object.
Parameters:
  className - The class name of the object to be instantiated.
Parameters:
  params - An array containing the parameters of the constructorto be invoked.
Parameters:
  signature - An array containing the signature of the constructorto be invoked. The newly instantiated object.
exception:
  javax.management.ReflectionException - Wraps aClassNotFoundException or the java.lang.Exception thatoccured trying to invoke the object's constructor.
exception:
  javax.management.MBeanException - The constructor of the objecthas thrown an exception



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 system ClassLoader will be used. It returns a reference to the new created object.
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:
  javax.management.ReflectionException - Wraps aClassNotFoundException or the java.lang.Exceptionthat occured trying to invoke the object's constructor.
exception:
  javax.management.MBeanException - The constructor of theobject has thrown an exception.
exception:
  javax.management.InstanceNotFoundException - The specifiedclass loader is not registered in the MBeanServer.



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 system ClassLoader will be used. The call returns a reference to the newly created object.
Parameters:
  className - The class name of the object to be instantiated.
Parameters:
  params - An array containing the parameters of the constructorto be invoked.
Parameters:
  signature - An array containing the signature of the constructorto be invoked.
Parameters:
  loaderName - The object name of the class loader to be used. The newly instantiated object.
exception:
  javax.management.ReflectionException - Wraps aClassNotFoundException or the java.lang.Exception thatoccured trying to invoke the object's constructor.
exception:
  javax.management.MBeanException - The constructor of the object hasthrown an exception
exception:
  javax.management.InstanceNotFoundException - The specified classloader is not registered in the MBeanServer.



invoke
public Object invoke(ObjectName name, String actionName, Object[] params, String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException(Code)
Invokes an action on an MBean.
Parameters:
  name - The object name of the MBean on which the method is to be invoked.
Parameters:
  actionName - The name of the action to be invoked.
Parameters:
  params - An array containing the parameters to be set when the action is invoked
Parameters:
  signature - An array containing the signature of the action.The class objects will be loaded using the same class loaderas the one used for loading the MBean on which the action was invoked. The object returned by the action, which represents the resultof invoking the action on the specified MBean.
exception:
  javax.management.InstanceNotFoundException - Thespecified MBean is not registered in the MBeanServer.
exception:
  javax.management.MBeanException - Wraps an exceptionthrown by the MBean's invoked method.
exception:
  javax.management.ReflectionException - Wraps anjava.lang.Exception thrown while trying to invoke the method.



isInSameClassLoader
public boolean isInSameClassLoader(ObjectName name, Object object) throws InstanceNotFoundException(Code)
This method checks if an object has been loaded in the context of a MBean class loader.
Parameters:
  name - The name of the MBean which defines the class loader
Parameters:
  object - The object to check. True if the object as been loaded in the context of the MBeanclass loader ; false if not. of this MBean.
exception:
  javax.management.InstanceNotFoundException - The specifiedMBean is not found.



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 object name of the MBean to be checked.
Parameters:
  className - The name of the class. true if the MBean is the 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 MBeanServer.
Parameters:
  name - The object name of the MBean to be checked. true if the MBean is already controlled by the MBeanServer,false otherwise.



queryMBeans
public Set queryMBeans(ObjectName name, QueryExp query)(Code)
Gets MBeans controlled by the MBeanServer. 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 empty, 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 orempty all the MBeans registeredwill be retrieved.
Parameters:
  query - The query expression to 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 MBeanServer. 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 empty, all objects are to be 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 MBean namesto be retrieved. If null or empty, the name of allregistered MBeans will be retrieved.
Parameters:
  query - The query expression to 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 MBeanServer. If the object name given is null, the MBean may automatically provide its own name by implementing the MBeanRegistration interface. The call returns the MBean name.
Parameters:
  object - The Java Bean 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:
  javax.management.InstanceAlreadyExistsException - The MBeanis already under the control of the MBeanServer.
exception:
  javax.management.MBeanRegistrationException - The preRegister(MBeanRegistration interface) method of the MBean hasthrown an exception. The MBean will not be registered.
exception:
  javax.management.NotCompliantMBeanException - This object isnot an JMX compliant MBean



removeNotificationListener
public void removeNotificationListener(ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException(Code)

exception:
  java.lang.IllegalArgumentException - The object with name "name"doesn't implements NotificationBroadcaster



removeNotificationListener
public void removeNotificationListener(ObjectName name, ObjectName listener) throws InstanceNotFoundException, ListenerNotFoundException(Code)
Enables a listener for an MBean to be removed.
Parameters:
  name - The name of the MBean on which the listener should be removed
Parameters:
  listener - The listener name which will handles notificationsemitted by the registered MBean. This method will removeall information related to this listener.
exception:
  javax.management.InstanceNotFoundException - The MBean name orthe listener name doesn't correspond to a registered MBean
exception:
  javax.management.ListenerNotFoundException - The couple(listener,handback) is not registered in the MBean. Theexception message contains either "listener", "handback" orthe object name depending on which object cannot be found.
exception:
  java.lang.IllegalArgumentException - The object with name "name"doesn't implements NotificationBroadcaster or the objectwith name "listener" doesn't implements NotificationListener.The faulty ObjectName string representation can be obtainedby means of the getMessage() method of theIllegalArgumentException object.



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 tobe set and the value it is to be set to. The value of the attribute that has been set.
exception:
  javax.management.InstanceNotFoundException - Thespecified MBean is not registered in the MBeanServer.
exception:
  javax.management.AttributeNotFoundException - Thespecified attribute is not accessible in the MBean.
exception:
  javax.management.InvalidAttributeValueException - Thespecified value for the attribute is not valid.
exception:
  javax.management.MBeanException - Wraps an exceptionthrown by the MBean's setter.
exception:
  javax.management.ReflectionException - Wraps anjava.lang.Exception thrown while trying to invoke the setter.



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 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:
  javax.management.InstanceNotFoundException - The specifiedMBean is not registered in the MBeanServer.



unregisterMBean
public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException(Code)
De-registers an MBean from the MBeanServer. 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:
  javax.management.InstanceNotFoundException - Thespecified MBean is not registered in the MBeanServer.
exception:
  javax.management.MBeanRegistrationException - ThepreDeregister (MBeanRegistration interface) method of theMBean has thrown an exception.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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