模块 java.naming

接口 UnsolicitedNotificationListener

所有父级接口:
EventListener , NamingListener

public interface UnsolicitedNotificationListener extends NamingListener
此接口用于处理 UnsolicitedNotificationEvent 。 “未经请求的通知”在 RFC 2251 中定义。它允许服务向客户端发送未经请求的通知。 UnsolicitedNotificationListener 必须:
  1. 实现此接口及其方法
  2. 实施 NamingListener.namingExceptionThrown() 以便在尝试收集未经请求的通知事件时抛出异常时通知它。
  3. 使用来自 EventContextEventDirContextaddNamingListener() 方法之一向上下文注册。这些方法只有NamingListener参数适用; UnsolicitedNotificationListener 忽略其余部分。 (如果监听器实现了其他监听器接口,这些参数可能适用于监听器)。
自从:
1.3
参见:
  • 方法详情

    • notificationReceived

      void notificationReceived(UnsolicitedNotificationEvent  evt)
      收到未经请求的通知时调用。
      参数:
      evt - 非空 UnsolicitedNotificationEvent