Example usage for java.util EventObject toString

List of usage examples for java.util EventObject toString

Introduction

In this page you can find the example usage for java.util EventObject toString.

Prototype

public String toString() 

Source Link

Document

Returns a String representation of this EventObject.

Usage

From source file:org.apache.servicemix.nmr.management.ManagementAgent.java

/**
 * A place-holder implementation of notify that logs events to the commons
 * logging Log./* www  .  ja va  2 s . c om*/
 */
public void notify(EventObject event) throws Exception {
    if (LOG.isTraceEnabled()) {
        LOG.trace(event.toString());
    }
}

From source file:chat.viska.xmpp.Session.java

protected void log(final EventObject event) {
    logger.log(Level.INFO, event.toString());
}

From source file:org.apache.camel.management.JmxNotificationEventNotifier.java

public void notify(EventObject event) throws Exception {
    if (notificationBroadcaster != null) {
        // its recommended to send light weight events and we don't want to have the entire Exchange/CamelContext etc
        // serialized as these are the typical source of the EventObject. So we use our own source which is just
        // a human readable name, which can be configured.
        String type = event.getClass().getSimpleName();
        String message = event.toString();
        Notification notification = new Notification(type, source, counter.getAndIncrement(), message);

        if (LOG.isTraceEnabled()) {
            LOG.trace("Broadcasting JMX notification: " + notification);
        }//  w  w  w .j  a  va2s. com
        notificationBroadcaster.sendNotification(notification);
    }
}