Search in sources :

Example 1 with RequestEncoder

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

the class NettyClient 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 RequestEncoder());
            p.addLast(new ResponseDecoder());
            p.addLast(getClientHandler());
        }
    };
}
Also used : NioSocketChannel(org.apache.ratis.thirdparty.io.netty.channel.socket.nio.NioSocketChannel) SocketChannel(org.apache.ratis.thirdparty.io.netty.channel.socket.SocketChannel) ResponseDecoder(org.apache.ratis.experiments.nettyzerocopy.decoders.ResponseDecoder) RequestEncoder(org.apache.ratis.experiments.nettyzerocopy.encoders.RequestEncoder)

Aggregations

ResponseDecoder (org.apache.ratis.experiments.nettyzerocopy.decoders.ResponseDecoder)1 RequestEncoder (org.apache.ratis.experiments.nettyzerocopy.encoders.RequestEncoder)1 SocketChannel (org.apache.ratis.thirdparty.io.netty.channel.socket.SocketChannel)1 NioSocketChannel (org.apache.ratis.thirdparty.io.netty.channel.socket.nio.NioSocketChannel)1