org.springframework.batch.sample.jmx
Class JobExecutionNotificationPublisher
java.lang.Object
org.springframework.batch.sample.jmx.JobExecutionNotificationPublisher
- All Implemented Interfaces:
- EventListener, ApplicationListener, NotificationPublisherAware
public class JobExecutionNotificationPublisher
- extends Object
- implements ApplicationListener, NotificationPublisherAware
JMX notification broadcaster
- Since:
- 1.0
- Author:
- Dave Syer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final Log logger
JobExecutionNotificationPublisher
public JobExecutionNotificationPublisher()
setNotificationPublisher
public void setNotificationPublisher(NotificationPublisher notificationPublisher)
- Injection setter.
- Specified by:
setNotificationPublisher
in interface NotificationPublisherAware
- See Also:
NotificationPublisherAware.setNotificationPublisher(org.springframework.jmx.export.notification.NotificationPublisher)
onApplicationEvent
public void onApplicationEvent(ApplicationEvent applicationEvent)
- If the event is a
SimpleMessageApplicationEvent
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 interface ApplicationListener
- See Also:
ApplicationListener.onApplicationEvent(ApplicationEvent)
Copyright © 2009 SpringSource. All Rights Reserved.