TServer
属性serverTransport 为TServerTransport类型,类图如下:
构造函数,简单根据args设置几个成员,大部分是工厂类:
protected TServer(AbstractServerArgs args) { processorFactory_ = args.processorFactory; // 处理器工厂 serverTransport_ = args.serverTransport; // 服务器transport,具有listen和accept功能 inputTransportFactory_ = args.inputTransportFactory; // 输入transport outputTransportFactory_ = args.outputTransportFactory; // 输出transport inputProtocolFactory_ = args.inputProtocolFactory; // 输入protocol outputProtocolFactory_ = args.outputProtocolFactory; // 输出protocol }
public abstract void serve(); 为抽象类,供子类实现。子类有: