process method

bool process(
  1. TProtocol iprot,
  2. TProtocol oprot
)
override

Implementation

bool process(TProtocol iprot, TProtocol oprot) {
  TMessage msg = iprot.readMessageBegin();
  ProcessFunction? fn = PROCESS_MAP[msg.name];
  if (fn == null) {
    TProtocolUtil.skip(iprot, TType.STRUCT);
    iprot.readMessageEnd();
    TApplicationError x = new TApplicationError(
        TApplicationErrorType.UNKNOWN_METHOD,
        "Invalid method name: '" + msg.name + "'");
    oprot.writeMessageBegin(
        new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
    x.write(oprot);
    oprot.writeMessageEnd();
    oprot.trans_.flush();
    return true;
  }
  fn(msg.seqid, iprot, oprot);
  return true;
}