javax.management.modelmbean
Class RequiredModelMBean

java.lang.Object
  |
  +--javax.management.modelmbean.RequiredModelMBean
Direct Known Subclasses:
JMXSnmpProxyModelMBean, RequiredModelMBeanExt

public class RequiredModelMBean
extends java.lang.Object
implements ModelMBean, MBeanRegistration, NotificationEmitter

This class is the implementation of a ModelMBean. An appropriate implementation of a ModelMBean must be shipped with every JMX Agent and the class must be named RequiredModelMBean.

Java resources wishing to be manageable instatiate the RequiredModelMBean using the MBeanServer's createMBean method. The resource then sets the MBeanInfo and Descriptors for the RequiredModelMBean instance. The attributes and operations exposed via the ModelMBeanInfo for the ModelMBean are accessible from Mbeans, connectors/adapters like other MBeans. Through the Descriptors, values and methods in the managed application can be defined and mapped to attributes and operations of the ModelMBean. This mapping can be defined in an XML formatted file or dynamically and programmatically at runtime.

Every RequiredModelMBean which is instantiated in the MBeanServer becomes manageable: its attributes and operations become remotely accessible through the connectors/adaptors connected to that MBeanServer. A Java object cannot be registered in the MBeanServer unless it is a JMX compliant MBean. By instantiating a RequiredModelMBean, resources are guaranteed that the MBean is valid. MBeanException and RuntimeOperatiosException must be thrown on every public method. This allows for wrappering exceptions from distributed communications (RMI, EJB, etc.)


Inner Class Summary
(package private)  class RequiredModelMBean.UpdateTimer
           
 
Field Summary
(package private)  java.util.Hashtable adsValueTable
           
(package private)  NotificationBroadcasterSupport attrbroadcaster
           
(package private)  java.util.Hashtable attrFilterMapTable
           
(package private)  java.lang.Class clazz
          The Class object of the instrumentation
(package private)  java.lang.String confDirName
          The directory specifying where the conf file resides
(package private)  java.lang.String confFile
          The complete path ...
(package private)  java.lang.String confFileName
          The configuration file name which has the list of persistent information of mbeans.
(package private)  java.util.Hashtable confFileTable
          The table that hols the persistent mbeans info as specified in the conf file
(package private)  ModelMBeanInfo mbeanInfo
          The mbean information of this mbean
(package private)  NotificationBroadcasterSupport notifbroadcaster
           
(package private)  java.lang.String[] notiffields1
           
(package private)  java.lang.String[] notiffields2
           
(package private)  java.lang.Object object
          The actual instrumentaton object.
(package private)  java.lang.String objectType
          The actual instrumentaton object type.
(package private)  java.io.PrintStream prints
           
(package private)  boolean registered
           
 
Constructor Summary
RequiredModelMBean()
          Constructs an RequiredModelMBean with an empty ModelMBeanInfo.
RequiredModelMBean(ModelMBeanInfo mbi)
          Constructs a RequiredModelMBean object using ModelMBeanInfo passed in.
 
Method Summary
 void addAttributeChangeNotificationListener(NotificationListener inlistener, java.lang.String inAttributeName, java.lang.Object inhandback)
          Registers an object which implements the NotificationListener interface as a listener for AttributeChangeNotifications.
 void addNotificationListener(NotificationListener listener, NotificationFilter filter, java.lang.Object handback)
          Enables a couple (listener,handback) for a registered MBean to be added.
 java.lang.Object getAttribute(java.lang.String attribute)
          Gets the value of a specific attribute of this MBean.
(package private)  java.lang.Object getAttribute(java.lang.String attribute, boolean isFromServer)
          Gets the value of a specific attribute of this MBean.
 AttributeList getAttributes(java.lang.String[] attributes)
          Enables the values of several attributes of this MBean.
protected  ClassLoaderRepository getClassLoaderRepository()
          Return the Class Loader Repository used to perform class loading.
 MBeanInfo getMBeanInfo()
          This method discovers the attributes and operations this MBean exposes for management.
 MBeanNotificationInfo[] getNotificationInfo()
          Returns a NotificationInfo object containing the name of the Java class of the notification and the notification types sent.
 java.lang.Object invoke(java.lang.String opNameDet, java.lang.Object[] opArgsDet, java.lang.String[] sigDet)
          Invokes a method on or through a RequiredModelMBean and returns the result of the method execution.
 void load()
          Locates the MBean in a persistent store and primes this instance of the MBean with the stored values.Any currently set values are overwritten.
 void postDeregister()
          Allows the MBean to perform any operations needed after having been unregistered in the MBean server.
 void postRegister(java.lang.Boolean registrationDone)
          Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.
 void preDeregister()
          Allows the MBean to perform any operations it needs before being unregistered by the MBean server.
 ObjectName preRegister(MBeanServer server, ObjectName name)
          Allows the MBean to perform any operations it needs before being registered in the MBean server.
 void removeAttributeChangeNotificationListener(NotificationListener inlistener, java.lang.String inAttributeName)
          Removes a listener for attributeChangeNotifications from the MBean.
