| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sun.mfwk.cms.model.measurement.PerformanceMfModel
The PerformanceMfModel class is an implentation of the
 com.sun.management.oss.impl.model.measurement.PerformanceGenericModel.
 
 This implementation allows to plug the Monitoring Framework CIB data model and
 JSR-77 data model into
 the com.sun.management.oss.impl.factory.measurement.JmxJVTPerformanceMonitorSession
 factory/jobs layer. Using this implementation, the com.sun.management.oss.impl.factory.measurement
 factory is able to create/manage measurement jobs that directly interact with
 the CIB/JSR-77 objects instanciated in the same JMX context of the factory.
 
Here is a description of how this implementation works and what it allows the factory to monitor:
 Observable objects:
 This implementation allows 4 types of CIB (Core information base) objects to be monitored (i.e: you
 can create measurement jobs on 4 types of CIB objects). The observable CIB objects
 are the ones that expose open statistics (i.e: have the getOpenStats
 method) that is:
 
 
 This implementation also allows the JSR-77 (Java 2 Platform, Enterprise Edition Management Specification)
 MBeans (monitored objects) to be monitored. These objects are:
 
For an MBean to be monitorable, his ObjectName must:
For JSR-77 objects:
For CIB objects:
 Observable classes:
 The observable classes that are considered by this implementation are real Java
 classes, including the full package name of the class. Any object instance of a Java class having the
 getOpenStats() method and matching the naming rules described in
 the Observable objects section is a monitorable object.
 
For instance, if the ObjectName "msgCP_module:type=CIBProduct.CIBApplication,name=MSG_SRV_instance1084877186031,CIBProduct=MSG_SRV" corresponds to an instance of the "com.sun.mfwk.cib.CIBApplication" class, you can create a 'by classes' job on the "com.sun.mfwk.cib.CIBApplication" class and this object will be taken into account by the job.
To sum up: the observable classes set is the Java classes set of the objects instanciated with an ObjectName matching the naming rules.
 Observable attributes:
 Considering the MBeans (ObjectName) supported by this implentation (matching the
 previous naming rules), the set of the observable attributes supported by this
 implementation is made of (for either J2EE or CIB objects):
 
 
 These attributes form a subset of every possible values you can get from the
 MBeans: only the attributes of a type defined in
 com.sun.management.oss.pm.measurement.com.sun.management.oss.pm.measurement
 are considered. The supported simple types are (as a reminder):
 
 
What we call simple attributes are the attributes of the MBean with a simple type, that is, the attributes you can retrieve with a simple getter. For instance if the MBean has a getter getFoo() which returns an object of a supported simple type. Then the "foo" attribute is monitorable.
 This implementation will also handle only the attributes contained in the open
 statistics (retieved with getOpenStats) if they are of a
 supported simple type.
 
 Observable attributes naming:
 Let's take an exemple for a better understanding of the monitorable attribute
 naming rules. Considering the object of class "com.sun.mfwk.cib.CIBResource" with the
 ObjectName
 "storeCP_module:type=CIBProduct.CIBApplication.CIBResource,name=STORE,CIBProduct=STORE_SRV,CIBApplication=STORE_SRV_instance1084891119618",
 here is a list of every monitorable attributes of this object:
 
