use of org.eclipse.smarthome.core.events.EventFactory in project smarthome by eclipse.
the class EventHandler method handleEvent.
private void handleEvent(final String type, final String payload, final String topic, @Nullable final String source) {
final EventFactory eventFactory = typedEventFactories.get(type);
if (eventFactory == null) {
logger.debug("Could not find an Event Factory for the event type '{}'.", type);
return;
}
final Set<EventSubscriber> eventSubscribers = getEventSubscribers(type);
if (eventSubscribers.isEmpty()) {
return;
}
final Event eshEvent = createESHEvent(eventFactory, type, payload, topic, source);
if (eshEvent == null) {
return;
}
dispatchESHEvent(eventSubscribers, eshEvent);
}
Aggregations