(package private)  void removeAttributeChangeNotificationListener(NotificationListener inlistener, java.lang.String inAttributeName, NotificationFilter filter, java.lang.Object handback)
          Removes a listener for attributeChangeNotifications from the MBean.
 void removeNotificationListener(NotificationListener listener)
          Enables a listener for an MBean to be removed.
 void removeNotificationListener(NotificationListener listener, NotificationFilter filter, java.lang.Object handback)
          Enables a listener for an MBean to be removed.
 void sendAttributeChangeNotification(Attribute inOldVal, Attribute inNewVal)
          Sends an attributeChangeNotification which contains the old value and new value for the attribute to the registered AttributeChangeNotification listeners on the ModelMBean.
 void sendAttributeChangeNotification(AttributeChangeNotification ntfyObj)
          Sends an attributeChangeNotification which is passed in to the registered attributeChangeNotification listeners on the ModelMBean.
 void sendNotification(Notification ntfyObj)
          Sends a Notification which is passed in to the registered Notification listeners on the ModelMBean as a jmx.modelmbean.general notification.
 void sendNotification(java.lang.String ntfyText)
          Sends a Notification which contains the text string that is passed in to the registered Notification listeners on the ModelMBean.
 void setAttribute(Attribute attribute)
          Sets the value of a specific attribute of this MBean.
 AttributeList setAttributes(AttributeList attributes)
          Sets the values of several attributes of this MBean.
 void setManagedResource(java.lang.Object mr, java.lang.String mr_type)
          Sets the instance handle of the object against which to execute all methods in this ModelMBean management interface (MBeanInfo and Descriptors).
 void setModelMBeanInfo(ModelMBeanInfo mbi)
          Initializes a ModelMBean object using ModelMBeanInfo passed in.
 void store()
          Writes the MBean in a persistent store.Should only be called by the RequiredModelMBean class to store itself according to persistence policy for the MBean.When used,it may be called with every setAttribute or on a periodic basis.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

object

java.lang.Object object
The actual instrumentaton object.

objectType

java.lang.String objectType
The actual instrumentaton object type.

clazz

java.lang.Class clazz
The Class object of the instrumentation

mbeanInfo

ModelMBeanInfo mbeanInfo
The mbean information of this mbean

confFileName

java.lang.String confFileName
The configuration file name which has the list of persistent information of mbeans.

confDirName

java.lang.String confDirName
The directory specifying where the conf file resides

confFile

java.lang.String confFile
The complete path ...

registered

boolean registered

confFileTable

java.util.Hashtable confFileTable
The table that hols the persistent mbeans info as specified in the conf file

adsValueTable

java.util.Hashtable adsValueTable

notifbroadcaster

NotificationBroadcasterSupport notifbroadcaster

attrbroadcaster

NotificationBroadcasterSupport attrbroadcaster

attrFilterMapTable

java.util.Hashtable attrFilterMapTable

notiffields1

java.lang.String[] notiffields1

notiffields2

java.lang.String[] notiffields2

prints

java.io.PrintStream prints
Constructor Detail

RequiredModelMBean

public RequiredModelMBean()
                   throws MBeanException,
                          RuntimeOperationsException
Constructs an RequiredModelMBean with an empty ModelMBeanInfo.

The RequiredModelMBean's MBeanInfo and Descriptors can be customized using the setModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo) method. After the RequiredModelMBean's MBeanInfo and Descriptors are customized, the RequiredModelMBean can be registered with the MBeanServer.

Throws:
MBeanException - Wraps a distributed communication Exception.
RuntimeOperationsException - Wraps a RuntimeException during the construction of the object.

RequiredModelMBean

public RequiredModelMBean(ModelMBeanInfo mbi)
                   throws MBeanException,
                          RuntimeOperationsException
