Exemplo n.º 1
0
 @Override
 public <T> void publish(EventScope scope, Object sender, T payload)
     throws UnsupportedOperationException {
   logger.debug(
       "Trying to publish payload [{}] from sender [{}] using scope [{}] on event bus [{}]",
       payload,
       sender,
       scope,
       this);
   if (eventScope.equals(scope)) {
     publish(sender, payload);
   } else if (parentEventBus != null) {
     parentEventBus.publish(scope, sender, payload);
   } else {
     logger.warn("Could not publish payload with scope [{}] on event bus [{}]", scope, this);
     throw new UnsupportedOperationException("Could not publish event with scope " + scope);
   }
 }