Package org.springframework.jmx.export

# Class NotificationListenerBean

java.lang.Object
org.springframework.jmx.support.NotificationListenerHolder
org.springframework.jmx.export.NotificationListenerBean

All Implemented Interfaces:
  `org.springframework.beans.factory.InitializingBean`

public class NotificationListenerBean extends NotificationListenerHolder implements org.springframework.beans.factory.InitializingBean
Helper class that aggregates a `NotificationListener`, a `NotificationFilter`, and an arbitrary handback object.

Also provides support for associating the encapsulated `NotificationListener` with any number of MBeans from which it wishes to receive `Notifications` via the `mappedObjectNames` property.

Note: This class supports Spring bean names as `"mappedObjectNames"` as well, as alternative to specifying JMX object names. Note that only beans exported by the same `MBeanExporter` are supported for such bean names.

Since:
  2.0
Author:
  Rob Harrop, Juergen Hoeller
See Also:
  - `MBeanExporter.setNotificationListeners(org.springframework.jmx.export.NotificationListenerBean...)`

## Field Summary

### Fields inherited from class org.springframework.jmx.support.NotificationListenerHolder

`mappedObjectNames`

## Constructor Summary

Constructors
Constructor
Description
`NotificationListenerBean()`
Create a new instance of the `NotificationListenerBean` class.
`NotificationListenerBean(NotificationListener notificationListener)`
Create a new instance of the `NotificationListenerBean` class.

## Method Summary

Modifier and Type
Method
Description
`void`
`afterPropertiesSet()`

### Methods inherited from class org.springframework.jmx.support.NotificationListenerHolder

`equals, getHandback, getNotificationFilter, getNotificationListener, getResolvedObjectNames, hashCode, setHandback, setMappedObjectName, setMappedObjectNames, setNotificationFilter, setNotificationListener`

### Methods inherited from class java.lang.Object

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

## Constructor Details

### NotificationListenerBean

public NotificationListenerBean()
Create a new instance of the `NotificationListenerBean` class.

### NotificationListenerBean

public NotificationListenerBean(NotificationListener notificationListener)
Create a new instance of the `NotificationListenerBean` class.

Parameters:
  `notificationListener` - the encapsulated listener

## Method Details

### afterPropertiesSet

public void afterPropertiesSet()

Specified by:
  `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`