Constructs a RequiredModelMBean object using ModelMBeanInfo passed in. As long as the RequiredModelMBean is not registered with the MBeanServer yet, the RequiredModelMBean's MBeanInfo and Descriptors can be customized using the setModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo) method. After the RequiredModelMBean's MBeanInfo and Descriptors are customized, the RequiredModelMBean can be registered with the MBeanServer.
Parameters:
mbi - The ModelMBeanInfo object to be used by the RequiredModelMBean. The given ModelMBeanInfo is cloned and modified as specified by setModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo)
Throws:
MBeanException - Wraps a distributed communication Exception.
RuntimeOperationsException - Wraps an {link java.lang.IllegalArgumentException}: The MBeanInfo passed in parameter is null.
Method Detail

setManagedResource

public void setManagedResource(java.lang.Object mr,
                               java.lang.String mr_type)
                        throws MBeanException,
                               RuntimeOperationsException,
                               InstanceNotFoundException,
                               InvalidTargetObjectTypeException
Sets the instance handle of the object against which to execute all methods in this ModelMBean management interface (MBeanInfo and Descriptors).
Specified by:
setManagedResource in interface ModelMBean
Parameters:
mr - Object that is the managed resource
mr_type - The type of reference for the managed resource.
Can be: "ObjectReference", "Handle", "IOR", "EJBHandle", or "RMIReference".
In this implementation only "ObjectReference" is supported.
Throws:
MBeanException - The initializer of the object has thrown an exception.
InstanceNotFoundException - The managed resource object could not be found
InvalidTargetObjectTypeException - The managed resource type should be "ObjectReference".
RuntimeOperationsException - Wraps a RuntimeException when setting the resource.

setModelMBeanInfo

public void setModelMBeanInfo(ModelMBeanInfo mbi)
                       throws MBeanException,
                              RuntimeOperationsException
Initializes a ModelMBean object using ModelMBeanInfo passed in. This method makes it possible to set a customized ModelMBeanInfo on the ModelMBean as long as it is not registered with the MBeanServer.
Once the ModelMBean's ModelMBeanInfo (with Descriptors) are customized and set on the ModelMBean, the ModelMBean be registered with the MBeanServer.

If the ModelMBean is currently registered, this method throws a RuntimeOperationsException wrapping an IllegalStateException

If the given inModelMBeanInfo does not contain any ModelMBeanNotificationInfo for the GENERIC or ATTRIBUTE_CHANGE notifications, then the RequiredModelMBean will supply its own default ModelMBeanNotificationInfos for those missing notifications.

Specified by:
setModelMBeanInfo in interface ModelMBean
Parameters:
mbi - The ModelMBeanInfo object to be used by the ModelMBean.
Throws:
MBeanException - Wraps a distributed communication Exception.
RuntimeOperationsException -
  • Wraps an IllegalArgumentException if the MBeanInfo passed in parameter is null.
  • Wraps an IllegalStateException if the ModelMBean is currently registered in the MBeanServer.

load

public void load()
          throws MBeanException,
                 RuntimeOperationsException,
                 InstanceNotFoundException
Locates the MBean in a persistent store and primes this instance of the MBean with the stored values.Any currently set values are overwritten.
Throws:
MBeanException - Wraps another exception or persistence is not supported
RuntimeOperationsException - Wraps exceptions from the persistence mechanism
InstanceNotFoundException - Could not find or load this MBean from persistent storage

store

public void store()
           throws MBeanException,
                  RuntimeOperationsException,
                  InstanceNotFoundException
Writes the MBean in a persistent store.Should only be called by the RequiredModelMBean class to store itself according to persistence policy for the MBean.When used,it may be called with every setAttribute or on a periodic basis. Currently the store supports only the flat file persistence.
Throws:
MBeanException - Wraps another exception or persistence is not supported
RuntimeOperationsException - Wraps exceptions from the persistence mechanism
InstanceNotFoundException - Could not find or load this MBean from persistent storage

getMBeanInfo

public MBeanInfo getMBeanInfo()
This method discovers the attributes and operations this MBean exposes for management.
Returns:
An instance of MBeanInfo allowing to retrieve all attributes and operations of this MBean.

getAttribute

public java.lang.Object getAttribute(java.lang.String attribute)
                              throws AttributeNotFoundException,
                                     MBeanException,
                                     ReflectionException
Gets the value of a specific attribute of this MBean.
Parameters:
attribute - A String specifying the name of the attribute to be retrieved.
Returns:
The value of the retrieved attribute.

