|
ListenersBroker hosts node-local state about what notification streams have been defined. At the end of the day, it it has three distinct parts:
- dataChangeListeners, backed by DOMDataTreeChangeService
- notificationListeners, backed by DOMNotificationService
- deviceNotificationListeners, backed by NETCONF mounted devices
This is a ClassLoader singleton, accessed via static ListenersBroker.getInstance() – which is completely wrong, as it should be a a normal singleton managing the contents of ietf-restconf-monitoring streams' content, with the three parts managed separately as:
- SalRemoteImpl, which handles dataChangeListeners and notificationListeners
- OdlDeviceNotificationImpl, which handles deviceNotificationListeners
This deals with the first part of the problem: getting rid of ListenersBroker.getInstance() and properly injecting the appropriate service into all components accessing ListenersBroker instances.
|