com.ibm.websphere.management

Class JMXManageableSupport

  1. java.lang.Object
  2. extended bycom.ibm.websphere.management.JMXManageableSupport
All implemented interfaces:
JMXManageable

  1. public class JMXManageableSupport
  2. extends java.lang.Object
  3. 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

Modifier and Type Field and Description
  1. protected
  2. javax.management.modelmbean.ModelMBean
modelMBean
  1. protected
  2. long
sequenceNumber

Constructor Summary

Constructor and Description
JMXManageableSupport()

Method Summary

Modifier and Type Method and Description
  1. java.util.Properties
getMBeanProperties()
Provides additional customer-defined key properties to be added to the key property list of the ObjectName for the MBean.
  1. 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.
  1. java.lang.String
getType()
Returns the MBean type for the MBean instance to be created.
  1. void
sendNotification(javax.management.Notification ntfyObj)
Built-in helper function to allow sub-class to send any Notification through its associated ModelMBean.
  1. void
sendNotification(java.lang.String type)
Built-in helper function to allow sub-class to simplify sending declared Notifications only using the notification type.
  1. 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

  1. protected javax.management.modelmbean.ModelMBean modelMBean

sequenceNumber

  1. protected long sequenceNumber

Constructor Detail

JMXManageableSupport

  1. public JMXManageableSupport()

Method Detail

getType

  1. 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

  1. 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:
See Also:
javax.management.ObjectName

getModelMBean

  1. 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

  1. 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

  1. public void sendNotification(java.lang.String type)
  2. throws javax.management.MBeanException
  3. 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

  1. public void sendNotification(javax.management.Notification ntfyObj)
  2. throws javax.management.MBeanException
  3. 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