public class NotificationListenerBean extends NotificationListenerHolder implements InitializingBean
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.
MBeanExporter.setNotificationListeners(org.springframework.jmx.export.NotificationListenerBean...)
mappedObjectNames
Constructor and Description |
---|
NotificationListenerBean()
Create a new instance of the
NotificationListenerBean class. |
NotificationListenerBean(NotificationListener notificationListener)
Create a new instance of the
NotificationListenerBean class. |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Invoked by the containing
BeanFactory after it has set all bean properties
and satisfied BeanFactoryAware , ApplicationContextAware etc. |
equals, getHandback, getNotificationFilter, getNotificationListener, getResolvedObjectNames, hashCode, setHandback, setMappedObjectName, setMappedObjectNames, setNotificationFilter, setNotificationListener
public NotificationListenerBean()
NotificationListenerBean
class.public NotificationListenerBean(NotificationListener notificationListener)
NotificationListenerBean
class.notificationListener
- the encapsulated listenerpublic void afterPropertiesSet()
InitializingBean
BeanFactory
after it has set all bean properties
and satisfied BeanFactoryAware
, 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.
afterPropertiesSet
in interface InitializingBean