Java Doc for DescriptorSupport.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.modelmbean.DescriptorSupport

DescriptorSupport
public class DescriptorSupport implements Descriptor(Code)
This class represents the metadata set for a ModelMBean element. A descriptor is part of the ModelMBeanInfo, ModelMBeanNotificationInfo, ModelMBeanAttributeInfo, ModelMBeanConstructorInfo, and ModelMBeanParameterInfo.

A descriptor consists of a collection of fields. Each field is in fieldname=fieldvalue format. Field names are not case sensitive, case will be preserved on field values.

All field names and values are not predefined. New fields can be defined and added by any program. Some fields have been predefined for consistency of implmentation and support by the ModelMBeanInfo ModelMBean*Info, and ModelMBean classes.


author:
   Young Yang



Field Summary
 Mapdescriptor
    

Constructor Summary
public  DescriptorSupport()
    
public  DescriptorSupport(int initNumFields)
     Descriptor constructor.
public  DescriptorSupport(DescriptorSupport initDescriptor)
     Descriptor constructor taking a Descriptor as parameter. Creates a new descriptor initialized to the values of the descriptor passed in parameter.
Parameters:
  initDescriptor - the descriptor to be used to initialize the constructed descriptor.
public  DescriptorSupport(String xmlString)
     Descriptor constructor taking an XML String.
public  DescriptorSupport(String fieldNames, Object fieldValues)
     Constructor taking field names and field values.
public  DescriptorSupport(String fields)
     Constructor taking fields in the fieldName=fieldValue format.
Parameters:
  fields - String array of with each element containing a field name and value.If this array is null or empty, then the default constructor will be executed.

Method Summary
public  Objectclone()
     Returns a new Descriptor which is a duplicate of the Descriptor.
public  String[]getFieldNames()
     Returns all the fields names in the descriptor. String array of fields names.
public  ObjectgetFieldValue(String fieldName)
     returns the string value for a specific fieldname
Parameters:
  fieldName - The field name in question; if not found, null is returned.
public  Object[]getFieldValues(String[] fieldNames)
     Returns all the field values in the descriptor as an array of Objects.
public  String[]getFields()
     Returns all the fields in the descriptor String array of fields in the format fieldName=fieldValue.
public  booleanisValid()
     Returns true if fieldValues are checked to be sure they are legal for the fieldNames.
public static  voidmain(String[] args)
    
public  voidremoveField(String fieldName)
    
public  voidsetField(String fieldName, Object fieldValue)
     Sets the string value for a specific fieldname.
public  voidsetFields(String[] fieldNames, Object[] fieldValues)
     Sets all Fields in the list to the new value in with the same index in the fieldValue array.
public  StringtoString()
    
public  StringtoXMLString()
    

Field Detail
descriptor
Map descriptor(Code)




Constructor Detail
DescriptorSupport
public DescriptorSupport()(Code)



DescriptorSupport
public DescriptorSupport(int initNumFields) throws MBeanException, RuntimeOperationsException(Code)
Descriptor constructor. Takes as parameter the initial capacity of the Map that stores the descriptor fields. Capacity will grow as needed.
Parameters:
  initNumFields - The initial capacity of the Map that stores the descriptor fields.
exception:
  RuntimeOperationsException - for illegal value for maxNumFields ( <= 0)



DescriptorSupport
public DescriptorSupport(DescriptorSupport initDescriptor)(Code)
Descriptor constructor taking a Descriptor as parameter. Creates a new descriptor initialized to the values of the descriptor passed in parameter.
Parameters:
  initDescriptor - the descriptor to be used to initialize the constructed descriptor. If it isnull or contains no descriptor fields, an empty Descriptor will be created.
exception:
  RuntimeOperationsException - for illegal value for inDescr. inDescr cannot benull. If the descriptor fails for any reason, this exception will be thrown.



DescriptorSupport
public DescriptorSupport(String xmlString) throws MBeanException, RuntimeOperationsException, XMLParseException(Code)
Descriptor constructor taking an XML String. This method is part of this implementation and not required by the JMX Specification
Parameters:
  xmlString - An XML-formatted string used to populate this Descriptor.The format will be:...All fields values will be created as Strings. If the field values are not Strings,the programmer will have to reset or convert these fields correctly. Fields which are notString objects will have toString() called on them to doCreate the value.You will not be able to reconstruct these objects unless they have been specifically setupto support toString() into a meaningfull format and have a matching constructor thataccepts a String in the same format.
throws:
  MBeanException -
throws:
  RuntimeOperationsException -
throws:
  XMLParseException -



DescriptorSupport
public DescriptorSupport(String fieldNames, Object fieldValues) throws RuntimeOperationsException(Code)
Constructor taking field names and field values. The array and array elements cannot be null.
Parameters:
  fieldNames - String array of field names. No elements of this array can be null.