getClassLoaderRepository

protected ClassLoaderRepository getClassLoaderRepository()
Return the Class Loader Repository used to perform class loading. Subclasses may wish to redefine this method in order to return the appropriate ClassLoaderRepository that should be used in this object.
Returns:
the Class Loader Repository.

getAttribute

java.lang.Object getAttribute(java.lang.String attribute,
                              boolean isFromServer)
                        throws AttributeNotFoundException,
                               MBeanException,
                               ReflectionException
Gets the value of a specific attribute of this MBean.
Parameters:
attribute - A String specifying the name of the attribute to be retrieved.
Returns:
The value of the retrieved attribute.

getAttributes

public AttributeList getAttributes(java.lang.String[] attributes)
Enables the values of several attributes of this MBean.
Parameters:
attributes - A list of attributes to be retrieved.
Returns:
The value of the retrieved attributes as attributeList.

invoke

public java.lang.Object invoke(java.lang.String opNameDet,
                               java.lang.Object[] opArgsDet,
                               java.lang.String[] sigDet)
                        throws MBeanException,
                               ReflectionException
Invokes a method on or through a RequiredModelMBean and returns the result of the method execution.

If the given method to be invoked, together with the provided signature, matches one of RequiredModelMbean accessible methods, this one will be call. Otherwise the call to the given method will be tried on the managed ressource.

The last value returned by an operation may be cached in the operation's descriptor which is in the ModelMBeanOperationInfo's descriptor. The valid value will be in the 'value' field if there is one. If the 'currencyTimeLimit' field in the descriptor is:

Parameters:
opName - The name of the method to be invoked. The name can be the fully qualified method name including the classname, or just the method name if the classname is defined in the 'class' field of the operation descriptor.
opArgs - An array containing the parameters to be set when the operation is invoked
sig - An array containing the signature of the operation. The class objects will be loaded using the same class loader as the one used for loading the MBean on which the operation was invoked.
Returns:
The object returned by the method, which represents the result of invoking the method on the specified managed resource.
Throws:
MBeanException - Wraps one of the following Exceptions:
  • An Exception thrown by the managed object's invoked method.
  • ServiceNotFoundException: No ModelMBeanOperationInfo or no descriptor defined for the specified operation or the managed resource is null.
  • InvalidTargetObjectTypeException: The 'targetType' field value is not 'objectReference'.
ReflectionException - Wraps an Exception thrown while trying to invoke the method.
RuntimeOperationsException - Wraps an IllegalArgumentException Method name is null.

setAttribute

public void setAttribute(Attribute attribute)
                  throws AttributeNotFoundException,
                         InvalidAttributeValueException,
                         MBeanException,
                         ReflectionException
Sets the value of a specific attribute of this MBean.
Parameters:
attribute - The identification of the attribute to be set and the value it is to be set to.
Throws:
AttributeNotFoundException - - The specified attribute is not accessible in the MBean.
InvalidAttributeValueException - - The specified value for the attribute is not valid.
MBeanException - - Wraps an exception thrown by the MBean's setter.
ReflectionException - - Wraps an java.lang.Exception thrown while trying to invoke the setter.
RuntimeOperationsException - - Wraps an IllegalArgumentException: The object name in parameter is null or the attribute in parameter is null.

setAttributes

public AttributeList setAttributes(AttributeList attributes)
Sets the values of several attributes of this MBean.
Parameters:
attributes - A list of attributes: The identification of the attributes to be set and the values they are to be set to.
Returns:
The list of attributes that were set, with their new values.

addNotificationListener

public void addNotificationListener(NotificationListener listener,
                                    NotificationFilter filter,
                                    java.lang.Object handback)
                             throws java.lang.IllegalArgumentException
Enables a couple (listener,handback) for a registered MBean to be added. Specified by : addNotificationListener in interface NotificationEmitter
Parameters:
listener - The listener object which will handles notifications emitted by the registered MBean.
filter - The filter object. If not specified, no filtering will be performed before handling notifications.
handback - The context to be sent to the listener when a notification is emitted.
Throws:
java.lang.IllegalArgumentException - Listener parameter is null.

removeNotificationListener

public void removeNotificationListener(NotificationListener listener,
                                       NotificationFilter filter,
                                       java.lang.Object handback)
                                throws ListenerNotFoundException
