tabish121 commented on a change in pull request #40:
URL: https://github.com/apache/qpid-proton-j/pull/40#discussion_r634466429
##########
File path: proton-j/src/main/java/org/apache/qpid/proton/message/Message.java
##########
@@ -210,4 +213,55 @@ public static Message create(Header header,
void clear();
MessageError getError();
+
+ /**
+ * @return the total number of body {@link Section} elements contained in
this {@link Message}
+ */
+ int getBodySectionCount();
+
+ /**
+ * Sets the body {@link Section} instances to use when encoding this
message. The value
+ * given replaces any existing section(s) assigned to this message through
the {@link Message#setBody(Object)}
+ * or {@link #addBodySection(Section)} methods. Calling this method with
a null
+ * or empty collection is equivalent to calling the {@link #clear()}
method.
+ *
+ * @param sections
+ * The {@link Collection} of {@link Section} instance to assign this
message.
+ *
+ * @return this {@link Message} instance.
+ */
+ Message setBodySections(Collection<Section> sections);
Review comment:
I didn't intend to add that level of validation to the existing version
of Message.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]