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


java.lang.Object
   javax.management.MBeanInfo
      javax.management.modelmbean.ModelMBeanInfoSupport

ModelMBeanInfoSupport
public class ModelMBeanInfoSupport extends MBeanInfo implements ModelMBeanInfo,Serializable(Code)
This class represents the meta data for ModelMBeans. Descriptors have been added on the meta data objects.

Java resources wishing to be manageable instatiate the ModelMBean using the MBeanServer's createMBean method. The resource then sets the ModelMBeanInfo and Descriptors for the ModelMBean instance. The attributes and operations exposed via the ModelMBeanInfo for the ModelMBean are accessible from Mbeans, connectors/adapters like other MBeans. Through the Descriptors, values and methods in the managed application can be defined and mapped to attributes and operations of the ModelMBean. This mapping can be defined during development in a file or dynamically and programmatically at runtime.

Every ModelMBean which is instantiated in the MBeanServer becomes manageable: its attributes and operations become remotely accessible through the connectors/adaptors connected to that MBeanServer. A Java object cannot be registered in the MBeanServer unless it is a JMX compliant MBean. By instantiating a ModelMBean, resources are guaranteed that the MBean is valid. MBeanException and RuntimeOperationsException must be thrown on every public method. This allows for wrappering exceptions from distributed communications (RMI, EJB, etc.)
author:
   Young Yang




Constructor Summary
public  ModelMBeanInfoSupport(ModelMBeanInfo mbeanInfo)
     constructs a ModelMBeanInfoSupport which is a duplicate of the one passed in.
public  ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications)
     Creates a ModelMBeanInfoSupport with the provided information, but the descriptor is a default.
public  ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications, Descriptor descriptor)
     Creates a ModelMBeanInfoSupport with the provided information, but the descriptor is a default.
Parameters:
  className - - classname of ModelMBeanInfo
Parameters:
  description - - human readable description of the ModelMBean
Parameters:
  attributes - - array of ModelMBeanAttributeInfo objects which have descriptors
Parameters:
  constructors - - array of ModelMBeanConstructorInfo objects which have descriptor
Parameters:
  operations - - array of ModelMBeanOperationInfo objects which have descriptor
Parameters:
  notifications - - array of ModelMBeanNotificationInfo objects which have descriptor
Parameters:
  descriptor - - descriptor to be used as the MBeanDescriptor containing mbean wide policy.

Method Summary
public  Objectclone()
     returns a new ModelMBeanInfoSupport object that is a copy of this ModelMBeanInfoSupport.
public  ModelMBeanAttributeInfogetAttribute(String name)
     Returns a ModelMBeanAttributeInfo requested by name.
public  MBeanAttributeInfo[]getAttributes()
     Returns the list of attributes exposed for management as ModelMBeanAttributeInfo objects.
public  ModelMBeanConstructorInfogetConstructor(String name)
     Returns a ModelMBeanConstructorInfo requested by name.
public  MBeanConstructorInfo[]getConstructors()
     Returns the list of constructors exposed for management as ModelMBeanConstructorInfo objects.
public  DescriptorgetDescriptor(String descriptorName)
     Returns a Descriptor requested by name
Parameters:
  descriptorName - The name of the descriptor.
public  DescriptorgetDescriptor(String descriptorName, String descriptorType)
     Returns a Descriptor requested by name and descriptorType.
Parameters:
  descriptorName - The name of the descriptor.
Parameters:
  descriptorType - The type of the descriptor being requested.
public  Descriptor[]getDescriptors(String descriptionType)
     Returns a DescriptorList.
public  DescriptorgetMBeanDescriptor()
     Returns the ModelMBean's descriptor which contains mbean wide policies.
public  ModelMBeanNotificationInfogetNotification(String name)
     Returns a ModelMBeanNotificationInfo requested by name.
public  MBeanNotificationInfo[]getNotifications()
     Returns the list of notifications exposed for management as ModelMBeanNotificationInfo objects.
