X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2FNetconfServerDispatcher.java;h=4f60788975fb910f5ae29a4fbac35b8f28d4fe08;hb=ff42855d9de0ab5e8c409ccde914e6f501676ddb;hp=c73840132f67856b296de749cbe60a961a6a2023;hpb=66275014176d47619096a53d59a0894b93798bdc;p=controller.git diff --git a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerDispatcher.java b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerDispatcher.java index c73840132f..4f60788975 100644 --- a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerDispatcher.java +++ b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/NetconfServerDispatcher.java @@ -8,31 +8,26 @@ package org.opendaylight.controller.netconf.impl; -import com.google.common.base.Optional; import io.netty.channel.ChannelFuture; +import io.netty.channel.EventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.util.concurrent.Promise; +import java.net.InetSocketAddress; import org.opendaylight.controller.netconf.api.NetconfSession; import org.opendaylight.controller.netconf.impl.util.DeserializerExceptionHandler; -import org.opendaylight.controller.netconf.util.AbstractSslChannelInitializer; +import org.opendaylight.controller.netconf.util.AbstractChannelInitializer; import org.opendaylight.protocol.framework.AbstractDispatcher; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLEngine; -import java.net.InetSocketAddress; - public class NetconfServerDispatcher extends AbstractDispatcher { - private final ServerSslChannelInitializer initializer; + private final ServerChannelInitializer initializer; - public NetconfServerDispatcher(final Optional maybeContext, - NetconfServerSessionNegotiatorFactory serverNegotiatorFactory, - NetconfServerSessionListenerFactory listenerFactory) { - this.initializer = new ServerSslChannelInitializer(maybeContext, serverNegotiatorFactory, listenerFactory); + public NetconfServerDispatcher(ServerChannelInitializer serverChannelInitializer, EventLoopGroup bossGroup, + EventLoopGroup workerGroup) { + super(bossGroup, workerGroup); + this.initializer = serverChannelInitializer; } - // FIXME change headers for all new source code files - // TODO test create server with same address twice public ChannelFuture createServer(InetSocketAddress address) { @@ -44,15 +39,13 @@ public class NetconfServerDispatcher extends AbstractDispatcher maybeContext, - NetconfServerSessionNegotiatorFactory negotiatorFactory, + public ServerChannelInitializer(NetconfServerSessionNegotiatorFactory negotiatorFactory, NetconfServerSessionListenerFactory listenerFactory) { - super(maybeContext); this.negotiatorFactory = negotiatorFactory; this.listenerFactory = listenerFactory; } @@ -63,10 +56,6 @@ public class NetconfServerDispatcher extends AbstractDispatcher