Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.mfwk.cms.model.opstatus
Class OperationalStatusMfModel

    java.lang.Object
      com.sun.mfwk.cms.model.opstatus.OperationalStatusMfModel

All Implemented Interfaces:
  ByClassesGenericModel, java.util.EventListener, GenericModel, javax.management.NotificationListener, OperationalStatusGenericModel, javax.management.QueryExp, java.io.Serializable

public class OperationalStatusMfModel
extends java.lang.Object
implements OperationalStatusGenericModel, javax.management.NotificationListener, javax.management.QueryExp

This class defines the interface between the monitoring jobs and the data model. It provides facilities to :

- retrieve the observable class names, objectnames and associated attributes
- collect data for both CIB and J2EE data model
- check that a given ObjectName instance is compliant with the CIB or J2EE naming rules

See Also:
  Serialized Form

Constructor Summary
`OperationalStatusMfModel()`

Method Summary
`boolean` | `apply(javax.management.ObjectName on)` A QueryExp implementation to recover the supportedObservaleObjects from the MBeanServer.
`boolean` | `getCIBData(javax.management.ObjectName objectName, CIBMonitoredObjectElement monitoredObjectElement)` Return true if the given CIBMonitoredObject has changes since last call; false otherwise.
`boolean` | `getJ2EEData(javax.management.ObjectName objectName, J2EEMonitoredObjectElement monitoredObjectElement)` Return true if the given J2EEMonitoredObject has changes since last call; false otherwise.
`PerformanceAttributeDescriptor[]` | `getObservableAttributes(java.lang.String observableObjectClassName)` Returns an array of hard coded list of attribute descriptors (may be empty).
`ObservableObjectClassIterator` | `getObservableObjectClasses()` Returns all supported observed object class names that provide states for the CIB model or the JSR77 model.
`ObservableObjectIterator` | `getObservableObjects(java.lang.String observableObjectClassName, javax.management.ObjectName pattern)` Returns the supported observable object instances of the specific object class that are matching the given JMX pattern.
`int[]` | `getSupportedGranularities(java.lang.String classname)` Returns an array of predefined supported granularities.
`javax.management.ObjectName[]` | `getSupportedObservableObjects(javax.management.ObjectName[] objectNames)` Returns all or a subset of the given ObjectNames that are supported.
`void` | `handleNotification(javax.management.Notification notification, java.lang.Object handback)` Keep caches up to date with MBean registerations and unregisterations.
`boolean` | `isMatchingNamingRules(javax.management.ObjectName objectName)` Returns true if the given objectName matches the supported pattern; false otherwise.
`java.lang.String` | `isOfClass(javax.management.ObjectName objectName, java.lang.String[] classNames)` Checks if a monitored object identified by its ObjectName is of a given class.
`boolean` | `isValidClass(java.lang.String className)` Always return true.
`void` | `setMBeanServer(javax.management.MBeanServer s)` Sets the MBean server on which the query is to be performed.
`void` | `setMBS(javax.management.MBeanServer server)` `setMBS` is 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

### OperationalStatusMfModel

    public OperationalStatusMfModel()

Method Detail

### setMBS

    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.

  Specified by:
    `setMBS` in interface `GenericModel`
  Parameters:
    `server` - the MBeanServer to be used for queries.
  Throws:
    `java.lang.IllegalArgumentException` - Is raised if the input parameter is null.

### getCIBData

    public boolean getCIBData(javax.management.ObjectName objectName,
                              CIBMonitoredObjectElement monitoredObjectElement)
                       throws java.lang.IllegalStateException

  Return true if the given CIBMonitoredObject has changes since last call; false otherwise.

  Specified by:
    `getCIBData` in interface `OperationalStatusGenericModel`
  Parameters:
    `objectName` - an ObjectName instance that identifies the desired monitored object within the MBeanServer.
    `monitoredObjectElement` - the element that holds intern attribute values.
  Returns:
    true if the given CIBMonitoredObject has changes since last call; false otherwise.
  Throws:
    `java.lang.IllegalStateException` - raised when the monitored object is not a state provider or unreachable.

### getJ2EEData

    public boolean getJ2EEData(javax.management.ObjectName objectName,
                               J2EEMonitoredObjectElement monitoredObjectElement)

  Return true if the given J2EEMonitoredObject has changes since last call; false otherwise.

  Specified by:
    `getJ2EEData` in interface `OperationalStatusGenericModel`
  Parameters:
    `objectName` - an ObjectName instance that identifies the desired monitored object within the MBeanServer.
    `monitoredObjectElement` - the element that holds intern attribute values.
  Returns:
    true if the given CIBMonitoredObject has changes since last call; false otherwise.

