Class DefaultEventBus


  • public class DefaultEventBus
    extends ThreadSafeEventService
    An org.scijava.event.bushe.EventService implementation for SciJava.

    It is called "DefaultEventBus" rather than "DefaultEventService" to avoid a name clash with DefaultEventService, which is not an org.scijava.event.bushe.EventService but rather a SciJava Service implementation.

    Author:
    Curtis Rueden
    • Method Detail

      • publishNow

        public void publishNow​(Object event)
      • publishNow

        public void publishNow​(Type genericType,
                               Object event)
      • publishNow

        public void publishNow​(String topicName,
                               Object eventObj)
      • publishLater

        public void publishLater​(Object event)
      • publishLater

        public void publishLater​(Type genericType,
                                 Object event)
      • publishLater

        public void publishLater​(String topicName,
                                 Object eventObj)
      • publish

        protected void publish​(Object event,
                               String topic,
                               Object eventObj,
                               List subscribers,
                               List vetoSubscribers,
                               StackTraceElement[] callingStack)
        Description copied from class: ThreadSafeEventService
        All publish methods call this method. Extending classes only have to override this method to handle all publishing cases.
        Overrides:
        publish in class ThreadSafeEventService
        Parameters:
        event - the event to publish, null if publishing on a topic
        topic - if publishing on a topic, the topic to publish on, else null
        eventObj - if publishing on a topic, the eventObj to publish, else null
        subscribers - the subscribers to publish to - must be a snapshot copy
        vetoSubscribers - the veto subscribers to publish to - must be a snapshot copy.
        callingStack - the stack that called this publication, helpful for reporting errors on other threads