use of org.apache.ratis.thirdparty.io.netty.channel.socket.SocketChannel 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());
}
};
}
use of org.apache.ratis.thirdparty.io.netty.channel.socket.SocketChannel 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());
}
};
}
use of org.apache.ratis.thirdparty.io.netty.channel.socket.SocketChannel 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());
}
};
}
Aggregations