Class EventPublisher

java.lang.Object
es.urjc.etsii.grafo.events.EventPublisher

@Component public class EventPublisher extends Object
Distributes the given event to different application components.
  • Constructor Details

    • EventPublisher

      public EventPublisher(org.springframework.context.ApplicationEventPublisher publisher)
      Spring integration constructor
      Parameters:
      publisher - Spring ApplicationEventPublisher
  • Method Details

    • getInstance

      public static EventPublisher getInstance()
      Get event publisher instance
      Returns:
      event publisher instance
    • publishEvent

      public void publishEvent(MorkEvent event)
      Asynchronously send and process an event
      Parameters:
      event - Event to propagate
    • block

      public void block()
      Block dispatch of all future events. All calls to publishEvent() will be ignored.
    • unblock

      public void unblock()
      Enable event dispatching.