Search in sources :

Example 1 with ResponseEncoder

use of org.apache.ratis.experiments.nettyzerocopy.encoders.ResponseEncoder in project incubator-ratis by apache.

the class NettyServer method getInitializer.

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

        @Override
        public void initChannel(SocketChannel ch) throws Exception {
            ChannelPipeline p = ch.pipeline();
            p.addLast(new RequestDecoderComposite());
            p.addLast(new ResponseEncoder());
            p.addLast(getServerHandler());
        }
    };
}
Also used : SocketChannel(org.apache.ratis.thirdparty.io.netty.channel.socket.SocketChannel) NioServerSocketChannel(org.apache.ratis.thirdparty.io.netty.channel.socket.nio.NioServerSocketChannel) RequestDecoderComposite(org.apache.ratis.experiments.nettyzerocopy.decoders.RequestDecoderComposite) ResponseEncoder(org.apache.ratis.experiments.nettyzerocopy.encoders.ResponseEncoder)

Aggregations

RequestDecoderComposite (org.apache.ratis.experiments.nettyzerocopy.decoders.RequestDecoderComposite)1 ResponseEncoder (org.apache.ratis.experiments.nettyzerocopy.encoders.ResponseEncoder)1 SocketChannel (org.apache.ratis.thirdparty.io.netty.channel.socket.SocketChannel)1 NioServerSocketChannel (org.apache.ratis.thirdparty.io.netty.channel.socket.nio.NioServerSocketChannel)1