BUG-634: improve netty interface
[bgpcep.git] / tcp-md5 / netty / src / main / java / org / opendaylight / bgpcep / tcpmd5 / netty / MD5NioServerSocketChannel.java
index f8a4dfdd685bbc0198fd762a04477776c6be29a4..5e8cb23923363a11786b9839dd29dfda55e1f7e5 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.bgpcep.tcpmd5.netty;
 
 import io.netty.channel.socket.nio.NioServerSocketChannel;
 
+import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
 import org.opendaylight.bgpcep.tcpmd5.nio.MD5ServerSocketChannel;
 
 /**
@@ -25,6 +26,12 @@ public class MD5NioServerSocketChannel extends NioServerSocketChannel {
                this.config = new ProxyMD5ServerSocketChannelConfig(super.config(), channel);
        }
 
+       public MD5NioServerSocketChannel(final KeyAccessFactory keyAccessFactory) {
+               super();
+               this.channel = new MD5ServerSocketChannel(super.javaChannel(), keyAccessFactory);
+               this.config = new ProxyMD5ServerSocketChannelConfig(super.config(), channel);
+       }
+
        @Override
        public MD5ServerSocketChannelConfig config() {
                return this.config;