+ @Nonnull protected Map.Entry<InstanceIdentifier<?>, BindingCodecTreeNode<?>> getSubtreeCodec(
+ final YangInstanceIdentifier domIdentifier) {
+
+ final BindingCodecTree currentCodecTree = codecRegistry.getCodecContext();
+ final InstanceIdentifier<?> bindingPath = codecRegistry.fromYangInstanceIdentifier(domIdentifier);
+ Preconditions.checkArgument(bindingPath != null);
+ /**
+ * If we are able to deserialize YANG instance identifier, getSubtreeCodec must
+ * return non-null value.
+ */
+ final BindingCodecTreeNode<?> codecContext = currentCodecTree.getSubtreeCodec(bindingPath);
+ return new SimpleEntry<InstanceIdentifier<?>, BindingCodecTreeNode<?>>(bindingPath, codecContext);
+ }
+
+ 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
+ }
+ }
+ }
+ return result;
+ }
+