Parameters:
  fieldValues - Object array of the corresponding field values.Elements of the array can be null. The fieldValue must be valid for the fieldName.Note: array sizes of parameters should match. If both arrays are null or empty, thenan empty descriptor is created. No exception is thrown.
exception:
  RuntimeOperationsException - for illegal value for field URLName or field Values.The array lengths must be equal.If the descriptor construction fails for any reason, this exception will be thrown.



DescriptorSupport
public DescriptorSupport(String fields)(Code)
Constructor taking fields in the fieldName=fieldValue format.
Parameters:
  fields - String array of with each element containing a field name and value.If this array is null or empty, then the default constructor will be executed. Null stringsor empty strings will be ignored.Note: each string should be of the form fieldName=fieldValue,with no imbedded blanks or other punctuation.
exception:
  RuntimeOperationsException - for illegal value for field URLName or field Values.The field must contain an "=". "=fieldValue", "fieldName", and "fieldValue" are illegal.FieldName cannot be null. "fieldName=" will cause the value to be null.If the descriptor construction fails for any reason, this exception will be thrown.




Method Detail
clone
public Object clone() throws RuntimeOperationsException(Code)
Returns a new Descriptor which is a duplicate of the Descriptor.
exception:
  RuntimeOperationsException - for illegal value for field URLName or field Values.If the descriptor construction fails for any reason, this exception will be thrown.



getFieldNames
public String[] getFieldNames()(Code)
Returns all the fields names in the descriptor. String array of fields names. If the descriptor is empty, you will getan empty array.



getFieldValue
public Object getFieldValue(String fieldName) throws RuntimeOperationsException(Code)
returns the string value for a specific fieldname
Parameters:
  fieldName - The field name in question; if not found, null is returned. String Field value
exception:
  RuntimeOperationsException - for illegal value (null or empty string) for field URLName.



getFieldValues
public Object[] getFieldValues(String[] fieldNames)(Code)
Returns all the field values in the descriptor as an array of Objects. The retuned values are in the same order as the fieldNames String array parameter.
Parameters:
  fieldNames - String array of the names of the fields that the valuesshould be returned for. If the array is empty then an empty array will bereturned. If the array is 'null' then all values will be returned. If a fieldname in the array does not exist, then null is returned for the matching arrayelement being returned. Object array of field values. If the descriptor is empty, you will getan empty array.



getFields
public String[] getFields()(Code)
Returns all the fields in the descriptor String array of fields in the format fieldName=fieldValue. If thereare no fields in the descriptor, then String[0] is returned. If a fieldValue is anobject then the toString() method is called on it and its returned value is usedas the value for the field enclosed in parens.
exception:
  RuntimeOperationsException - for illegal value for field URLName or Values.



isValid
public boolean isValid() throws RuntimeOperationsException(Code)
Returns true if fieldValues are checked to be sure they are legal for the fieldNames. This implementation returns false if: name or descriptorType fields are null class, role, getMethod and setMethod, if defined, must not be null persistPeriod, currencyTimeLimit, lastUpdatedTimeStamp, lastReturnedTimeStamp must numerics greater than -1. iterable, log, export must be t, f, true, or false visibility must be between 1 and 4 severity must be betwen 0 and 5 persistPolicy must be OnUpdate,OnTimer,NoMoreOftenThan,Always,or Never is must not be case sensitive.
exception:
  RuntimeOperationsException - If the validity checking fails for any reason, this exception will be thrown.



main
public static void main(String[] args) throws Exception(Code)



removeField
public void removeField(String fieldName)(Code)
Removes a field from the descriptor
Parameters:
  fieldName - String name of the field to be removed.If the field is not found no exception is thrown.



setField
public void setField(String fieldName, Object fieldValue) throws RuntimeOperationsException(Code)
Sets the string value for a specific fieldname. The value must be valid for the field. If the field does not exist, it is added. if it does exist, the value is replaced. fieldName: The field name to be set. Must not be null or empty string. fieldValue: The field value to be set for the field name. Can be null.
exception:
  RuntimeOperationsException - for illegal value for field URLName.



setFields
public void setFields(String[] fieldNames, Object[] fieldValues) throws RuntimeOperationsException(Code)
Sets all Fields in the list to the new value in with the same index in the fieldValue array. Array sizes must match. The field value will be validated before it is set. If it is not valid, then an exception will be thrown. If the arrays are empty, then no change will take effect.
Parameters:
  fieldNames - String array of field names. The array and array elements cannot be null.
Parameters:
  fieldValues - Object array of the corresponding field values. The array cannot be null.Elements of the array can be null.
exception:
  RuntimeOperationsException - for illegal value for field URLName or field Values.Niether can be null. The array lengths must be equal.If the descriptor construction fails for any reason, this exception will be thrown.



toString
public String toString()(Code)



toXMLString
public String toXMLString()(Code)



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.