| 106 | class TDispatchProcessor : public TProcessor { |
| 107 | public: |
| 108 | bool process(std::shared_ptr<protocol::TProtocol> in, |
| 109 | std::shared_ptr<protocol::TProtocol> out, |
| 110 | void* connectionContext) override { |
| 111 | std::string fname; |
| 112 | protocol::TMessageType mtype; |
| 113 | int32_t seqid; |
| 114 | in->readMessageBegin(fname, mtype, seqid); |
| 115 | |
| 116 | if (mtype != protocol::T_CALL && mtype != protocol::T_ONEWAY) { |
| 117 | TOutput::instance().printf("received invalid message type %d from client", mtype); |
| 118 | return false; |
| 119 | } |
| 120 | |
| 121 | return dispatchCall(in.get(), out.get(), fname, seqid, connectionContext); |
| 122 | } |
| 123 | |
| 124 | protected: |
| 125 | virtual bool dispatchCall(apache::thrift::protocol::TProtocol* in, |
nothing calls this directly
no test coverage detected