Java Reference
In-Depth Information
objects based on the object name that caused them to be sent. This functionality
allows you to be informed when a particular MBean is registered or unregistered.
6.8 Summary
In this chapter, we discussed each of the components of the JMX notification
model. We showed that MBeans must implement the NotificationBroadcaster
interface in order to send notifications; this can be done directly or by extending
the NotificationBroadcasterSupport class. You learned that notifications must
be described by the MBeanNotificationInfo class, which is exposed by the man-
agement interface of an MBean. In addition, we examined the Notification
class and how its members provide useful information such as notification type,
source, timestamp, and so forth to notification listeners.
Along with sending notifications, this chapter also explained that classes
interested in receiving notifications must implement the NotificationListener
interface. In addition, notification listeners can register notification filters that
reduce incoming notifications to only those in which a receiving object is actually
interested. Filters are important because notification listeners would otherwise
receive all types of notifications from a broadcaster. In JMX , listeners need to
register only once to receive all notifications from a source.
Finally, we discussed some standard types of notifications that are already
present in the JMX framework, including the AttributeChangeNotification and
MBeanServerNotification classes. Attribute change notifications are sent by
MBeans when they want to indicate that an attribute of their management interface
has been altered. MBeanServerNotification notifications are sent by the MBean
server to indicate that a particular MBean has been registered or unregistered.
The next chapter covers the final MBean type presented in this topic: the
Model MBean. Model MBeans are available for instantiation and configuration
in every JMX -compliant agent.
Search WWH ::




Custom Search