Search in sources :

Example 1 with ChannelPipeline

use of org.apache.ratis.thirdparty.io.netty.channel.ChannelPipeline in project incubator-ratis by apache.

the class NettyServerStreamRpc method getInitializer.

private ChannelInitializer<SocketChannel> getInitializer() {
    return new ChannelInitializer<SocketChannel>() {

        @Override
        public void initChannel(SocketChannel ch) {
            ChannelPipeline p = ch.pipeline();
            p.addLast(newDecoder());
            p.addLast(newEncoder());
            p.addLast(newChannelInboundHandlerAdapter());
        }
    };
}
Also used : NioServerSocketChannel(org.apache.ratis.thirdparty.io.netty.channel.socket.nio.NioServerSocketChannel) SocketChannel(org.apache.ratis.thirdparty.io.netty.channel.socket.SocketChannel) EpollServerSocketChannel(org.apache.ratis.thirdparty.io.netty.channel.epoll.EpollServerSocketChannel) ChannelInitializer(org.apache.ratis.thirdparty.io.netty.channel.ChannelInitializer) ChannelPipeline(org.apache.ratis.thirdparty.io.netty.channel.ChannelPipeline)

Aggregations

ChannelInitializer (org.apache.ratis.thirdparty.io.netty.channel.ChannelInitializer)1 ChannelPipeline (org.apache.ratis.thirdparty.io.netty.channel.ChannelPipeline)1 EpollServerSocketChannel (org.apache.ratis.thirdparty.io.netty.channel.epoll.EpollServerSocketChannel)1 SocketChannel (org.apache.ratis.thirdparty.io.netty.channel.socket.SocketChannel)1 NioServerSocketChannel (org.apache.ratis.thirdparty.io.netty.channel.socket.nio.NioServerSocketChannel)1