public  ModelMBeanOperationInfogetOperation(String name)
     Returns a ModelMBeanOperationInfo requested by name.
public  MBeanOperationInfo[]getOperations()
     Returns the list of operations exposed for management as ModelMBeanOperationInfo objects.
public  voidsetDescriptor(Descriptor descriptor, String descriptorType)
     Adds or replaces a descriptor in the ModelMBeanInfoSupport.
Parameters:
  descriptor - The descriptor to be set in the ModelMBean.If the descriptor to be set is null, no sets will be done.All descriptors must have name and descriptorType fields.
Parameters:
  descriptorType - The type of the descriptor being requested.
public  voidsetDescriptors(Descriptor[] descriptors)
     Adds or replaces descriptors in all the ModelMBeanInfoSupport for the ModelMBean.
Parameters:
  descriptors - The descriptors to be set in the ModelMBean.All descriptors must have name and descriptorType fields and be valid.If the descriptor list is empty, no sets will occur.
public  voidsetMBeanDescriptor(Descriptor descriptor)
     Sets the ModelMBean's descriptor.


Constructor Detail
ModelMBeanInfoSupport
public ModelMBeanInfoSupport(ModelMBeanInfo mbeanInfo)(Code)
constructs a ModelMBeanInfoSupport which is a duplicate of the one passed in.
Parameters:
  mbeanInfo - - the ModelMBeanInfo instance from which the ModelMBeanInfobeing created is initialized.



ModelMBeanInfoSupport
public ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications)(Code)
Creates a ModelMBeanInfoSupport with the provided information, but the descriptor is a default. The default descriptor is: name=mbeanName,descriptorType=mbean, displayName=this.getClassName(), persistPolicy=never,log=F,export=F,visiblity=1
Parameters:
  className - - classname of ModelMBeanInfo
Parameters:
  description - - human readable description of the ModelMBean
Parameters:
  attributes - - array of ModelMBeanAttributeInfo objects which have descriptors
Parameters:
  constructors - - array of ModelMBeanConstructorInfo objects which have descriptor
Parameters:
  operations - - array of ModelMBeanOperationInfo objects which have descriptor
Parameters:
  notifications - - array of ModelMBeanNotificationInfo objects which have descriptor



ModelMBeanInfoSupport
public ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications, Descriptor descriptor)(Code)
Creates a ModelMBeanInfoSupport with the provided information, but the descriptor is a default.
Parameters:
  className - - classname of ModelMBeanInfo
Parameters:
  description - - human readable description of the ModelMBean
Parameters:
  attributes - - array of ModelMBeanAttributeInfo objects which have descriptors
Parameters:
  constructors - - array of ModelMBeanConstructorInfo objects which have descriptor
Parameters:
  operations - - array of ModelMBeanOperationInfo objects which have descriptor
Parameters:
  notifications - - array of ModelMBeanNotificationInfo objects which have descriptor
Parameters:
  descriptor - - descriptor to be used as the MBeanDescriptor containing mbean wide policy. if thedescriptor is invalid or null, a default descriptor will be constructed.The default descriptor is: name=mbeanName,descriptorType=mbean,displayName=this.getClassName(), persistPolicy=never,log=F,export=F,visiblity=1.If the descriptor does not contain all these fields, they will be added with these default values.




Method Detail
clone
public Object clone()(Code)
returns a new ModelMBeanInfoSupport object that is a copy of this ModelMBeanInfoSupport.



getAttribute
public ModelMBeanAttributeInfo getAttribute(String name) throws MBeanException, RuntimeOperationsException(Code)
Returns a ModelMBeanAttributeInfo requested by name.
Parameters:
  name - The name of the ModelMBeanAttributeInfo to get.
exception:
  MBeanException - Wraps another exception
exception:
  RuntimeOperationsException - Wraps another exception for invalid attributename or ModelMBeanAttributeInfo to be returned.



