Java Reference
In-Depth Information
Table 6.2
The class members of the javax.management.Notification class
Class member
Purpose
A String object representing a message. This could be the reason for
the notification.
Message
A number indicating the order in relation of events from the source. The
source populates this field if it intends to give listeners the ability to
sort incoming notifications. The notification model makes no guaranties
that notifications will be received in the order they were sent.
SequenceNumber
The timestamp of the notification, represented as a long value.
TimeStamp
The dot-separated String value indicating the type of the notification.
Not a class type. For example: acme.mbeanA.event1 .
Type
An object used to contain any data that a source wants to send to a
notification listener.
UserData
The source of the notification. This object contains an ObjectName or
a reference to the object that generated the notification.
Source
6.2.4
Being a notification listener
Up to now, we have examined notification broadcasters, the MBeanNotification-
Info class, and the Notification class. The last major component in the notifica-
tion framework is the notification listener. In JMX , objects interested in receiving
notifications must implement the javax.management.NotificationListener
interface. You may remember this interface from chapter 2, where you imple-
mented it in your HelloAgent class. Figure 6.2 shows the UML diagram for the
NotificationListener interface.
Figure 6.2
UML diagram of the
NotificationListener interface
Search WWH ::




Custom Search