X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-netty-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fnettyutil%2FAbstractNetconfSessionNegotiator.java;h=6d4c1067b8455e377c47dd3e3de84abae15b4785;hb=93154ea2573eb37ebcca4c360bf538d8d92967f9;hp=e5c3c12b992246516165e94f1f0dbb48de3ddefd;hpb=ee0877c07ff700157dd9fc2e445df095c88f79bc;p=controller.git diff --git a/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/AbstractNetconfSessionNegotiator.java b/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/AbstractNetconfSessionNegotiator.java index e5c3c12b99..6d4c1067b8 100644 --- a/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/AbstractNetconfSessionNegotiator.java +++ b/opendaylight/netconf/netconf-netty-util/src/main/java/org/opendaylight/controller/netconf/nettyutil/AbstractNetconfSessionNegotiator.java @@ -34,7 +34,6 @@ import org.opendaylight.controller.netconf.nettyutil.handler.NetconfXMLToHelloMe import org.opendaylight.controller.netconf.nettyutil.handler.NetconfXMLToMessageDecoder; import org.opendaylight.controller.netconf.util.messages.FramingMechanism; import org.opendaylight.controller.netconf.util.messages.NetconfHelloMessage; -import org.opendaylight.controller.netconf.util.xml.XmlUtil; import org.opendaylight.protocol.framework.AbstractSessionNegotiator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -66,8 +65,8 @@ public abstract class AbstractNetconfSessionNegotiator

promise, Channel channel, Timer timer, - L sessionListener, long connectionTimeoutMillis) { + protected AbstractNetconfSessionNegotiator(final P sessionPreferences, final Promise promise, final Channel channel, final Timer timer, + final L sessionListener, final long connectionTimeoutMillis) { super(promise, channel); this.sessionPreferences = sessionPreferences; this.promise = promise; @@ -83,7 +82,7 @@ public abstract class AbstractNetconfSessionNegotiator

future = sslHandler.get().handshakeFuture(); future.addListener(new GenericFutureListener>() { @Override - public void operationComplete(Future future) { + public void operationComplete(final Future future) { Preconditions.checkState(future.isSuccess(), "Ssl handshake was not successful"); LOG.debug("Ssl handshake complete"); start(); @@ -94,7 +93,7 @@ public abstract class AbstractNetconfSessionNegotiator

getSslHandler(Channel channel) { + private static Optional getSslHandler(final Channel channel) { final SslHandler sslHandler = channel.pipeline().get(SslHandler.class); return sslHandler == null ? Optional. absent() : Optional.of(sslHandler); } @@ -105,7 +104,7 @@ public abstract class AbstractNetconfSessionNegotiator

() { @Override - public void operationComplete(ChannelFuture future) throws Exception { + public void operationComplete(final ChannelFuture future) throws Exception { if(future.isSuccess()) { LOG.debug("Channel {} closed: success", future.channel()); } else { @@ -159,7 +158,7 @@ public abstract class AbstractNetconfSessionNegotiator