org.springframework.batch.sample.jmx
Class JobExecutionNotificationPublisher

java.lang.Object
  extended by 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

Field Summary
protected static Log logger
           
 
Constructor Summary
JobExecutionNotificationPublisher()
           
 
Method Summary
 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.
 void setNotificationPublisher(NotificationPublisher notificationPublisher)
          Injection setter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final Log logger
Constructor Detail

JobExecutionNotificationPublisher

public JobExecutionNotificationPublisher()
Method Detail

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.