### getObservableObjectClasses

    public ObservableObjectClassIterator getObservableObjectClasses()

  Returns all supported observed object class names that provide states for the CIB model or the JSR77 model.

  Note : this does not mean that all classes from the CIB model will provide states, as the functionality can be disabled at any time.

  Specified by:
    `getObservableObjectClasses` in interface `GenericModel`
  Returns:
    an iterator that contains all supported observable object class names.

### getObservableAttributes

    public PerformanceAttributeDescriptor[] getObservableAttributes(java.lang.String observableObjectClassName)

  Returns an array of hard coded list of attribute descriptors (may be empty).

  Specified by:
    `getObservableAttributes` in interface `GenericModel`
  Parameters:
    `observableObjectClassName` - the class to look for.
  Returns:
    an array that contains all observable attributes (J2EE or CIB).

### getObservableObjects

    public ObservableObjectIterator getObservableObjects(java.lang.String observableObjectClassName,
                                                         javax.management.ObjectName pattern)
                                                  throws java.lang.IllegalArgumentException

  Returns the supported observable object instances of the specific object class that are matching the given JMX pattern.

  Specified by:
    `getObservableObjects` in interface `GenericModel`
  Parameters:
    `observableObjectClassName` - the class name of the observable object instances to be found.
    `pattern` - The JMX pattern to use for searching for observable objects.
  Returns:
    an iterator that contains all supported observable objects.
  Throws:
    `javax.oss.IllegalArgumentException` - Is raised if the input parameters are not valid.
    `java.lang.IllegalArgumentException` - Is raised if the input parameters are not valid.

### getSupportedGranularities

    public int[] getSupportedGranularities(java.lang.String classname)

  Returns an array of predefined supported granularities.

  Specified by:
    `getSupportedGranularities` in interface `GenericModel`
  Parameters:
    `classname` - a useless parameter as returned granularities are statics.
  Returns:
    an array of supported granularities.

### getSupportedObservableObjects

    public javax.management.ObjectName[] getSupportedObservableObjects(javax.management.ObjectName[] objectNames)

  Returns all or a subset of the given ObjectNames that are supported.

  Specified by:
    `getSupportedObservableObjects` in interface `GenericModel`
  Parameters:
    `objectNames` - array of String representing potential supported ObjectNames.
  Returns:
    ObjectName as String that are supported.

### handleNotification

    public void handleNotification(javax.management.Notification notification,
                                   java.lang.Object handback)

  Keep caches up to date with MBean registerations and unregisterations.

  Specified by:
    `handleNotification` in interface `javax.management.NotificationListener`
  Parameters:
    `notification` - the notification from the MBeanServer delegate.
    `handback` - optional handback object.

### isMatchingNamingRules

    public boolean isMatchingNamingRules(javax.management.ObjectName objectName)

  Returns true if the given objectName matches the supported pattern; false otherwise.

  Specified by:
    `isMatchingNamingRules` in interface `GenericModel`
  Parameters:
    `objectName` - the ObjectName to examine.
  Returns:
    true if the given objectName match the supported pattern; false otherwise.

### isOfClass

    public java.lang.String isOfClass(javax.management.ObjectName objectName,
                                      java.lang.String[] classNames)

  Checks if a monitored object identified by its ObjectName is of a given class.

  Specified by:
    `isOfClass` in interface `ByClassesGenericModel`
  Parameters:
    `objectName` - the object name of the desired monitored object.
    `classNames` - a list of class names that could potentialy match the class name of the monitored object.
  Returns:
    the class name of the designated monitored object in the match case; false otherwise.

### isValidClass

    public boolean isValidClass(java.lang.String className)

  Always return true.

  Specified by:
    `isValidClass` in interface `ByClassesGenericModel`
  Parameters:
    `className` - the class name to check.
  Returns:
    true.

### apply

    public boolean apply(javax.management.ObjectName on)

  A QueryExp implementation to recover the supportedObservaleObjects from the MBeanServer.

  Specified by:
    `apply` in interface `javax.management.QueryExp`
  Parameters:
    `on` - the ObjectName instance to check.
  Returns:
    true if the given object name is CIB or J2EE naming compliant; false otherwise.

### setMBeanServer

    public void setMBeanServer(javax.management.MBeanServer s)

  Sets the MBean server on which the query is to be performed.

  Specified by:
    `setMBeanServer` in interface `javax.management.QueryExp`
  Parameters:
    `s` - The MBean server on which the query is to be performed.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD