Clean-up netconf-client
[netconf.git] / netconf / netconf-client / src / main / java / org / opendaylight / netconf / client / SshClientChannelInitializer.java
index fd335304c0f1cee5d1b3345d0488c19cc8db49f6..65a433fe16d03dce4a4b024cbf0a98526e5631eb 100644 (file)
@@ -13,7 +13,6 @@ import java.io.IOException;
 import org.opendaylight.netconf.nettyutil.AbstractChannelInitializer;
 import org.opendaylight.netconf.nettyutil.handler.ssh.authentication.AuthenticationHandler;
 import org.opendaylight.netconf.nettyutil.handler.ssh.client.AsyncSshHandler;
-import org.opendaylight.protocol.framework.SessionListenerFactory;
 
 final class SshClientChannelInitializer extends AbstractChannelInitializer<NetconfClientSession> {
 
@@ -44,11 +43,6 @@ final class SshClientChannelInitializer extends AbstractChannelInitializer<Netco
     protected void initializeSessionNegotiator(final Channel ch,
                                                final Promise<NetconfClientSession> promise) {
         ch.pipeline().addAfter(NETCONF_MESSAGE_DECODER,  AbstractChannelInitializer.NETCONF_SESSION_NEGOTIATOR,
-                negotiatorFactory.getSessionNegotiator(new SessionListenerFactory<NetconfClientSessionListener>() {
-                    @Override
-                    public NetconfClientSessionListener getSessionListener() {
-                        return sessionListener;
-                    }
-                }, ch, promise));
+                negotiatorFactory.getSessionNegotiator(() -> sessionListener, ch, promise));
     }
 }