JavaTM Platform
Standard Ed. 6

类 javax.management.Notification
的使用

使用 Notification 的软件包
javax.management 提供 Java Management Extensions 的核心类。 
javax.management.modelmbean 提供了 ModelMBean 类的定义。 
javax.management.monitor 提供 monitor 类的定义。 
javax.management.relation 提供 Relation Service 的定义。 
javax.management.remote 对 JMX MBean 服务器进行远程访问使用的接口。 
javax.management.timer 提供对 Timer MBean(计时器 MBean)的定义。 
 

javax.management 中 Notification 的使用
 

javax.management 中 Notification 的子类
 class AttributeChangeNotification
          提供 MBean 所发送的属性更改通知的定义。
 class MBeanServerNotification
          表示 MBean 服务器通过 MBeanServerDelegate MBean 所发出的通知。
 

参数类型为 Notification 的 javax.management 中的方法
protected  void NotificationBroadcasterSupport.handleNotification(NotificationListener listener, Notification notif, Object handback)
          为了向侦听器发送通知,由该侦听器的 sendNotification 调用此方法。
 void NotificationListener.handleNotification(Notification notification, Object handback)
          出现 JMX 通知时调用。
 boolean AttributeChangeNotificationFilter.isNotificationEnabled(Notification notification)
          向侦听器发送指定的通知之前调用。
 boolean NotificationFilter.isNotificationEnabled(Notification notification)
          向侦听器发送指定通知前调用。
 boolean NotificationFilterSupport.isNotificationEnabled(Notification notification)
          向侦听器发送指定的通知前调用。
 void MBeanServerDelegate.sendNotification(Notification notification)
          允许 MBean 服务器发送通知。
 void NotificationBroadcasterSupport.sendNotification(Notification notification)
          发送一个通知。
 void StandardEmitterMBean.sendNotification(Notification n)
          发送通知。
 

javax.management.modelmbean 中 Notification 的使用
 

参数类型为 Notification 的 javax.management.modelmbean 中的方法
 void ModelMBeanNotificationBroadcaster.sendNotification(Notification ntfyObj)
          以 jmx.modelmbean.generic 通知形式将传入的 Notification 发送到 ModelMBean 上已注册的 Notification 侦听器。
 void RequiredModelMBean.sendNotification(Notification ntfyObj)
           
 

javax.management.monitor 中 Notification 的使用
 

javax.management.monitor 中 Notification 的子类
 class MonitorNotification
          提供对监视器 MBean 发送的通知的定义。
 

javax.management.relation 中 Notification 的使用
 

javax.management.relation 中 Notification 的子类
 class RelationNotification
          Relation Service(关系服务)中的更改通知。
 

参数类型为 Notification 的 javax.management.relation 中的方法
 void RelationService.handleNotification(Notification notif, Object handback)
          出现 JMX 通知时调用。
 boolean MBeanServerNotificationFilter.isNotificationEnabled(Notification notif)
          向侦听器发送指定通知之前调用。
 

javax.management.remote 中 Notification 的使用
 

javax.management.remote 中 Notification 的子类
 class JMXConnectionNotification
          在客户端连接打开或关闭时,或者当通知丢失时发出的通知。
 

返回 Notification 的 javax.management.remote 中的方法
 Notification TargetedNotification.getNotification()
          发出的通知。
 

参数类型为 Notification 的 javax.management.remote 中的构造方法
TargetedNotification(Notification notification, Integer listenerID)
          构造一个 TargetedNotification 对象。
 

javax.management.timer 中 Notification 的使用
 

javax.management.timer 中 Notification 的子类
 class TimerNotification
          此类定义了由计时器 MBean 发送的通知。
 


JavaTM Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。