Class EventBus


  • public class EventBus
    extends java.lang.Object
    Static wrapper for the event bus (IEventBus implementation). Allows any class to subscribe and publish events to the bus
    • Constructor Summary

      Constructors 
      Constructor Description
      EventBus()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void publishEvent​(IEvent event)
      Publish an event to the bus
      static void registerEventSubscriber​(java.lang.Object subscriber)
      Attempts to register an object as an event subscriber, all methods with @EventHandler annotation will be registered
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EventBus

        public EventBus()
    • Method Detail

      • publishEvent

        public static void publishEvent​(IEvent event)
        Publish an event to the bus
        Parameters:
        event - to publish
      • registerEventSubscriber

        public static void registerEventSubscriber​(java.lang.Object subscriber)
        Attempts to register an object as an event subscriber, all methods with @EventHandler annotation will be registered
        Parameters:
        subscriber - instance of a class to register