use of com.jim.framework.rpc.keepalive.ClientHeartbeatHandler in project jim-framework by jiangmin168168.
the class RpcClientInitializer method initChannel.
@Override
protected void initChannel(SocketChannel socketChannel) throws Exception {
ChannelPipeline cp = socketChannel.pipeline();
cp.addLast(new RpcEncoder(RpcRequest.class));
cp.addLast(new RpcDecoder(RpcResponse.class));
cp.addLast(new IdleStateHandler(0, 0, Constants.ALLIDLE_TIME_SECONDS));
cp.addLast(new ClientHeartbeatHandler());
cp.addLast(new RpcClientInvoker(this.getFilterMap()));
}
Aggregations