contentSize = s.getEncodedSize(); dataSections.add(s); s = iter.hasNext() ? iter.next() : null; contentSize += s.getEncodedSize(); dataSections.add(s); s = iter.hasNext() ? iter.next() : null; contentSize += s.getEncodedSize(); dataSections.add(s); s = iter.hasNext() ? iter.next() : null;
private void dispose() { _section.dispose(); _metaData.dispose(); } }
@Override public QpidByteBuffer getContent(int offset, int length) { try (QpidByteBuffer content = _section.getEncodedForm()) { return content.view(offset, length); } }
|| section instanceof AmqpSequenceSection) contentSize += section.getEncodedSize(); iter.remove(); section.dispose();
|| section instanceof AmqpSequenceSection) bodySectionContent.add(section.getEncodedForm()); section.dispose();
else if (bodySection instanceof AmqpValueSection && bodySection.getValue() == null)
@Override public Message_1_0 createMessage(final QpidByteBuffer payload, final MessageStore store, final Object connectionReference) { List<EncodingRetainingSection<?>> dataSections = new ArrayList<>(); List<EncodingRetainingSection<?>> allSections; try { allSections = getSectionDecoder().parseAll(payload); } catch (AmqpErrorException e) { throw new AmqpErrorRuntimeException(e); } MessageMetaData_1_0 mmd = createMessageMetaData(allSections, dataSections); MessageHandle<MessageMetaData_1_0> handle = store.addMessage(mmd); for (EncodingRetainingSection<?> dataSection : dataSections) { try (QpidByteBuffer encodedForm = dataSection.getEncodedForm()) { handle.addContent(encodedForm); } dataSection.dispose(); } final StoredMessage<MessageMetaData_1_0> storedMessage = handle.allContentAdded(); return new Message_1_0(storedMessage, connectionReference); }
if(firstBodySection instanceof AmqpValueSection) bodyObject = convertValue(firstBodySection.getValue());
null, serverMessage.getArrivalTime(), bodySection.getEncodedSize());
if((section = message.getDeliveryAnnotationsSection()) != null) payload.add(section.getEncodedForm()); section.dispose(); payload.add(section.getEncodedForm()); section.dispose(); payload.add(section.getEncodedForm()); section.dispose(); payload.add(section.getEncodedForm()); section.dispose(); payload.add(section.getEncodedForm()); section.dispose();
encodingRetainingSection.dispose();
null, serverMessage.getArrivalTime(), bodySection.getEncodedSize());
null, serverMessage.getArrivalTime(), bodySection.getEncodedSize());