Removal of EventBusChangeRecorder
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / streams / listeners / ListenerAdapter.java
index 12a6ae4904dd63b6a2c66b4e1e0c86c12833b313..2645383b8896c9f890a9c262062addc9c66a02a9 100644 (file)
@@ -62,7 +62,6 @@ public class ListenerAdapter extends AbstractCommonSubscriber implements Cluster
      */
     ListenerAdapter(final YangInstanceIdentifier path, final String streamName,
             final NotificationOutputType outputType) {
-        register(this);
         setLocalNameOfPath(path.getLastPathArgument().getNodeType().getLocalName());
 
         this.outputType = Preconditions.checkNotNull(outputType);
@@ -114,13 +113,11 @@ public class ListenerAdapter extends AbstractCommonSubscriber implements Cluster
      * @param xml XML-formatted data.
      */
     private void prepareAndPostData(final String xml) {
-        final Event event = new Event(EventType.NOTIFY);
         if (this.outputType.equals(NotificationOutputType.JSON)) {
-            event.setData(XML.toJSONObject(xml).toString());
+            post(XML.toJSONObject(xml).toString());
         } else {
-            event.setData(xml);
+            post(xml);
         }
-        post(event);
     }
 
     /**