use of org.opendaylight.yangtools.yang.model.api.NotificationDefinition in project controller by opendaylight.
the class BindingToNormalizedNodeCodec method getNotificationClasses.
@SuppressWarnings("unchecked")
public Set<Class<? extends Notification>> getNotificationClasses(final Set<SchemaPath> interested) {
final Set<Class<? extends Notification>> result = new HashSet<>();
final Set<NotificationDefinition> knownNotifications = runtimeContext().getSchemaContext().getNotifications();
for (final NotificationDefinition notification : knownNotifications) {
if (interested.contains(notification.getPath())) {
try {
result.add((Class<? extends Notification>) runtimeContext().getClassForSchema(notification));
} catch (final IllegalStateException e) {
// Ignore
LOG.warn("Class for {} is currently not known.", notification.getPath(), e);
}
}
}
return result;
}
Aggregations