Getting Started with the Java Dynamic Management Kit 4.0

Adding Notification Listeners

If you want to add a listener of notifications at the agent side you need to call the addNotificationListener method on the MBean server. In this case, the notification will not be forwarded to the connector client. You can also add a listener, addNotificationListeneron the remote MBean server or on proxy MBean A.

There are two ways you can add a listener to the manager side. Firstly, you can call the appropriate addNotificationListener operation on proxy MBean A. This will transmit a call to the agent side and a protocol-dependent, appropriate listener will be created in the MBean server (L1 in Figure 1-2). This is a protocol-dependent, generated listener and is handled by the connector server. It is in charge of sending notifications throughout the network, from the agent side to the manager side, using a specified protocol. Secondly, you can call the addNotificationListener method on the remote MBean server.