com.ibm.websphere.management

Class JMXManageableSupport

  • java.lang.Object
    • com.ibm.websphere.management.JMXManageableSupport
  • All Implemented Interfaces:
    JMXManageable


    public class JMXManageableSupport
    extends java.lang.Object
    implements JMXManageable
    The JMXManageableSupport class provides default implementation of JMXManageable interface that a CustomService implementation may choose to implement in order to indicate that it can be managed as a JMX MBean. On top of JMXManageable interface's automatic management of WebSphere JMX administration system as a CustomService, it also allows user provided managed resource (object) code to have a direct hook to ModelMBean handle which can be used to send notifications & also access other ModelMBean APIs without having to find the matching ModelMBean through the MBeanServer API.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected javax.management.modelmbean.ModelMBean modelMBean 
      protected long sequenceNumber 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.util.Properties getMBeanProperties()
      Provides additional customer-defined key properties to be added to the key property list of the ObjectName for the MBean.
      javax.management.modelmbean.ModelMBean getModelMBean()
      Returns this managed resource's ModelMBean in order to allow sub-class of JMXManageableSupport class to have access to its associated ModelMBean.
      java.lang.String getType()
      Returns the MBean type for the MBean instance to be created.
      void sendNotification(javax.management.Notification ntfyObj)
      Built-in helper function to allow sub-class to send any Notification through its associated ModelMBean.
      void sendNotification(java.lang.String type)
      Built-in helper function to allow sub-class to simplify sending declared Notifications only using the notification type.
      void setModelMBean(javax.management.modelmbean.ModelMBean srcModelMBean)
      Allows WebSphere JMX admin system to bind associated ModelMBean to this managed resource's modelMBean.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • modelMBean

        protected javax.management.modelmbean.ModelMBean modelMBean
      • sequenceNumber

        protected long sequenceNumber
    • Constructor Detail

      • JMXManageableSupport

        public JMXManageableSupport()
    • Method Detail

      • getType

        public java.lang.String getType()
        Returns the MBean type for the MBean instance to be created.

        This type information is used by the WebSphere admin system to load the proper MBean Descriptor in order to define the attributes, operations, and notifications for the MBean.

        The WebSphere admin system will first check whether this type is one of the predefined types shipped with the WebSphere product. If the type is one of the predefined ones, the MBean Descriptor shipped with WebSphere is loaded and used. Otherwise, the admin will attempt to locate an MBeanExtensionProvider configured to support this type of MBean and will load the MBean Descriptor from that MBeanExtensionProvider configuration.

        If the JMXManageable implementation returns null from this method, the class name of the implementation will be used as the type.

        Specified by:
        getType in interface JMXManageable
      • getMBeanProperties

        public java.util.Properties getMBeanProperties()
        Provides additional customer-defined key properties to be added to the key property list of the ObjectName for the MBean.

        Note that in distributed environment, all ObjectNames have at least cell, node, process, type and mbeanIdentifier key properties.

        Specified by:
        getMBeanProperties in interface JMXManageable
        See Also:
        javax.management.ObjectName
      • getModelMBean

        public javax.management.modelmbean.ModelMBean getModelMBean()
        Returns this managed resource's ModelMBean in order to allow sub-class of JMXManageableSupport class to have access to its associated ModelMBean. If a null is returned then modelMBean has not been properly bound to this managed object.
        See Also:
        ModelMBean
      • setModelMBean

        public final void setModelMBean(javax.management.modelmbean.ModelMBean srcModelMBean)
        Allows WebSphere JMX admin system to bind associated ModelMBean to this managed resource's modelMBean.
        See Also:
        ModelMBean
      • sendNotification

        public void sendNotification(java.lang.String type)
                              throws javax.management.MBeanException,
                                     javax.management.RuntimeOperationsException
        Built-in helper function to allow sub-class to simplify sending declared Notifications only using the notification type. It uses input type, this obj handle, and internal sequenceNumber to generate a new Notification object which is then sent using modelMBean (through its ModelMBeanNotificationBroadcaster interface).
        Throws:
        javax.management.MBeanException
        javax.management.RuntimeOperationsException
        See Also:
        ModelMBean
      • sendNotification

        public void sendNotification(javax.management.Notification ntfyObj)
                              throws javax.management.MBeanException,
                                     javax.management.RuntimeOperationsException
        Built-in helper function to allow sub-class to send any Notification through its associated ModelMBean.
        Throws:
        javax.management.MBeanException
        javax.management.RuntimeOperationsException
        See Also:
        ModelMBean
IBM WebSphere Application ServerTM
Release 8.5