few minor fixes around netconf subsystem
Change-Id: I16ccd383dbaba9049e9b4a21ef1910cd12e5542d
diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/DefaultNetconfDevice.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/DefaultNetconfDevice.java
index a36f8d2..27c2654 100644
--- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/DefaultNetconfDevice.java
+++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/DefaultNetconfDevice.java
@@ -41,7 +41,7 @@
/**
* Creates a new default NETCONF device with the information provided.
- * The device gets created only if no exception is thrwn while connecting to
+ * The device gets created only if no exception is thrown while connecting to
* it and establishing the NETCONF session.
* @param deviceInfo information about the device to be created.
* @throws NetconfException if there are problems in creating or establishing
diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfStreamThread.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfStreamThread.java
index 4d713f6..81c6f6e 100644
--- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfStreamThread.java
+++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfStreamThread.java
@@ -173,6 +173,7 @@
abstract NetconfMessageState evaluateChar(char c);
}
+ @Override
public void run() {
BufferedReader bufferReader = new BufferedReader(new InputStreamReader(in));
try {
@@ -224,6 +225,7 @@
netconfDeviceInfo, enableNotifications,
getMsgId(deviceReply), deviceReply);
if (enableNotifications) {
+ log.debug("dispatching to {} listeners", netconfDeviceEventListeners.size());
final String finalDeviceReply = deviceReply;
netconfDeviceEventListeners.forEach(
listener -> listener.event(new NetconfDeviceOutputEvent(
@@ -259,16 +261,19 @@
return Optional.empty();
}
+ @Override
public void addDeviceEventListener(NetconfDeviceOutputEventListener listener) {
if (!netconfDeviceEventListeners.contains(listener)) {
netconfDeviceEventListeners.add(listener);
}
}
+ @Override
public void removeDeviceEventListener(NetconfDeviceOutputEventListener listener) {
netconfDeviceEventListeners.remove(listener);
}
+ @Override
public void setEnableNotifications(boolean enableNotifications) {
this.enableNotifications = enableNotifications;
}