@SuppressWarnings("unchecked")
public void publishEvent(Event event) throws NotificationException {
if (getExecutor() == null) {
String msg = "Notification Dispatcher not initialized";
log.error(msg);
throw new NotificationException(msg);
}
for (EventDispatcher dispatcher : dispatchers) {
try {
SubscriptionManager subManager = broker.getSubscriptionManager();
List<Subscription> subscriptions = subManager.getMatchingSubscriptions(event);