Package org.somda.sdc.common.event
Class EventBusImpl
-
- All Implemented Interfaces:
-
org.somda.sdc.common.event.EventBus
public class EventBusImpl implements EventBus
Default implementation of EventBus.
-
-
Method Summary
Modifier and Type Method Description Stringidentifier()Returns the name this event bus is identified by. synchronized voidregister(Object object)Registers an object to the event bus. synchronized voidunregister(Object object)Unregisters an object from the event bus. synchronized voidunregisterAll()Unregisters all observers currently registered at the event bus. voidpost(Object event)Distributes an event to all registered observers. -
-
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.
-
-
-
-