Package org.springframework.jmx.export
Class NotificationListenerBean
- java.lang.Object
- org.springframework.jmx.support.NotificationListenerHolder
- org.springframework.jmx.export.NotificationListenerBean
- All Implemented Interfaces:
InitializingBean
public class NotificationListenerBean extends NotificationListenerHolder implements InitializingBean
Helper class that aggregates aNotificationListener
, aNotificationFilter
, and an arbitrary handback object.Also provides support for associating the encapsulated
NotificationListener
with any number of MBeans from which it wishes to receiveNotifications
via themappedObjectNames
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 sameMBeanExporter
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 theNotificationListenerBean
class.NotificationListenerBean(NotificationListener notificationListener)
Create a new instance of theNotificationListenerBean
class.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.Methods inherited from class org.springframework.jmx.support.NotificationListenerHolder
equals, getHandback, getNotificationFilter, getNotificationListener, getResolvedObjectNames, hashCode, setHandback, setMappedObjectName, setMappedObjectNames, setNotificationFilter, setNotificationListener
Constructor Detail
NotificationListenerBean
public NotificationListenerBean()
Create a new instance of theNotificationListenerBean
class.
NotificationListenerBean
public NotificationListenerBean(NotificationListener notificationListener)
Create a new instance of theNotificationListenerBean
class.- Parameters:
notificationListener
- the encapsulated listener
Method Detail
afterPropertiesSet
public void afterPropertiesSet()
Description copied from interface:InitializingBean
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
- Specified by:
afterPropertiesSet
in interfaceInitializingBean