javax.management.openmbean

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » management » javax.management.openmbean 
javax.management.openmbean
javax.management.openmbean package

Provides the open data types and Open MBean descriptor classes. An Open MBean is an MBean where the types of attributes and of operation parameters and return values are built using a small set of predefined Java classes. Open MBeans facilitate operation with remote management programs that do not necessarily have access to application-specific types, including non-Java programs.

Every MBean has an {@link javax.management.MBeanInfo MBeanInfo} with information about the MBean itself, and its attributes, operations, constructors, and notifications. In an Open MBean, this MBeanInfo implements the {@link javax.management.openmbean.OpenMBeanInfo OpenMBeanInfo} interface, usually by being an instance of {@link javax.management.openmbean.OpenMBeanInfoSupport OpenMBeanInfoSupport}.

The attribute information returned by {@link javax.management.MBeanInfo#getAttributes() MBeanInfo.getAttributes} for an Open MBean is an array of objects implementing {@link javax.management.openmbean.OpenMBeanAttributeInfo OpenMBeanAttributeInfo}, usually instances of {@link javax.management.openmbean.OpenMBeanAttributeInfoSupport OpenMBeanAttributeInfoSupport}. In addition to the usual information about attributes, an OpenMBeanAttributeInfo specifies the {@link javax.management.openmbean.OpenType OpenType} of the attribute. The possible OpenType values are predefined, which is what ensures that remote managers will understand them.

Similar remarks apply to the parameter types of operations and constructors, and to the return types of operations.

There is a distinction between an attribute's Java language type, as returned by {@link javax.management.MBeanAttributeInfo#getType() getType()}, and its OpenType, as returned by {@link javax.management.openmbean.OpenMBeanAttributeInfo#getOpenType() getOpenType()}. For example, if the Java language type is java.lang.String, the OpenType will be {@link javax.management.openmbean.SimpleType#STRING SimpleType.String}. If the Java language type is {@link javax.management.openmbean.CompositeData}, the OpenType will be a {@link javax.management.openmbean.CompositeType CompositeType} that describes the items in the CompositeData instances for the attribute.

Default values and constraints

In Open MBeans, attributes and parameters can have default values and/or constraints associated with them in the {@code OpenMBeanAttributeInfo} or {@code OpenMBeanParameterInfo}. There are two ways to specify these constraints. Either the values are directly specified as parameters to one of the constructors of {@code OpenMBeanAttributeInfoSupport} or {@code OpenMBeanParameterInfoSupport}, for example {@link javax.management.openmbean.OpenMBeanParameterInfoSupport#OpenMBeanParameterInfoSupport( String, String, OpenType, Object, Object[])}; or the values are specified in a {@link javax.management.Descriptor Descriptor} given as a parameter to one of the constructors.

When a {@code Descriptor} is used, the fields of interest are these:

  • {@code defaultValue} defines the value returned by {@link javax.management.openmbean.OpenMBeanParameterInfo#getDefaultValue() getDefaultValue()};
  • {@code minValue} defines the value returned by {@link javax.management.openmbean.OpenMBeanParameterInfo#getMinValue() getMinValue()};
  • {@code maxValue} defines the value returned by {@link javax.management.openmbean.OpenMBeanParameterInfo#getMaxValue() getMaxValue()};
  • {@code legalValues} defines the values returned by {@link javax.management.openmbean.OpenMBeanParameterInfo#getLegalValues() getLegalValues()}.

For {@code defaultValue}, {@code minValue}, and {@code maxValue}, the associated value must either be of the Java type corresponding to {@code openType}, or be a string that can be converted into that type. The conversion uses the static method {@code valueOf(String)} if it finds one; otherwise a constructor with a single {@code String} parameter if it finds one; otherwise it fails.

For {@code legalValues}, the associated value must be either an array or a {@code Set}, and the elements of the array or set must be convertible as described for {@code defaultValue} etc.

The following conditions must be met for these fields:

  • the values must be of the appropriate type, or be strings that can be converted to the appropriate type as explained above;
  • if {@code legalValues} is present then neither {@code minValue} nor {@code maxValue} must be present;
  • if {@code defaultValue} is present then it must satisfy the constraints defined by {@code legalValues}, {@code minValue}, or {@code maxValue} when any of these is also present;
  • if {@code minValue} and {@code maxValue} are both present then {@code minValue} must not be greater than {@code maxValue}.
@see Java SE 6 Platform documentation on JMX technology, in particular the JMX Specification, version 1.4 @since 1.5
Java Source File NameTypeComment
ArrayType.javaClass The ArrayType class is the open type class whose instances describe all open data values which are n-dimensional arrays of open data values.
CompositeData.javaInterface The CompositeData interface specifies the behavior of a specific type of complex open data objects which represent composite data structures.
CompositeDataInvocationHandler.javaClass

An InvocationHandler that forwards getter methods to a CompositeData .

CompositeDataSupport.javaClass The CompositeDataSupport class is the open data class which implements the CompositeData interface.
CompositeDataView.javaInterface

A Java class can implement this interface to indicate how it is to be converted into a CompositeData by the MXBean framework.

A typical way to use this class is to add extra items to the CompositeData in addition to the ones that are declared in the CompositeType supplied by the MXBean framework.

CompositeType.javaClass The CompositeType class is the open type class whose instances describe the types of CompositeData CompositeData values.
InvalidKeyException.javaClass This runtime exception is thrown to indicate that a method parameter which was expected to be an item name of a composite data or a row index of a tabular data is not valid.
InvalidOpenTypeException.javaClass This runtime exception is thrown to indicate that the open type of an open data value is not the one expected.
KeyAlreadyExistsException.javaClass This runtime exception is thrown to indicate that the index of a row to be added to a tabular data instance is already used to refer to another row in this tabular data instance.
OpenDataException.javaClass This checked exception is thrown when an open type, an open data or an open MBean metadata info instance could not be constructed because one or more validity constraints were not met.
OpenMBeanAttributeInfo.javaInterface

Describes an attribute of an open MBean.

This interface declares the same methods as the class javax.management.MBeanAttributeInfo .

OpenMBeanAttributeInfoSupport.javaClass Describes an attribute of an open MBean.
OpenMBeanConstructorInfo.javaInterface

Describes a constructor of an Open MBean.

This interface declares the same methods as the class javax.management.MBeanConstructorInfo .

OpenMBeanConstructorInfoSupport.javaClass Describes a constructor of an Open MBean.
OpenMBeanInfo.javaInterface

Describes an Open MBean: an Open MBean is recognized as such if its javax.management.DynamicMBean.getMBeanInfogetMBeanInfo() method returns an instance of a class which implements the OpenMBeanInfo interface, typically OpenMBeanInfoSupport .

This interface declares the same methods as the class javax.management.MBeanInfo .

OpenMBeanInfoSupport.javaClass The OpenMBeanInfoSupport class describes the management information of an open MBean: it is a subclass of javax.management.MBeanInfo , and it implements the OpenMBeanInfo interface.
OpenMBeanOperationInfo.javaInterface

Describes an operation of an Open MBean.

This interface declares the same methods as the class javax.management.MBeanOperationInfo .

OpenMBeanOperationInfoSupport.javaClass Describes an operation of an Open MBean.
OpenMBeanParameterInfo.javaInterface

Describes a parameter used in one or more operations or constructors of an open MBean.

This interface declares the same methods as the class javax.management.MBeanParameterInfo .

OpenMBeanParameterInfoSupport.javaClass Describes a parameter used in one or more operations or constructors of an open MBean.
OpenType.javaClass The OpenType class is the parent abstract class of all classes which describe the actual open type of open data values.

An open type is defined by:

  • the fully qualified Java class name of the open data values this type describes; note that only a limited set of Java classes is allowed for open data values (see OpenType.ALLOWED_CLASSNAMES_LIST ALLOWED_CLASSNAMES_LIST ),
  • its name,
  • its description.
<
Parameters:
  T - > the Java type that instances described by this type musthave.
SimpleType.javaClass The SimpleType class is the open type class whose instances describe all open data values which are neither arrays, nor CompositeData CompositeData values, nor TabularData TabularData values.
TabularData.javaInterface The TabularData interface specifies the behavior of a specific type of complex open data objects which represent tabular data structures.
TabularDataSupport.javaClass The TabularDataSupport class is the open data class which implements the TabularData and the Map interfaces, and which is internally based on a hash map data structure.
TabularType.javaClass The TabularType class is the open type class whose instances describe the types of TabularData TabularData values.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.