Enables a listener for an MBean to be removed. All couple (listener, handback) are removed. Specified by: removeNotificationListener in interface NotificationEmitter
Specified by:
removeNotificationListener in interface NotificationEmitter
Parameters:
listener - The listener object which will handles notifications emitted by the registered MBean.
filter - The filter that was specified when the listener was added.
handback - The handback that was specified when the listener was added.
Throws:
ListenerNotFoundException - The listener is not registered in the MBean.

removeNotificationListener

public void removeNotificationListener(NotificationListener listener)
                                throws ListenerNotFoundException
Enables a listener for an MBean to be removed. All couple (listener, handback) are removed. Specified by: removeNotificationListener in interface NotificationEmitter
Parameters:
listener - The listener object which will handles notifications emitted by the registered MBean.
Throws:
ListenerNotFoundException - The listener is not registered in the MBean.

getNotificationInfo

public MBeanNotificationInfo[] getNotificationInfo()
Returns a NotificationInfo object containing the name of the Java class of the notification and the notification types sent. This getNotificationInfo method will inturn call the original instrumentation object's getNotificationInfo method if the object is an instanceof NotificationEmitter.
Tags copied from interface: NotificationBroadcaster
Returns:
the array of possible notifications.

addAttributeChangeNotificationListener

public void addAttributeChangeNotificationListener(NotificationListener inlistener,
                                                   java.lang.String inAttributeName,
                                                   java.lang.Object inhandback)
                                            throws MBeanException,
                                                   RuntimeOperationsException,
                                                   java.lang.IllegalArgumentException
Registers an object which implements the NotificationListener interface as a listener for AttributeChangeNotifications. This object's 'handleNotification()' method will be invoked when any attributeChangeNotification is issued through or by the MBean. This does not include other Notifications. They must be registered for independently. An AttributeChangeNotification will be generated for this attributeName.
Parameters:
inlistener - The listener object which will handles notifications emitted by the registered MBean.
inAttributeName - The name of the MBean attribute for which to receive change notifications. If null, then all attribute changes will cause an attributeChangeNotification to be issued.
inhandback - The context to be sent to the listener with the notification when a notification is emitted.
Throws:
MBeanException - Wraps an exception thrown by this method
RuntimeOperationsException - To wrap the Run time Exceptions
java.lang.IllegalArgumentException - Listener is null or attributeName is null.

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
                       throws java.lang.Exception
Allows the MBean to perform any operations it needs before being registered in the MBean server. If the name of the MBean is not specified, the MBean can provide a name for its registration. If any exception is raised, the MBean will not be registered in the MBean server.

In order to ensure proper run-time semantics of RequireModelMBean, Any subclass of RequiredModelMBean overloading or overriding this method should call super.preRegister(server, name) in its own preRegister implementation.

Specified by:
preRegister in interface MBeanRegistration
Parameters:
server - The MBean server in which the MBean will be registered.
name - The object name of the MBean. This name is null if the name parameter to one of the createMBean or registerMBean methods in the MBeanServer interface is null. In that case, this method must return a non-null ObjectName for the new MBean.
Returns:
The name under which the MBean is to be registered. This value must not be null. If the name parameter is not null, it will usually but not necessarily be the returned value.
Throws:
java.lang.Exception - This exception will be caught by the MBean server and re-thrown as an MBeanRegistrationException or a RuntimeMBeanException.

postRegister

public void postRegister(java.lang.Boolean registrationDone)
Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.

In order to ensure proper run-time semantics of RequireModelMBean, Any subclass of RequiredModelMBean overloading or overriding this method should call super.postRegister(registrationDone) in its own postRegister implementation.

Specified by:
postRegister in interface MBeanRegistration
Parameters:
registrationDone - Indicates whether or not the MBean has been successfully registered in the MBean server. The value false means that the registration phase has failed.

preDeregister

public void preDeregister()
                   throws java.lang.Exception
Allows the MBean to perform any operations it needs before being unregistered by the MBean server.

In order to ensure proper run-time semantics of RequireModelMBean, Any subclass of RequiredModelMBean overloading or overriding this method should call super.preDeregister() in its own preDeregister implementation.

Specified by:
preDeregister in interface MBeanRegistration
Throws:
java.lang.Exception - This exception will be caught by the MBean server and re-thrown as an MBeanRegistrationException or a RuntimeMBeanException.

postDeregister

public void postDeregister()
Allows the MBean to perform any operations needed after having been unregistered in the MBean server.

In order to ensure proper run-time semantics of RequireModelMBean, Any subclass of RequiredModelMBean overloading or overriding this method should call super.postDeregister() in its own postDeregister implementation.

