Example usage for org.springframework.context ApplicationEvent toString

List of usage examples for org.springframework.context ApplicationEvent toString

Introduction

In this page you can find the example usage for org.springframework.context ApplicationEvent toString.

Prototype

public String toString() 

Source Link

Document

Returns a String representation of this EventObject.

Usage

From source file:com.mc.MyEventListener.java

@Override
public void onApplicationEvent(ApplicationEvent e) {
    System.out.println(e.toString());
}

From source file:javaspringtest.myEventListener.java

@Override
public void onApplicationEvent(ApplicationEvent event) {
    System.out.println(event.toString());
    //        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

From source file:org.jasig.cas.event.handlers.TestEventHandler.java

/** This method calls the toString on an event and writes it to standard out. */
public void handleEvent(final ApplicationEvent event) {
    System.out.println(event.toString());
}

From source file:kr.okplace.job.support.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 ww .j  av  a 2 s. c o m
 * 
 * @see ApplicationListener#onApplicationEvent(ApplicationEvent) 
 */
public void onApplicationEvent(ApplicationEvent applicationEvent) {
    if (applicationEvent instanceof SimpleMessageApplicationEvent) {
        String message = applicationEvent.toString();
        logger.info(message);
        publish(message);
    }
}

From source file:org.mule.module.spring.events.AsynchronousEventListener.java

public void onApplicationEvent(ApplicationEvent event) {
    try {/*from  ww  w . ja v a  2  s .  c om*/
        threadPool.execute(new Worker(listener, event));
    } catch (RejectedExecutionException e) {
        logger.error("Failed to execute worker for event: " + event.toString(), e);
    }
}