getAttributes
public MBeanAttributeInfo[] getAttributes()(Code)
Returns the list of attributes exposed for management as ModelMBeanAttributeInfo objects. This method signature must specify MBeanAttributeInfo to be compliant with the the DynamicMBean interface. MBeanAttributeInfo object array.



getConstructor
public ModelMBeanConstructorInfo getConstructor(String name) throws MBeanException, RuntimeOperationsException(Code)
Returns a ModelMBeanConstructorInfo requested by name.



getConstructors
public MBeanConstructorInfo[] getConstructors()(Code)
Returns the list of constructors exposed for management as ModelMBeanConstructorInfo objects. This method signature must specify MBeanConstructorInfo to be compliant with the the DynamicMBean interface. MBeanConstructorInfo object array.



getDescriptor
public Descriptor getDescriptor(String descriptorName) throws MBeanException, RuntimeOperationsException(Code)
Returns a Descriptor requested by name
Parameters:
  descriptorName - The name of the descriptor. Descriptor containing the descriptor for the ModelMBean with the same name and descriptorType.
exception:
  MBeanException - Wraps another exception
exception:
  RuntimeOperationsException - Wraps another exception



getDescriptor
public Descriptor getDescriptor(String descriptorName, String descriptorType) throws MBeanException, RuntimeOperationsException(Code)
Returns a Descriptor requested by name and descriptorType.
Parameters:
  descriptorName - The name of the descriptor.
Parameters:
  descriptorType - The type of the descriptor being requested. If this is nulla RuntimeOperationsException will be thrown.Type must match that in the 'descriptorType' field on the Descriptor. It must be "mbean","attribute", "operation", or "notification". Descriptor containing the descriptor for the ModelMBean with the same name and descriptorType.
exception:
  MBeanException - Wraps another exception
exception:
  RuntimeOperationsException - Wraps another exception



getDescriptors
public Descriptor[] getDescriptors(String descriptionType) throws MBeanException, RuntimeOperationsException(Code)
Returns a DescriptorList. It contains all Descriptors for the ModelMBean including the attributeDescriptors, operationDescriptors, and notificationDescriptors. Descriptor array containing all descriptors for the ModelMBean
exception:
  MBeanException - Wraps another exception
exception:
  RuntimeOperationsException - Wraps another exception



getMBeanDescriptor
public Descriptor getMBeanDescriptor() throws MBeanException, RuntimeOperationsException(Code)
Returns the ModelMBean's descriptor which contains mbean wide policies. This descriptor contains metadata about the MBean and default policies for persistence and caching.

 The fields in the descriptor are defined, but not limited to, the following:
 name           : mbean name
 descriptorType : must be "mbean"
 displayName    : name of attribute to be used in displays
 persistPolicy  : OnUpdate|OnTimer|NoMoreOftenThan|Always|Never
 persistLocation : The fully qualified directory name where the MBean should be persisted (if appropriate)
 persistFile    : File name into which the MBean should be persisted
 persistPeriod  : seconds - frequency of persist cycle for OnTime and NoMoreOftenThan PersistPolicy
 persistLocation : directory name in which to store mbeans that support the PersistentMBean interface
 currencyTimeLimit : how long value is valid, <0 never, =0 always, >0 seconds
 log            : where t: log all notifications f: log no notifications
 logfile        : fully qualified filename to log events to
 visibility     : 1-4 where 1: always visible 4: rarely visible
 export         : name to be used to export/expose this MBean so that it is findable by
 other JMX Agents.
 presentationString : xml formatted string to allow presentation of data to be associated with the MBean.
 

The default descriptor is: name=mbeanName,descriptorType=mbean, displayName=this.getClassName(), persistPolicy=never,log=F,export=F,visiblity=1 If the descriptor does not contain all these fields, they will be added with these default values.
exception:
  MBeanException - Wraps another exception
exception:
  RuntimeOperationsException - Wraps another exception




