Implementation of T-API notification rpcs
[transportpce.git] / nbinotifications / src / main / java / org / opendaylight / transportpce / nbinotifications / utils / TopicManager.java
index 6960ab58a2218487a5e9b7e7f74c9a9f424ef4e4..ea596de38d1e275af3eb28333a127f6adf373f3f 100644 (file)
@@ -95,6 +95,18 @@ public final class TopicManager {
         }
     }
 
+    public void deleteTapiTopic(String topic) {
+        if (!tapiPublisherMap.containsKey(topic)) {
+            LOG.info("Tapi topic: {} doesnt exist", topic);
+            return;
+        }
+        LOG.info("Deleting tapi topic: {}", topic);
+        tapiPublisherMap.remove(topic);
+        if (this.nbiNotificationsListener != null) {
+            this.nbiNotificationsListener.setTapiPublishersMap(tapiPublisherMap);
+        }
+    }
+
     public Map<String, Publisher<NotificationTapiService>> getTapiTopicMap() {
         return this.tapiPublisherMap;
     }