Example usage for com.google.common.eventbus DeadEvent getSource

List of usage examples for com.google.common.eventbus DeadEvent getSource

Introduction

In this page you can find the example usage for com.google.common.eventbus DeadEvent getSource.

Prototype

public Object getSource() 

Source Link

Document

Returns the object that originated this event (not the object that originated the wrapped event).

Usage

From source file:es.upv.grycap.coreutils.common.events.DeadEventListener.java

private static String getSource(final DeadEvent deadEvent) {
    return (deadEvent != null && deadEvent.getSource() != null
            ? deadEvent.getSource().getClass().getCanonicalName()
            : "(not available)");
}

From source file:com.webbfontaine.valuewebb.irms.eventbus.DeadEventHandler.java

@Subscribe
public void handle(DeadEvent event) {
    LOGGER.info("Got DeadEvent {}:{}", event.getSource(), event.getEvent());
}

From source file:org.obiba.mica.core.event.DeadEventSubscriber.java

@Subscribe
public void handleDeadEvent(DeadEvent deadEvent) {
    log.error("Event {} from source {} is not handled", deadEvent.getEvent(), deadEvent.getSource());
}

From source file:org.grycap.gpf4med.event.DeadEventListener.java

private String getSource(final @Nullable DeadEvent deadEvent) {
    return (deadEvent != null && deadEvent.getSource() != null
            ? deadEvent.getSource().getClass().getCanonicalName()
            : "(not available)");
}

From source file:com.netflix.metacat.common.server.events.DeadEventHandler.java

/**
 * Noop event.//from w w  w.  j av a  2 s .  c  o m
 * @param event event
 */
@Subscribe
@AllowConcurrentEvents
public void logDeadEvent(final DeadEvent event) {
    final Object sourceEvent = event.getEvent();
    final Object source = event.getSource();
    log.debug("Unhandled event: {} from source: {}", sourceEvent, source);
}

From source file:nz.co.fortytwo.signalk.processor.SaveProcessor.java

@Subscribe
public void recordEvent(DeadEvent e) {
    logger.debug("Received dead event" + e.getSource());
}

From source file:org.graylog2.shared.events.DeadEventLoggingListener.java

@Subscribe
public void handleDeadEvent(DeadEvent event) {
    LOGGER.warn("Received unhandled event of type <{}> from event bus <{}>",
            event.getEvent().getClass().getCanonicalName(), event.getSource().toString());
    LOGGER.debug("Dead event contents: {}", event.getEvent());
}

From source file:com.oodrive.nuage.dtx.events.DeadEventHandler.java

/**
 * Accepts any dead event and logs a warning message.
 * //from  w  w  w . j  a  va 2  s  . c  om
 * @param deadEvent
 *            the {@link DeadEvent} to log
 */
@Subscribe
@AllowConcurrentEvents
public final void acceptDeadEvents(final DeadEvent deadEvent) {
    // TODO: attempt recovery of dead events
    final String logMsg = "Dead event received; source=" + deadEvent.getSource() + ", event="
            + deadEvent.getEvent();
    if (targetLogger == null) {
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug(logMsg);
        }
    } else {
        if (targetLogger.isDebugEnabled()) {
            targetLogger.debug(logMsg);
        }
    }

}

From source file:me.emily.irc.event.handlers.DeadEventLogger.java

@Subscribe
@AllowConcurrentEvents/*  ww  w. j  av  a2s.  c o  m*/
public void recieve(DeadEvent event) {
    log.info(String.format("DeadEvent: %s (%s) origin %s", String.valueOf(event.getEvent()),
            event.getEvent().getClass().getSimpleName(), String.valueOf(event.getSource())));
}

From source file:nz.co.fortytwo.signalk.processor.FullExportProcessor.java

/**
* @param pathEvent//from   w w  w .ja  va  2 s. c o m
*/
/*@Subscribe
public void recordEvent(PathEvent pathEvent) {
   if (pathEvent == null)
 return;
   if (pathEvent.getPath() == null)
 return;
   //if (logger.isTraceEnabled())logger.trace(this.wsSession + " received event " + pathEvent.getPath());
   if(logger.isDebugEnabled())logger.debug(this.wsSession + " received event " + pathEvent.getPath());
   // do we care?
   for (Subscription s : manager.getSubscriptions(wsSession)) {
 if (s.isActive() && !POLICY_FIXED.equals(s.getPolicy()) && s.isSubscribed(pathEvent.getPath())) {
    if(logger.isDebugEnabled())logger.debug("Adding to send queue : "+pathEvent.getPath());
    queue.add(pathEvent.getPath());
    sender.startSender();
    break;
 }
   }
        
}*/
@Subscribe
public void recordEvent(DeadEvent e) {
    logger.debug("Received dead event" + e.getSource());
}