Open statistics:
 A dotted attribute notation (e.g: "OperationTime.StartTime") represents the leaf
 of the open statistic whose name is "OperationTime". Only one level (one dot
 character) is supported in the implementation as far as the open statistics are
 conserned. If you want to create a job that retrieves the "OperationTime.StartTime"
 attribute of the MBean, use a PerformanceAttributeDescriptor that
 has "OperationTime.StartTime" as name and PerformanceAttributeDescriptor.LONG as type
 (java.lang.Long).
 
 To specify every attributes of an open statistic, you can use the open statistic
 name. For instance, using a PerformanceAttributeDescriptor that
 has "OperationTime" as name and PerformanceAttributeDescriptor.COMPOSITE_DATA as type
 (special type for open statistics), you will get every simple attributes under
 the "OperationTime" open statistic that is:
 
 If you use a non dotted notation and you use any type other than the special one
 PerformanceAttributeDescriptor.COMPOSITE_DATA, you specify a simple
 attribute. Exemple: using a PerformanceAttributeDescriptor that
 has "AvailabilityStatusDegradedTime" as name and
 PerformanceAttributeDescriptor.LONG as type
 (java.lang.Long), you will get the value of the simple
 "AvailabilityStatusDegradedTime" attribute in your reports.
 
 Granularities:
 The CIB and JSR-77 data models do not have particular limits regarding the supported
 granularities. The getSupportedGranularities method is however
 implemented, returning a large number of possible second values. This method is
 useless as the JmxJVTOperationalStatusMonitorSession currently allows the
 usage of any strictly positive value as far as the granularity is concerned.
 
 Important dynamicity aspects:
 Considering the following methods:
 
 
getObservableObjectClasses
 isOfClass
 getObservableObjects
 getSupportedObservableObjects
 getObservableAttributes
 hasPerformanceAttributes
 getData
 getSupportedObservableClasses will return no classes while no
 supported CIB/JSR-77 objects are instanciated in the MBeanServer.
 This is mainly due to the fact that we want every classes (that could be created by a component product team inheriting from one of the classes we support) to be monitorable with the current implementation: no classes/object names/attribute names have been hardcoded in this implementation.
However, if you know by advance a correct class/ObjectName/attribute name, you can create a job on it and the job will be able to work properly once the observed entity is instanciated in the MBeanServer.
Copyright (c) 2004 Sun Microsystems
com.sun.management.oss.impl.model.measurement.PerformanceGenericModel| Constructor Summary | |
| PerformanceMfModel()This constructor creates a PerformanceMfModel. | |
| Method Summary | |
|  GenericObject[] | getData(javax.management.ObjectName[] dnList,
        PerformanceAttributeDescriptor[] attributesToMeasure)getDataCollects wanted attribute values for each specified
 object. | 
|  PerformanceAttributeDescriptor[] | getObservableAttributes(java.lang.String observableObjectClassName)getObservableAttributeswill return all observable attributes for a
 particular class. | 
|  ObservableObjectClassIterator | getObservableObjectClasses()getObservableObjectClasseswill return all observable object classes in the model. | 
|  ObservableObjectIterator | getObservableObjects(java.lang.String observableObjectClassName,
                     javax.management.ObjectName base)getObservableObjectswill return all observable objects of a certain class under a level determined by the
  base. | 
|  int[] | getSupportedGranularities(java.lang.String observableObjectClass)getSupportedGranularitieswill return an array of granularities that is supported by the supplied observable object class. | 
|  javax.management.ObjectName[] | getSupportedObservableObjects(javax.management.ObjectName[] dnList)getSupportedObservableObjectswill filter out which of the potentially observable objects are actually observable. | 
|  boolean | hasPerformanceAttributes(javax.management.ObjectName dn,
                         PerformanceAttributeDescriptor[] attributesToMeasure)Returns true if the given object has every attributes specified in attributesToMeasure. | 
|  boolean | isMatchingNamingRules(javax.management.ObjectName on)Checks if an obect is matching the naming rules of the data model. | 
|  java.lang.String | isOfClass(javax.management.ObjectName on,
          java.lang.String[] classNames)isOfClassChecks if an object is of one of the given classes. | 
|  boolean | isValidClass(java.lang.String className)Returns true if the given className is valid in this data model context. | 
|  void | setMBS(javax.management.MBeanServer server)setMBSis the first method called by the factory, after having
 instanciated its own GenericModel object. | 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public PerformanceMfModel()
PerformanceMfModel.
| Method Detail | 
public void setMBS(javax.management.MBeanServer server)
            throws java.lang.IllegalArgumentException
setMBS is the first method called by the factory, after having
 instanciated its own GenericModel object. It must be coded so that the MBeanServer is kept
 into object and used for performing necessary JMX queries.
