!--a11y-->
Sending
Monitoring Data Actively Via JMX Notifications 
When you want to send monitoring data actively (that is, you want to send the data only upon a certain event instead of being constantly checked for a new value), you can use javax.management.AttributeChangeNotifications.
In the
constructor of the notification you have to set the name of the attribute as
specified in the attribute-mapping element from the
monitor-configuration.xml.
You have to supply the new value the monitor must have as a new
value.
In the case of the example MBean we described in the sample XML code from the previous section, you can emit a notification like this:
AttributeChangeNotification notification = new AttributeChangeNotification(this, 1, System.currentTimeMillis(), "important notification", " BankName ", "java.lang.String", “”, newBankName) |
See also:
