Class EventBusImpl

  • All Implemented Interfaces:
    org.somda.sdc.common.event.EventBus

    
    public class EventBusImpl
     implements EventBus
                        

    Default implementation of EventBus.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String identifier() Returns the name this event bus is identified by.
      synchronized void register(Object object) Registers an object to the event bus.
      synchronized void unregister(Object object) Unregisters an object from the event bus.
      synchronized void unregisterAll() Unregisters all observers currently registered at the event bus.
      void post(Object event) Distributes an event to all registered observers.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • identifier

         String identifier()

        Returns the name this event bus is identified by.

        Returns:

        the identifier of this event bus.

      • register

         synchronized void register(Object object)

        Registers an object to the event bus.

        Parameters:
        object - the object to register.
      • unregister

         synchronized void unregister(Object object)

        Unregisters an object from the event bus.

        Parameters:
        object - the object to unregister.
      • unregisterAll

         synchronized void unregisterAll()

        Unregisters all observers currently registered at the event bus.

      • post

         void post(Object event)

        Distributes an event to all registered observers.

        Parameters:
        event - the event to distribute.