Class JobExecutionNotificationPublisher
- java.lang.Object
- org.springframework.batch.sample.jmx.JobExecutionNotificationPublisher
- All Implemented Interfaces:
java.util.EventListener
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationListener<SimpleMessageApplicationEvent>
,org.springframework.jmx.export.notification.NotificationPublisherAware
public class JobExecutionNotificationPublisher extends java.lang.Object implements org.springframework.context.ApplicationListener<SimpleMessageApplicationEvent>, org.springframework.jmx.export.notification.NotificationPublisherAware
JMX notification broadcaster- Since:
- 1.0
- Author:
- Dave Syer
Constructor Summary
Constructors Constructor Description JobExecutionNotificationPublisher()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onApplicationEvent(SimpleMessageApplicationEvent applicationEvent)
If the event is aSimpleMessageApplicationEvent
for open and close we log the event at INFO level and send a JMX notification if we are also an MBean.void
setNotificationPublisher(org.springframework.jmx.export.notification.NotificationPublisher notificationPublisher)
Injection setter.
Method Detail
setNotificationPublisher
public void setNotificationPublisher(org.springframework.jmx.export.notification.NotificationPublisher notificationPublisher)
Injection setter.- Specified by:
setNotificationPublisher
in interfaceorg.springframework.jmx.export.notification.NotificationPublisherAware
- See Also:
NotificationPublisherAware.setNotificationPublisher(org.springframework.jmx.export.notification.NotificationPublisher)
onApplicationEvent
public void onApplicationEvent(SimpleMessageApplicationEvent applicationEvent)
If the event is aSimpleMessageApplicationEvent
for open and close we log the event at INFO level and send a JMX notification if we are also an MBean.- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<SimpleMessageApplicationEvent>
- See Also:
ApplicationListener.onApplicationEvent(ApplicationEvent)