public class EventBus extends Object
Eveny Bus: Main event management class in SensorHub.
All event producers and listeners registrations must be done through
this class (instead of directly with the source module) in order to
benefit from more advanced event dispatching implementations such as
distributed event messaging.
Actual dispatching of events is done
Modifier and Type | Field and Description |
---|---|
static String |
MAIN_TOPIC |
Modifier and Type | Method and Description |
---|---|
static EventBus |
getInstance() |
void |
registerListener(String moduleID,
String topic,
IEventListener listener) |
IEventHandler |
registerProducer(String moduleID) |
IEventHandler |
registerProducer(String moduleID,
String topic) |
IEventHandler |
registerProducer(String moduleID,
String topic,
IEventHandler handlerImpl) |
void |
unregisterListener(String moduleID,
String topic,
IEventListener listener) |
void |
unregisterProducer(String moduleID,
String topic) |
public static final String MAIN_TOPIC
public static EventBus getInstance()
public IEventHandler registerProducer(String moduleID)
public IEventHandler registerProducer(String moduleID, String topic)
public IEventHandler registerProducer(String moduleID, String topic, IEventHandler handlerImpl)
public void registerListener(String moduleID, String topic, IEventListener listener)
public void unregisterListener(String moduleID, String topic, IEventListener listener)
Copyright © 2015 Sensia Software LLC. All rights reserved.