public static void encode(CAMQPEncoder encoder, CAMQPDefinitionReleased data) { long listSize = 1; encoder.writeListDescriptor(descriptor, listSize); if ((data.options != null) && (data.options.size() > 0) && (data.isSetOptions)) { int size = data.options.size(); encoder.writeMapHeader(size); Set<Entry<String, String>> entries = data.options.entrySet(); for (Entry<String, String> entry : entries) { encoder.writeSymbol(entry.getKey()); encoder.writeUTF8String(entry.getValue()); } encoder.fillCompoundSize(size); } else { encoder.writeNull(); } encoder.fillCompoundSize(listSize); }
public static void encode(CAMQPEncoder encoder, CAMQPDefinitionFooter data) { long listSize = 2; encoder.writeListDescriptor(descriptor, listSize); if ((data.messageAttrs != null) && (data.messageAttrs.size() > 0) && (data.isSetMessageAttrs)) { int size = data.messageAttrs.size(); encoder.writeMapHeader(size); Set<Entry<String, String>> entries = data.messageAttrs.entrySet(); for (Entry<String, String> entry : entries) { encoder.writeSymbol(entry.getKey()); encoder.writeUTF8String(entry.getValue()); } encoder.fillCompoundSize(size); } else { encoder.writeNull(); } if ((data.deliveryAttrs != null) && (data.deliveryAttrs.size() > 0) && (data.isSetDeliveryAttrs)) { int size = data.deliveryAttrs.size(); encoder.writeMapHeader(size); Set<Entry<String, String>> entries = data.deliveryAttrs.entrySet(); for (Entry<String, String> entry : entries) { encoder.writeSymbol(entry.getKey()); encoder.writeUTF8String(entry.getValue()); } encoder.fillCompoundSize(size); } else { encoder.writeNull(); } encoder.fillCompoundSize(listSize); }