setMBS in interface GenericModelserver - the MBeanServer to be used for queries.
java.lang.IllegalArgumentException - Is raised if the input parameter is null.
public GenericObject[] getData(javax.management.ObjectName[] dnList,
                               PerformanceAttributeDescriptor[] attributesToMeasure)
getData Collects wanted attribute values for each specified
 object.
 
 See com.sun.management.oss.impl.model.measurement.PerformanceGenericModel.getData(ObjectName[] dnList, PerformanceAttributeDescriptor[]
 attributesToMeasure).
 
See the top description of this page for knowing how data (attributes) are retrieved.
getData in interface PerformanceGenericModeldnList - The distinguished names of the objects that should be in browsed.attributesToMeasure - The attributes that are going to be collected.
public javax.management.ObjectName[] getSupportedObservableObjects(javax.management.ObjectName[] dnList)
getSupportedObservableObjects will filter out which of the potentially observable objects are actually observable.
 See the top description of this page for knowing what are the objects supported by this implementation.
getSupportedObservableObjects in interface GenericModeldnList - The distinguished names of the objects that should be browsed.
public int[] getSupportedGranularities(java.lang.String observableObjectClass)
                                throws java.lang.IllegalArgumentException
getSupportedGranularities will return an array of granularities that is supported by the supplied observable object class.
 See the top description of this page for futher information.
getSupportedGranularities in interface GenericModelobservableObjectClass - Class you want to know the supported granularities for.
java.lang.IllegalArgumentException - Is raised if an arguement has a wrong format/value.public boolean isValidClass(java.lang.String className)
See the top description of this page for the description of what is a valid class.
isValidClass in interface ByClassesGenericModelclassName - The class to check for validity.
public boolean isMatchingNamingRules(javax.management.ObjectName on)
See the top description of this page for the naming rules.
isMatchingNamingRules in interface GenericModelon - The object name to check for validity
public ObservableObjectClassIterator getObservableObjectClasses()
getObservableObjectClasses will return all observable object classes in the model.
 See the top description of this page for the description of what is an observable class.
getObservableObjectClasses in interface GenericModel
public ObservableObjectIterator getObservableObjects(java.lang.String observableObjectClassName,
                                                     javax.management.ObjectName base)
                                              throws java.lang.IllegalArgumentException
getObservableObjects will return all observable objects of a certain class under a level determined by the
  base. If base is not specified then all instances of that class are returned.
  See the top description of this page for the description of what is an observable object.
getObservableObjects in interface GenericModelobservableObjectClassName - The class name of the observable object instances to be found.base - The JMX pattern to use for searching for observable objects.
java.lang.IllegalArgumentException - Is raised if the input paramters are not valid.
public PerformanceAttributeDescriptor[] getObservableAttributes(java.lang.String observableObjectClassName)
                                                         throws java.lang.IllegalArgumentException
getObservableAttributes will return all observable attributes for a
 particular class.
 See the top description of this page for the description of what is an observable attribute.
getObservableAttributes in interface GenericModelobservableObjectClassName - The class name of the observable object instances to be found.
java.lang.IllegalArgumentException - Is raised if the input parameters are not valid.
public java.lang.String isOfClass(javax.management.ObjectName on,
                                  java.lang.String[] classNames)
                           throws java.lang.IllegalArgumentException
isOfClass Checks if an object is of one of the given classes. Returns the Class the object is of or null if
 object is not of one of the provided classes.
 See the top description of this page for the description of what is a valid class.
isOfClass in interface ByClassesGenericModelon - The object we want to know the class.classNames - The proposed classes.
java.lang.IllegalArgumentException - Is raised if the input paramters are not valid.
public boolean hasPerformanceAttributes(javax.management.ObjectName dn,
                                        PerformanceAttributeDescriptor[] attributesToMeasure)
                                 throws ObjectNotFoundException
See the top description of this page for the description of what is an observable attribute.
hasPerformanceAttributes in interface PerformanceGenericModeldn - Object name you want to check for attributes.attributesToMeasure - Attributes to check.
ObjectNotFoundException - Is raised if the object is not found.| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||