rpcProgram.register(PortmapMapping.TRANSPORT_TCP);
}
}
private void startTCPServer() {
SimpleTcpServer tcpServer = new SimpleTcpServer(Nfs3Constant.PORT,
rpcProgram, 0) {
@Override
public ChannelPipelineFactory getPipelineFactory() {
return new ChannelPipelineFactory() {
@Override
public ChannelPipeline getPipeline() {
return Channels.pipeline(new RpcFrameDecoder(),
new SimpleTcpServerHandler(rpcProgram));
}
};
}
};
tcpServer.run();
}