org.springframework.jmx.support

## 类 NotificationListenerHolder

- java.lang.Object
- - org.springframework.jmx.support.NotificationListenerHolder

- 直接已知子类:
    NotificationListenerBean, NotificationListenerRegistrar

      public class NotificationListenerHolder
      extends Object

  Helper class that aggregates a `NotificationListener`, a `NotificationFilter`, and an arbitrary handback object, as well as the names of MBeans from which the listener wishes to receive `Notifications`.
  从以下版本开始:
    2.5.2
  作者:
    Juergen Hoeller
  另请参阅:
    `NotificationListenerBean`, `NotificationListenerRegistrar`

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected Set<Object>` | `mappedObjectNames`

  - ### 构造器概要

    构造器
    构造器和说明
    `NotificationListenerHolder()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `equals(Object other)`
    `Object` | `getHandback()` Return the (arbitrary) object that will be 'handed back' as-is by an `NotificationBroadcaster` when notifying any `NotificationListener`.
    `NotificationFilter` | `getNotificationFilter()` Return the `NotificationFilter` associated with the encapsulated `NotificationListener`.
    `NotificationListener` | `getNotificationListener()` Get the `NotificationListener`.
    `ObjectName[]` | `getResolvedObjectNames()` Return the list of `ObjectName` String representations for which the encapsulated `NotificationFilter` will be registered as a listener for `Notifications`.
    `int` | `hashCode()`
    `void` | `setHandback(Object handback)` Set the (arbitrary) object that will be 'handed back' as-is by an `NotificationBroadcaster` when notifying any `NotificationListener`.
    `void` | `setMappedObjectName(Object mappedObjectName)` Set the `ObjectName`-style name of the single MBean that the encapsulated `NotificationFilter` will be registered with to listen for `Notifications`.
    `void` | `setMappedObjectNames(Object... mappedObjectNames)` Set an array of `ObjectName`-style names of the MBeans that the encapsulated `NotificationFilter` will be registered with to listen for `Notifications`.
    `void` | `setNotificationFilter(NotificationFilter notificationFilter)` Set the `NotificationFilter` associated with the encapsulated `NotificationFilter`.
    `void` | `setNotificationListener(NotificationListener notificationListener)` Set the `NotificationListener`.

    - ### 从类继承的方法 java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### mappedObjectNames

          @Nullable
          protected Set<Object> mappedObjectNames

  - ### 构造器详细资料

    - #### NotificationListenerHolder

          public NotificationListenerHolder()

  - ### 方法详细资料

    - #### setNotificationListener

          public void setNotificationListener(@Nullable
                                              NotificationListener notificationListener)

      Set the `NotificationListener`.

    - #### getNotificationListener

          @Nullable
          public NotificationListener getNotificationListener()

      Get the `NotificationListener`.

    - #### setNotificationFilter

          public void setNotificationFilter(@Nullable
                                            NotificationFilter notificationFilter)

      Set the `NotificationFilter` associated with the encapsulated `NotificationFilter`.

      May be `null`.

    - #### getNotificationFilter

          @Nullable
          public NotificationFilter getNotificationFilter()

      Return the `NotificationFilter` associated with the encapsulated `NotificationListener`.

      May be `null`.

    - #### setHandback

          public void setHandback(@Nullable
                                  Object handback)

      Set the (arbitrary) object that will be 'handed back' as-is by an `NotificationBroadcaster` when notifying any `NotificationListener`.
      参数:
        `handback` - the handback object (can be `null`)
      另请参阅:
        `NotificationListener.handleNotification(javax.management.Notification, Object)`

    - #### getHandback

          @Nullable
          public Object getHandback()

      Return the (arbitrary) object that will be 'handed back' as-is by an `NotificationBroadcaster` when notifying any `NotificationListener`.
      返回:
        the handback object (may be `null`)
      另请参阅:
        `NotificationListener.handleNotification(javax.management.Notification, Object)`

    - #### setMappedObjectName

          public void setMappedObjectName(@Nullable
                                          Object mappedObjectName)

      Set the `ObjectName`-style name of the single MBean that the encapsulated `NotificationFilter` will be registered with to listen for `Notifications`. Can be specified as `ObjectName` instance or as `String`.
      另请参阅:
        `setMappedObjectNames(java.lang.Object...)`

    - #### setMappedObjectNames

          public void setMappedObjectNames(Object... mappedObjectNames)

      Set an array of `ObjectName`-style names of the MBeans that the encapsulated `NotificationFilter` will be registered with to listen for `Notifications`. Can be specified as `ObjectName` instances or as `String`s.
      另请参阅:
        `setMappedObjectName(java.lang.Object)`

    - #### getResolvedObjectNames

          @Nullable
          public ObjectName[] getResolvedObjectNames()
                                                         throws MalformedObjectNameException

      Return the list of `ObjectName` String representations for which the encapsulated `NotificationFilter` will be registered as a listener for `Notifications`.
      抛出:
        `MalformedObjectNameException` - if an `ObjectName` is malformed

    - #### equals

          public boolean equals(Object other)

      覆盖:
        `equals` 在类中 `Object`

    - #### hashCode

          public int hashCode()

      覆盖:
        `hashCode` 在类中 `Object`