org.springframework.batch.sample.jmx

## 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 and Description
    `JobExecutionNotificationPublisher()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onApplicationEvent(SimpleMessageApplicationEvent 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(org.springframework.jmx.export.notification.NotificationPublisher notificationPublisher)` Injection setter.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JobExecutionNotificationPublisher

          public JobExecutionNotificationPublisher()

  - ### Method Detail

    - #### setNotificationPublisher

          public void setNotificationPublisher(org.springframework.jmx.export.notification.NotificationPublisher notificationPublisher)

      Injection setter.
      Specified by:
        `setNotificationPublisher` in interface `org.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 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 `org.springframework.context.ApplicationListener<SimpleMessageApplicationEvent>`
      See Also:
        `ApplicationListener.onApplicationEvent(ApplicationEvent)`