[NETCONF-1150] Don't use NotificationListener in NETCONF components Created: 06/Sep/23  Updated: 07/Sep/23  Resolved: 07/Sep/23

Status: Resolved
Project: netconf
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Medium
Reporter: Ruslan Kashapov Assignee: Ruslan Kashapov
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks MDSAL-497 Remove support for listening on gener... Resolved

 Description   

Usage of generated interfaces extending org.opendaylight.yangtools.yang.binding.NotificationListener interface was deprecated for removal via MDSAL-496.

In order to eliminate dependency on deprecated interface the affected logic require update to use org.opendaylight.mdsal.binding.api.NotificationService.Listener instead.

Affected components:

./netconf/plugins/netconf-server-mdsal/src/main/java/org/opendaylight/netconf/server/mdsal/notifications/CreateSubscription.java:        subscriptions.add(notifications.registerNotificationListener(streamNameType,
./netconf/plugins/netconf-server-mdsal/src/main/java/org/opendaylight/netconf/server/mdsal/notifications/NetconfNotificationManager.java:    public synchronized Registration registerNotificationListener(final StreamNameType stream,
./netconf/plugins/netconf-server-mdsal/src/test/java/org/opendaylight/netconf/server/mdsal/notifications/NetconfNotificationManagerTest.java:        try (var reg = netconfNotificationManager.registerNotificationListener(
./netconf/plugins/netconf-server-mdsal/src/test/java/org/opendaylight/netconf/server/mdsal/notifications/NetconfNotificationManagerTest.java:        netconfNotificationManager.registerNotificationListener(
./netconf/plugins/netconf-server-mdsal/src/test/java/org/opendaylight/netconf/server/mdsal/notifications/NetconfNotificationManagerTest.java:        netconfNotificationManager.registerNotificationListener(testStream.getName(), listener);
./netconf/plugins/netconf-server-mdsal/src/test/java/org/opendaylight/netconf/server/mdsal/notifications/NetconfNotificationManagerTest.java:                .registerNotificationListener(NetconfNotificationManager.BASE_NETCONF_STREAM.getName(), listener);
./netconf/plugins/netconf-server-mdsal/src/test/java/org/opendaylight/netconf/server/mdsal/notifications/CreateSubscriptionTest.java:                .registerNotificationListener(any(StreamNameType.class), any(NetconfNotificationListener.class));
./netconf/plugins/netconf-client-mdsal/src/main/java/org/opendaylight/netconf/client/mdsal/spi/NetconfDeviceNotificationService.java:    public synchronized <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(
./netconf/plugins/netconf-client-mdsal/src/main/java/org/opendaylight/netconf/client/mdsal/spi/NetconfDeviceNotificationService.java:    public synchronized <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(
./netconf/plugins/netconf-client-mdsal/src/main/java/org/opendaylight/netconf/client/mdsal/spi/NetconfDeviceNotificationService.java:        return registerNotificationListener(listener, Lists.newArrayList(types));
./netconf/plugins/netconf-client-mdsal/src/main/java/org/opendaylight/netconf/client/mdsal/spi/NetconfDeviceNotificationService.java:    public synchronized Registration registerNotificationListeners(
./netconf/plugins/netconf-client-mdsal/src/test/java/org/opendaylight/netconf/client/mdsal/spi/NetconfDeviceNotificationServiceTest.java:        service.registerNotificationListener(listener1, path1);
./netconf/plugins/netconf-client-mdsal/src/test/java/org/opendaylight/netconf/client/mdsal/spi/NetconfDeviceNotificationServiceTest.java:        registration = service.registerNotificationListener(listener2, path2);
./netconf/netconf/tools/netconf-test-perf/src/main/java/org/opendaylight/netconf/test/perf/MountedDeviceListener.java:        listeners.put(path, notificationService.registerNotificationListener(
./netconf/protocol/netconf-server/src/main/java/org/opendaylight/netconf/server/api/notifications/NetconfNotificationRegistry.java:    @NonNull Registration registerNotificationListener(@NonNull StreamNameType stream,
./netconf/restconf/sal-restconf-broker/src/main/java/org/opendaylight/netconf/sal/restconf/broker/impl/DataBrokerServiceImpl.java:        final ListenerRegistration<?> reg = restConfListenableEventStreamContext.registerNotificationListener(remoteDataChangeNotificationListener);
./netconf/restconf/sal-restconf-broker/src/main/java/org/opendaylight/netconf/sal/restconf/broker/impl/NotificationServiceImpl.java:    public <T extends Notification> ListenerRegistration<NotificationListener<T>> registerNotificationListener(Class<T> notificationType, NotificationListener<T> listener) {
./netconf/restconf/sal-restconf-broker/src/main/java/org/opendaylight/netconf/sal/restconf/broker/impl/NotificationServiceImpl.java:                .registerNotificationListener(remoteNotificationListener);
./netconf/restconf/sal-restconf-broker/src/main/java/org/opendaylight/netconf/sal/restconf/broker/impl/NotificationServiceImpl.java:    public ListenerRegistration<org.opendaylight.yangtools.yang.binding.NotificationListener> registerNotificationListener(org.opendaylight.yangtools.yang.binding.NotificationListener listener) {
./netconf/restconf/sal-restconf-broker/src/main/java/org/opendaylight/netconf/sal/restconf/broker/impl/NotificationServiceImpl.java:        return restconfClientContext.getEventStreamContext(desiredEventStream.get(desiredEventStream.get(notificationStreamName))).registerNotificationListener(listener);
./netconf/restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfDataServiceImpl.java:            : listenersBroker.registerNotificationListener(Absolute.of(notifName), streamName, outputType);
./netconf/restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/listeners/DeviceNotificationListenerAdaptor.java:            setRegistration(notificationService.registerNotificationListener(this, paths));
./netconf/restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/listeners/NotificationListenerAdapter.java:            setRegistration(notificationService.registerNotificationListener(this, getSchemaPath()));
./netconf/restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/streams/listeners/ListenersBroker.java:    public NotificationListenerAdapter registerNotificationListener(final Absolute schemaPath,
./netconf/restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/streams/listeners/JsonNotificationListenerTest.java:        final NotificationListenerAdapter notifiAdapter = ListenersBroker.getInstance().registerNotificationListener(
./netconf/restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/streams/listeners/XmlNotificationListenerTest.java:        final NotificationListenerAdapter notifiAdapter = ListenersBroker.getInstance().registerNotificationListener(


 Comments   
Comment by Ruslan Kashapov [ 07/Sep/23 ]

NETCONF uses DOMNotificationListener only, no dependency on MDSAL deprecated interface
except sal-restconf-broker which is excluded from build and targeted for re-implementation.
Nothing to do here. resolving as  Won't Do

Generated at Wed Feb 07 20:16:48 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.