我正在经历上JMX
的Spring
documentation和整个下段传来:JMX-Spring - 什么时候播出'JMXNotification'?
By configuring NotificationListeners in place, every time a JMX Notification is broadcast
from the target MBean (bean:name=testBean1),the ConsoleLoggingNotificationListener bean
that was registered as a listener via the notificationListenerMappings property will be
notified.
这是怎么ConsoleLoggingNotificationListener
实现:
public class ConsoleLoggingNotificationListener
implements NotificationListener, NotificationFilter {
public void handleNotification(Notification notification, Object handback) {
System.out.println(notification);
System.out.println(handback);
}
public boolean isNotificationEnabled(Notification notification) {
return AttributeChangeNotification.class.isAssignableFrom(notification.getClass());
}
}
但是,因为我是新手,我想知道什么时候播出了JMX Notification
?是否当一个JMX暴露的属性的值是已更改?
请帮我知道这一点。
谢谢!