2 * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.netconf.transport.tcp;
10 import io.netty.bootstrap.Bootstrap;
11 import io.netty.bootstrap.ServerBootstrap;
12 import io.netty.channel.EventLoopGroup;
13 import io.netty.channel.socket.ServerSocketChannel;
14 import io.netty.channel.socket.SocketChannel;
15 import java.util.concurrent.ThreadFactory;
16 import org.eclipse.jdt.annotation.NonNullByDefault;
17 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.tcp.common.rev220524.tcp.common.grouping.Keepalives;
20 * Wrapper around a particular Netty transport implementation.
23 abstract sealed class AbstractNettyImpl permits EpollNettyImpl, NioNettyImpl {
25 abstract Class<? extends SocketChannel> channelClass();
27 abstract Class<? extends ServerSocketChannel> serverChannelClass();
29 abstract EventLoopGroup newEventLoopGroup(int numThreads, ThreadFactory threadFactory);
31 abstract boolean supportsKeepalives();
33 abstract void configureKeepalives(Bootstrap bootstrap, Keepalives keepalives);
35 abstract void configureKeepalives(ServerBootstrap bootstrap, Keepalives keepalives);
38 public abstract String toString();