Initial implementation of netconf monitoring module according to http://tools.ietf...
[controller.git] / opendaylight / netconf / netconf-client / src / main / java / org / opendaylight / controller / netconf / client / NetconfClientSessionNegotiator.java
index 17a55c52bcbf7b1a6dd13a9afcbaa61a382d9388..3340dde883f09cfb077c6c1dcc6b6ea1b0ca8592 100644 (file)
@@ -13,6 +13,7 @@ import com.google.common.collect.Collections2;
 import io.netty.channel.Channel;
 import io.netty.util.Timer;
 import io.netty.util.concurrent.Promise;
+import org.opendaylight.controller.netconf.api.NetconfMessage;
 import org.opendaylight.controller.netconf.api.NetconfSessionPreferences;
 import org.opendaylight.controller.netconf.util.AbstractNetconfSessionNegotiator;
 import org.opendaylight.controller.netconf.util.xml.XMLNetconfUtil;
@@ -66,7 +67,8 @@ public class NetconfClientSessionNegotiator extends
     }
 
     @Override
-    protected NetconfClientSession getSession(SessionListener sessionListener, Channel channel, Document doc) {
-        return new NetconfClientSession(sessionListener, channel, extractSessionId(doc), getCapabilities(doc));
+    protected NetconfClientSession getSession(SessionListener sessionListener, Channel channel, NetconfMessage message) {
+        return new NetconfClientSession(sessionListener, channel, extractSessionId(message.getDocument()),
+                getCapabilities(message.getDocument()));
     }
 }