import io.netty.channel.socket.nio.NioServerSocketChannel;
+import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
import org.opendaylight.bgpcep.tcpmd5.nio.MD5ServerSocketChannel;
/**
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;
--- /dev/null
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.bgpcep.tcpmd5.netty;
+
+import io.netty.bootstrap.ChannelFactory;
+
+import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
+
+import com.google.common.base.Preconditions;
+
+public final class MD5NioServerSocketChannelFactory implements ChannelFactory<MD5NioServerSocketChannel> {
+ private final KeyAccessFactory keyAccessFactory;
+
+ public MD5NioServerSocketChannelFactory(final KeyAccessFactory keyAccessFactory) {
+ this.keyAccessFactory = Preconditions.checkNotNull(keyAccessFactory);
+ }
+
+ @Override
+ public MD5NioServerSocketChannel newChannel() {
+ return new MD5NioServerSocketChannel(keyAccessFactory);
+ }
+}
import io.netty.channel.socket.nio.NioSocketChannel;
+import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
import org.opendaylight.bgpcep.tcpmd5.nio.MD5SocketChannel;
/**
this.config = new ProxyMD5SocketChannelConfig(super.config(), channel);
}
+ public MD5NioSocketChannel(final KeyAccessFactory keyAccessFactory) {
+ super();
+ this.channel = new MD5SocketChannel(super.javaChannel(), keyAccessFactory);
+ this.config = new ProxyMD5SocketChannelConfig(super.config(), channel);
+ }
+
@Override
public MD5SocketChannelConfig config() {
return this.config;
--- /dev/null
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.bgpcep.tcpmd5.netty;
+
+import io.netty.bootstrap.ChannelFactory;
+
+import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
+
+import com.google.common.base.Preconditions;
+
+public final class MD5NioSocketChannelFactory implements ChannelFactory<MD5NioSocketChannel> {
+ private final KeyAccessFactory keyAccessFactory;
+
+ public MD5NioSocketChannelFactory(final KeyAccessFactory keyAccessFactory) {
+ this.keyAccessFactory = Preconditions.checkNotNull(keyAccessFactory);
+ }
+
+ @Override
+ public MD5NioSocketChannel newChannel() {
+ return new MD5NioSocketChannel(keyAccessFactory);
+ }
+}