Interface EventBusManager

All Superinterfaces:
io.vertigo.core.node.component.Component, io.vertigo.core.node.component.CoreComponent, io.vertigo.core.node.component.Manager
All Known Implementing Classes:
EventBusManagerImpl

public interface EventBusManager extends io.vertigo.core.node.component.Manager
Inter-components events manager. Publisher / Subscriber on event type for communication between components. Listeners are configured to listen on the same JVM. The process is synchronous. the suscribers execute their methods on the same thread. The errors are not caught. If one of the suscriber throws an error, this error is thrown on the post(). The purpose of this pattern is to decouple the managers. Managers that post don't need to know which components are listening. Example : - flushes local cache when an object is updated, deleted, inserted in the store WARNING : By default, EventBus is not distributed. A cache component should listen : a modification in one node should flush cache all over the system : it's cache component responsibility to do this An audit component should listen to do the audit log
Author:
pchretien, npiedeloup
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    post(Event event)
    Posts an event.
    void
    registerDead(Consumer<Event> eventConsumer)
    Registers a dead event consumer.
  • Method Details

    • post

      void post(Event event)
      Posts an event.
      Parameters:
      event - Event
    • registerDead

      void registerDead(Consumer<Event> eventConsumer)
      Registers a dead event consumer.
      Parameters:
      eventConsumer - the consumer