Class DeferredEventBus


  • @Singleton
    public class DeferredEventBus
    extends EventBus
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void post​(java.lang.Object object)
      Posts provided event to all registered subscribers.
      void register​(java.lang.Object object)
      Registers subscriber to EventBus.
      void replay()  
      void unregister​(java.lang.Object object)
      Unregisters all subscribed methods from provided subscriber object.
      • Methods inherited from class java.lang.Object

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

      • register

        public void register​(java.lang.Object object)
        Description copied from class: EventBus
        Registers subscriber to EventBus. All methods in subscriber and it's parent classes are checked for Subscribe annotation and then added to map of subscriptions.
        Overrides:
        register in class EventBus
        Parameters:
        object - subscriber to register
      • unregister

        public void unregister​(java.lang.Object object)
        Description copied from class: EventBus
        Unregisters all subscribed methods from provided subscriber object.
        Overrides:
        unregister in class EventBus
        Parameters:
        object - object to unsubscribe from
      • post

        public void post​(java.lang.Object object)
        Description copied from class: EventBus
        Posts provided event to all registered subscribers. Subscriber calls are invoked immediately, ordered by priority then their declaring class' name.
        Overrides:
        post in class EventBus
        Parameters:
        object - event to post
      • replay

        public void replay()