
This method is applicable 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 have to supply this as a new value.
In the case of the example MBean 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)