Specified by:
postDeregister in interface MBeanRegistration

removeAttributeChangeNotificationListener

public void removeAttributeChangeNotificationListener(NotificationListener inlistener,
                                                      java.lang.String inAttributeName)
                                               throws MBeanException,
                                                      RuntimeOperationsException,
                                                      ListenerNotFoundException
Removes a listener for attributeChangeNotifications from the MBean.
Parameters:
inlistener - The listener name which was handling notifications emitted by the registered MBean. This method will remove all information related to this listener.
inAttributeName - The attribute for which the listener no longer wants to receive attributeChangeNotifications.
Throws:
MBeanException - Wraps an exception thrown while removing AttributeChangeNotificationListener
RuntimeOperationsException - Wraps the exceptions thrown in the run time
ListenerNotFoundException - The couple (listener,handback) is not registered in the MBean. The exception message contains either "listener", "handback" or the object name depending on which object cannot be found.

removeAttributeChangeNotificationListener

void removeAttributeChangeNotificationListener(NotificationListener inlistener,
                                               java.lang.String inAttributeName,
                                               NotificationFilter filter,
                                               java.lang.Object handback)
                                         throws ListenerNotFoundException
Removes a listener for attributeChangeNotifications from the MBean.
Parameters:
inlistener - The listener name which was handling notifications emitted by the registered MBean. This method will remove all information related to this listener.
inAttributeName - The attribute for which the listener no longer wants to receive attributeChangeNotifications.
filter - The filter that was specified when the listener was added.
handback - The handback that was specified when the listener was added.
Throws:
MBeanException - Wraps an exception thrown while removing AttributeChangeNotificationListener
RuntimeOperationsException - Wraps the exceptions thrown in the run time
ListenerNotFoundException - The couple (listener,handback) is not registered in the MBean. The exception message contains either "listener", "handback" or the object name depending on which object cannot be found.

sendNotification

public void sendNotification(Notification ntfyObj)
                      throws MBeanException,
                             RuntimeOperationsException
Sends a Notification which is passed in to the registered Notification listeners on the ModelMBean as a jmx.modelmbean.general notification.
Parameters:
ntfyObj - The notification which is to be passed to the 'handleNotification' method of the listener object.
Throws:
MBeanException - The initializer of the object has thrown an exception.
RuntimeOperationsException - Wraps an IllegalArgumentException: The Notification object passed in parameter is null or invalid.

sendNotification

public void sendNotification(java.lang.String ntfyText)
                      throws MBeanException,
                             RuntimeOperationsException
Sends a Notification which contains the text string that is passed in to the registered Notification listeners on the ModelMBean.
Parameters:
ntfyText - The text which is to be passed in the Notification to the 'handleNotification' method of the listener object. the constructed Notification will be: type "jmx.modelmbean.general" source this ModelMBean instance sequence 1
Throws:
MBeanException - The initializer of the object has thrown an exception.
RuntimeOperationsException - Wraps an IllegalArgumentException: The Notification text string passed in parameter is null or invalid.

sendAttributeChangeNotification

public void sendAttributeChangeNotification(AttributeChangeNotification ntfyObj)
                                     throws MBeanException,
                                            RuntimeOperationsException
Sends an attributeChangeNotification which is passed in to the registered attributeChangeNotification listeners on the ModelMBean.
Parameters:
ntfyObj - The notification which is to be passed to the 'handleNotification' method of the listener object.
Throws:
MBeanException - The initializer of the object has thrown an exception.
RuntimeOperationsException - Wraps an IllegalArgumentException: The Notification object passed in parameter is null or invalid.

sendAttributeChangeNotification

public void sendAttributeChangeNotification(Attribute inOldVal,
                                            Attribute inNewVal)
                                     throws MBeanException,
                                            RuntimeOperationsException
Sends an attributeChangeNotification which contains the old value and new value for the attribute to the registered AttributeChangeNotification listeners on the ModelMBean.
Parameters:
inOldVal - The origional value for the Attribute
inNewVal - The current value for the Attribute

 The constructed attributeChangeNotification will be:
 type        "jmx.attribute.change"
 source      this ModelMBean instance
 sequence    1
 attributeName oldValue.getName()
 attributeType oldValue's class
 attributeOldValue oldValue.getValue()
 attributeNewValue newValue.getValue()
 

Throws:
MBeanException - to wrapper implementation exceptions
RuntimeOperationsException - to wrapper IllegalArgumentExceptions.