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 voidonApplicationEvent(SimpleMessageApplicationEvent applicationEvent)If the event is aSimpleMessageApplicationEventfor open and close we log the event at INFO level and send a JMX notification if we are also an MBean.voidsetNotificationPublisher(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:
setNotificationPublisherin 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 aSimpleMessageApplicationEventfor open and close we log the event at INFO level and send a JMX notification if we are also an MBean.- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<SimpleMessageApplicationEvent>- See Also:
ApplicationListener.onApplicationEvent(ApplicationEvent)