libthrift0.9.0解析(一)之TServer

libthrift0.9.0解析(一)之TServer

TServer

属性serverTransport 为TServerTransport类型,类图如下:

libthrift0.9.0解析(一)之TServer

构造函数,简单根据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(); 为抽象类,供子类实现。子类有:

libthrift0.9.0解析(一)之TServer

你可能感兴趣的:(server)