Beispiel #1
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, ProcessInfo struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(9);
   if (incoming.get(0)) {
     struct.pId = iprot.readI32();
     struct.setPIdIsSet(true);
   }
   if (incoming.get(1)) {
     struct.pName = iprot.readString();
     struct.setPNameIsSet(true);
   }
   if (incoming.get(2)) {
     struct.applicationLabel = iprot.readString();
     struct.setApplicationLabelIsSet(true);
   }
   if (incoming.get(3)) {
     struct.isSystemApp = iprot.readBool();
     struct.setIsSystemAppIsSet(true);
   }
   if (incoming.get(4)) {
     struct.importance = iprot.readString();
     struct.setImportanceIsSet(true);
   }
   if (incoming.get(5)) {
     struct.versionName = iprot.readString();
     struct.setVersionNameIsSet(true);
   }
   if (incoming.get(6)) {
     struct.versionCode = iprot.readI32();
     struct.setVersionCodeIsSet(true);
   }
   if (incoming.get(7)) {
     {
       org.apache.thrift.protocol.TList _list5 =
           new org.apache.thrift.protocol.TList(
               org.apache.thrift.protocol.TType.STRING, iprot.readI32());
       struct.appSignatures = new ArrayList<String>(_list5.size);
       for (int _i6 = 0; _i6 < _list5.size; ++_i6) {
         String _elem7;
         _elem7 = iprot.readString();
         struct.appSignatures.add(_elem7);
       }
     }
     struct.setAppSignaturesIsSet(true);
   }
   if (incoming.get(8)) {
     struct.installationPkg = iprot.readString();
     struct.setInstallationPkgIsSet(true);
   }
 }
Beispiel #2
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, ProcessInfo struct)
        throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true) {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 1: // P_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.pId = iprot.readI32();
              struct.setPIdIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // P_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.pName = iprot.readString();
              struct.setPNameIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // APPLICATION_LABEL
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.applicationLabel = iprot.readString();
              struct.setApplicationLabelIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // IS_SYSTEM_APP
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isSystemApp = iprot.readBool();
              struct.setIsSystemAppIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // IMPORTANCE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.importance = iprot.readString();
              struct.setImportanceIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // VERSION_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.versionName = iprot.readString();
              struct.setVersionNameIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // VERSION_CODE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.versionCode = iprot.readI32();
              struct.setVersionCodeIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // APP_SIGNATURES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                struct.appSignatures = new ArrayList<String>(_list0.size);
                for (int _i1 = 0; _i1 < _list0.size; ++_i1) {
                  String _elem2;
                  _elem2 = iprot.readString();
                  struct.appSignatures.add(_elem2);
                }
                iprot.readListEnd();
              }
              struct.setAppSignaturesIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // INSTALLATION_PKG
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.installationPkg = iprot.readString();
              struct.setInstallationPkgIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }