| This class defines a JmxNotification class. This class is used by the
RmiConnector on the controller to send a JMXNotification. This
is done by the following code:
JmxNotification sequoiaNotification = new JmxNotification(priority,
"" + sequence, type, description, ""
+ time, controllerName, mbean
.getClass().getName(), "mbeanName",
hostName, "" + port, data);
This create an instance of this JmxNotification class, specific to Sequoia.
We then create a new instance of the Notification object as specified in the
javax.management package
Notification notification = new Notification(type, mbean, sequence, myDate
.getTime(), description);
This class accepts a userData object. We wanted to set this user object to a
specific Sequoia class but this forces generic JMX client to have this class
in their classpath. We just serialize the JmxNotification into an XML string
and feed it in the notification.
notification.setUserData(sequoiaNotification.toString());
This can be retrieved on any jmx client, and on Sequoia specific clients, the
xml is transformed into an instance of this class again for easier
notification handling.
author: Nicolas Modrzyk |