The ability for resources and other entities to signal an event to their managing applications is a key functionality of management architectures. As specified in the Java Management extensions, notifications in the Java Dynamic Management Kit provide a generic event mechanism whereby one listener can receive all events sent by a broadcaster.
All notifications in the Java Dynamic Management Kit rely on the Notification class which itself inherits from Java event classes. A string called the notification type inside a Notification object gives the nature of the event, and other fields provide additional information to the recipient. This ensures that all MBeans, the MBean server, and remote applications may send and receive Notification objects and its subclasses, regardless of their inner type.
You may define new notification objects only by subclassing the Notification class. This ensures that the custom notifications will be compatible with the notification mechanism. New notification classes may be used to convey additional information to custom listeners, and generic listenters will still be able to access the standard Notification fields. However, since there are already fields provided for user data, subclassing is discouraged in the JMX architecture so that notification objects remain as universal as possible.
Listeners usually interact with notification broadcasters indirectly through the MBean server. The interface of the MBean server lets you associate a listener with any broadcaster MBean, thereby giving you dynamic access to any of the broadcasters that are registered. In addition, the MBean metadata provided through the MBean server contains the list of notification types that the MBean broadcasts.
The following diagram of an agent application summarizes how listeners register with broadcasters and then receive notifications.