Example usage for org.springframework.batch.sample.jmx SimpleMessageApplicationEvent toString

List of usage examples for org.springframework.batch.sample.jmx SimpleMessageApplicationEvent toString

Introduction

In this page you can find the example usage for org.springframework.batch.sample.jmx SimpleMessageApplicationEvent toString.

Prototype

@Override
    public String toString() 

Source Link

Usage

From source file:org.springframework.batch.sample.jmx.JobExecutionNotificationPublisher.java

/**
 * If the event is a {@link SimpleMessageApplicationEvent} for open and
 * close we log the event at INFO level and send a JMX notification if we
 * are also an MBean.//w w  w  . j av a  2 s.c o  m
 * 
 * @see ApplicationListener#onApplicationEvent(ApplicationEvent) 
 */
@Override
public void onApplicationEvent(SimpleMessageApplicationEvent applicationEvent) {
    String message = applicationEvent.toString();
    LOG.info(message);
    publish(message);
}