in protonj2/src/main/java/org/apache/qpid/protonj2/codec/encoders/messaging/PropertiesTypeEncoder.java [49:105]
public void writeElement(Properties properties, int index, ProtonBuffer buffer, Encoder encoder, EncoderState state) {
switch (index) {
case 0:
encoder.writeObject(buffer, state, properties.getMessageId());
break;
case 1:
encoder.writeBinary(buffer, state, properties.getUserId());
break;
case 2:
encoder.writeString(buffer, state, properties.getTo());
break;
case 3:
encoder.writeString(buffer, state, properties.getSubject());
break;
case 4:
encoder.writeString(buffer, state, properties.getReplyTo());
break;
case 5:
encoder.writeObject(buffer, state, properties.getCorrelationId());
break;
case 6:
encoder.writeSymbol(buffer, state, properties.getContentType());
break;
case 7:
encoder.writeSymbol(buffer, state, properties.getContentEncoding());
break;
case 8:
if (properties.hasAbsoluteExpiryTime()) {
encoder.writeTimestamp(buffer, state, properties.getAbsoluteExpiryTime());
} else {
buffer.writeByte(EncodingCodes.NULL);
}
break;
case 9:
if (properties.hasCreationTime()) {
encoder.writeTimestamp(buffer, state, properties.getCreationTime());
} else {
buffer.writeByte(EncodingCodes.NULL);
}
break;
case 10:
encoder.writeString(buffer, state, properties.getGroupId());
break;
case 11:
if (properties.hasGroupSequence()) {
encoder.writeUnsignedInteger(buffer, state, properties.getGroupSequence());
} else {
buffer.writeByte(EncodingCodes.NULL);
}
break;
case 12:
encoder.writeString(buffer, state, properties.getReplyToGroupId());
break;
default:
throw new IllegalArgumentException("Unknown Properties value index: " + index);
}
}