X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-client%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fclient%2FNetconfClientSessionNegotiator.java;h=8a40bee994788c9931649e58b9d98e28df34165e;hp=83f49b2635a5d0699d2b31615fc3c20927d4f878;hb=6dae254dbc2940d1f0f372d65d69b0e0dda415fe;hpb=7787fed520d06122c9b9d80934b73c7e77d44112 diff --git a/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiator.java b/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiator.java index 83f49b2635..8a40bee994 100644 --- a/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiator.java +++ b/opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClientSessionNegotiator.java @@ -8,10 +8,15 @@ package org.opendaylight.controller.netconf.client; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpression; - +import io.netty.channel.Channel; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.util.Timer; +import io.netty.util.concurrent.Promise; import org.opendaylight.controller.netconf.api.NetconfClientSessionPreferences; +import org.opendaylight.controller.netconf.api.NetconfDocumentedException; import org.opendaylight.controller.netconf.api.NetconfMessage; import org.opendaylight.controller.netconf.util.AbstractChannelInitializer; import org.opendaylight.controller.netconf.util.AbstractNetconfSessionNegotiator; @@ -26,13 +31,8 @@ import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; -import io.netty.channel.Channel; -import io.netty.channel.ChannelFuture; -import io.netty.channel.ChannelFutureListener; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandlerAdapter; -import io.netty.util.Timer; -import io.netty.util.concurrent.Promise; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathExpression; public class NetconfClientSessionNegotiator extends AbstractNetconfSessionNegotiator @@ -54,7 +54,7 @@ public class NetconfClientSessionNegotiator extends } @Override - protected void handleMessage(NetconfHelloMessage netconfMessage) { + protected void handleMessage(NetconfHelloMessage netconfMessage) throws NetconfDocumentedException { NetconfClientSession session = super.getSessionForHelloMessage(netconfMessage); if (shouldUseExi(netconfMessage.getDocument())){ @@ -109,7 +109,7 @@ public class NetconfClientSessionNegotiator extends } @Override - protected NetconfClientSession getSession(NetconfClientSessionListener sessionListener, Channel channel, NetconfHelloMessage message) { + protected NetconfClientSession getSession(NetconfClientSessionListener sessionListener, Channel channel, NetconfHelloMessage message) throws NetconfDocumentedException { return new NetconfClientSession(sessionListener, channel, extractSessionId(message.getDocument()), NetconfMessageUtil.extractCapabilitiesFromHello(message.getDocument())); }