private ServerBootstrap buildBootstrap(Config config) { final ServerBootstrap bootstrap = new ServerBootstrap(); parentGroup = config.epoll() ? new EpollEventLoopGroup() : new NioEventLoopGroup(); childGroup = config.epoll() ? new EpollEventLoopGroup() : new NioEventLoopGroup(); bootstrap .channel(config.epoll() ? EpollServerSocketChannel.class : NioServerSocketChannel.class) .group(parentGroup, childGroup); bootstrap.childHandler(channelInitializer); return bootstrap; }
private ServerBootstrap buildBootstrap(Config config) { final ServerBootstrap bootstrap = new ServerBootstrap(); parentGroup = config.epoll() ? new EpollEventLoopGroup() : new NioEventLoopGroup(); childGroup = config.epoll() ? new EpollEventLoopGroup() : new NioEventLoopGroup(); bootstrap .channel(config.epoll() ? EpollServerSocketChannel.class : NioServerSocketChannel.class) .group(parentGroup, childGroup); bootstrap.childHandler(channelInitializer); return bootstrap; }
private ServerBootstrap buildBootstrapFlashPolicy(Config config) { final ServerBootstrap bootstrap = new ServerBootstrap(); parentGroup = config.epoll() ? new EpollEventLoopGroup() : new NioEventLoopGroup(); childGroup = config.epoll() ? new EpollEventLoopGroup() : new NioEventLoopGroup(); bootstrap .channel(config.epoll() ? EpollServerSocketChannel.class : NioServerSocketChannel.class) .group(parentGroup, childGroup); // Set up the event pipeline factory. bootstrap.childHandler(new FlashPolicyServerChannelInitializer()); return bootstrap; }
private ServerBootstrap buildBootstrapFlashPolicy(Config config) { final ServerBootstrap bootstrap = new ServerBootstrap(); parentGroup = config.epoll() ? new EpollEventLoopGroup() : new NioEventLoopGroup(); childGroup = config.epoll() ? new EpollEventLoopGroup() : new NioEventLoopGroup(); bootstrap .channel(config.epoll() ? EpollServerSocketChannel.class : NioServerSocketChannel.class) .group(parentGroup, childGroup); // Set up the event pipeline factory. bootstrap.childHandler(new FlashPolicyServerChannelInitializer()); return bootstrap; }