Package org.somda.sdc.common.event
Interface EventBus
-
- All Implemented Interfaces:
public interface EventBusAn interface with extended functionality that substitutes com.google.common.eventbus.EventBus.
Google Guice's com.google.common.eventbus.EventBus implementation lacks support for unregistering all subscribers at once, which is added by providing the method unregisterAll.
-
-
Method Summary
Modifier and Type Method Description abstract Stringidentifier()Returns the name this event bus is identified by. abstract voidregister(Object object)Registers an object to the event bus. abstract voidunregister(Object object)Unregisters an object from the event bus. abstract voidunregisterAll()Unregisters all observers currently registered at the event bus. abstract voidpost(Object event)Distributes an event to all registered observers. -
-
Method Detail
-
identifier
abstract String identifier()
Returns the name this event bus is identified by.
- Returns:
the identifier of this event bus.
-
register
abstract void register(Object object)
Registers an object to the event bus.
- Parameters:
object- the object to register.
-
unregister
abstract void unregister(Object object)
Unregisters an object from the event bus.
- Parameters:
object- the object to unregister.
-
unregisterAll
abstract void unregisterAll()
Unregisters all observers currently registered at the event bus.
-
-
-
-