getNotification
public ModelMBeanNotificationInfo getNotification(String name) throws MBeanException, RuntimeOperationsException(Code)
Returns a ModelMBeanNotificationInfo requested by name.
Parameters:
  name - The name of the ModelMBeanNotificationInfo to get.
exception:
  MBeanException - Wraps another exception
exception:
  RuntimeOperationsException - Wraps another exception



getNotifications
public MBeanNotificationInfo[] getNotifications()(Code)
Returns the list of notifications exposed for management as ModelMBeanNotificationInfo objects. This method signature must specify MBeanNotificationInfo to be compliant with the the DynamicMBean interface. MBeanNotificationInfo object array.



getOperation
public ModelMBeanOperationInfo getOperation(String name) throws MBeanException, RuntimeOperationsException(Code)
Returns a ModelMBeanOperationInfo requested by name.
Parameters:
  name - The name of the ModelMBeanOperationInfo to get.
exception:
  MBeanException - Wraps another exception
exception:
  RuntimeOperationsException - Wraps another exception for invalid attributename or ModelMBeanAttributeInfo to be returned.



getOperations
public MBeanOperationInfo[] getOperations()(Code)
Returns the list of operations exposed for management as ModelMBeanOperationInfo objects. This method signature must specify MBeanOperationInfo to be compliant with the the DynamicMBean interface. MBeanOperationInfo object array.



setDescriptor
public void setDescriptor(Descriptor descriptor, String descriptorType) throws MBeanException, RuntimeOperationsException(Code)
Adds or replaces a descriptor in the ModelMBeanInfoSupport.
Parameters:
  descriptor - The descriptor to be set in the ModelMBean.If the descriptor to be set is null, no sets will be done.All descriptors must have name and descriptorType fields.
Parameters:
  descriptorType - The type of the descriptor being requested. If this is null thenthe value of the 'descriptorType' field in the inDescriptor will be used.Type must match that in the 'descriptorType' field on the Descriptor. It must be "mbean","attribute", "operation", or "notification".
exception:
  RuntimeOperationsException - Wraps exceptions for illegal or null arguments



setDescriptors
public void setDescriptors(Descriptor[] descriptors) throws MBeanException, RuntimeOperationsException(Code)
Adds or replaces descriptors in all the ModelMBeanInfoSupport for the ModelMBean.
Parameters:
  descriptors - The descriptors to be set in the ModelMBean.All descriptors must have name and descriptorType fields and be valid.If the descriptor list is empty, no sets will occur. If it is null, an exceptionwill be thrown. Null elements of the list will be ignored.
exception:
  RuntimeOperationsException - Wraps exceptions for illegal or null arguments



setMBeanDescriptor
public void setMBeanDescriptor(Descriptor descriptor) throws MBeanException, RuntimeOperationsException(Code)
Sets the ModelMBean's descriptor. This descriptor contains default, mbean wide metadata about the MBean and default policies for persistence and caching. This operation does a complete replacement of the descriptor, no merging is done. If the descriptor to set to is invalid then the existing or default descriptor will be preserved. The default descriptor is: name=mbeanName,descriptorType=mbean, displayName=this.getClassName(), persistPolicy=never,log=F,export=F,visiblity=1 If the descriptor does not contain all these fields, they will be added with these default values. See getMBeanDescriptor method javadoc for description of valid field names.
exception:
  MBeanException - Wraps another exception
exception:
  RuntimeOperationsException - Wraps another exception for bad descriptor.



Methods inherited from javax.management.MBeanInfo
public Object clone()(Code)(Java Doc)
public boolean equals(Object o)(Code)(Java Doc)
public MBeanAttributeInfo[] getAttributes()(Code)(Java Doc)
public String getClassName()(Code)(Java Doc)
public MBeanConstructorInfo[] getConstructors()(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
public Descriptor getDescriptor()(Code)(Java Doc)
public MBeanNotificationInfo[] getNotifications()(Code)(Java Doc)
public MBeanOperationInfo[] getOperations()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public String toString()(Code)(Java Doc)

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.