blob: e681b3344d4c798d4ea0ee1bc6158324d354abf7 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>AdvancedMessage (Qpid ProtonJ2 Parent 1.0.0-M19 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.qpid.protonj2.client, interface: AdvancedMessage">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/AdvancedMessage.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.qpid.protonj2.client</a></div>
<h1 title="Interface AdvancedMessage" class="title">Interface AdvancedMessage&lt;E&gt;</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>E</code> - The type of the message body that this message carries</dd>
</dl>
<dl class="notes">
<dt>All Superinterfaces:</dt>
<dd><code><a href="Message.html" title="interface in org.apache.qpid.protonj2.client">Message</a>&lt;E&gt;</code></dd>
</dl>
<dl class="notes">
<dt>All Known Subinterfaces:</dt>
<dd><code><a href="StreamReceiverMessage.html" title="interface in org.apache.qpid.protonj2.client">StreamReceiverMessage</a></code>, <code><a href="StreamSenderMessage.html" title="interface in org.apache.qpid.protonj2.client">StreamSenderMessage</a></code></dd>
</dl>
<dl class="notes">
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="impl/ClientMessage.html" title="class in org.apache.qpid.protonj2.client.impl">ClientMessage</a></code>, <code><a href="impl/ClientStreamReceiverMessage.html" title="class in org.apache.qpid.protonj2.client.impl">ClientStreamReceiverMessage</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">AdvancedMessage&lt;E&gt;</span><span class="extends-implements">
extends <a href="Message.html" title="interface in org.apache.qpid.protonj2.client">Message</a>&lt;E&gt;</span></div>
<div class="block">Advanced AMQP Message object that provides a thin abstraction to raw AMQP types</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab5" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab5', 3)" class="table-tab">Default Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#addBodySection(org.apache.qpid.protonj2.types.messaging.Section)" class="member-name-link">addBodySection</a><wbr>(<a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging">Section</a>&lt;?&gt;&nbsp;bodySection)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Adds the given <a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging"><code>Section</code></a> to the internal collection of sections that will be sent
to the remote peer when this message is encoded.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="../types/messaging/MessageAnnotations.html" title="class in org.apache.qpid.protonj2.types.messaging">MessageAnnotations</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#annotations()" class="member-name-link">annotations</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Return the current <a href="../types/messaging/MessageAnnotations.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>MessageAnnotations</code></a> assigned to this message, if none was assigned yet
then this method returns <code>null</code>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#annotations(org.apache.qpid.protonj2.types.messaging.MessageAnnotations)" class="member-name-link">annotations</a><wbr>(<a href="../types/messaging/MessageAnnotations.html" title="class in org.apache.qpid.protonj2.types.messaging">MessageAnnotations</a>&nbsp;messageAnnotations)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Assign or replace the <a href="../types/messaging/MessageAnnotations.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>MessageAnnotations</code></a> instance associated with this message.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="../types/messaging/ApplicationProperties.html" title="class in org.apache.qpid.protonj2.types.messaging">ApplicationProperties</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#applicationProperties()" class="member-name-link">applicationProperties</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Return the current <a href="../types/messaging/ApplicationProperties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>ApplicationProperties</code></a> assigned to this message, if none was assigned yet
then this method returns <code>null</code>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#applicationProperties(org.apache.qpid.protonj2.types.messaging.ApplicationProperties)" class="member-name-link">applicationProperties</a><wbr>(<a href="../types/messaging/ApplicationProperties.html" title="class in org.apache.qpid.protonj2.types.messaging">ApplicationProperties</a>&nbsp;applicationProperties)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Assign or replace the <a href="../types/messaging/ApplicationProperties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>ApplicationProperties</code></a> instance associated with this message.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;<a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging">Section</a>&lt;?&gt;&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#bodySections()" class="member-name-link">bodySections</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Create and return an unmodifiable <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link"><code>Collection</code></a> that contains the <a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging"><code>Section</code></a> instances
currently assigned to this message.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#bodySections(java.util.Collection)" class="member-name-link">bodySections</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;<a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging">Section</a>&lt;?&gt;&gt;&nbsp;sections)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the body <a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging"><code>Section</code></a> instances to use when encoding this message.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#clearBodySections()" class="member-name-link">clearBodySections</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Clears all current body <a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging"><code>Section</code></a> elements from the <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1"><code>static &lt;V&gt;&nbsp;<a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;V&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1"><code><a href="#create()" class="member-name-link">create</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1">
<div class="block">Creates a new <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> instance using the library default implementation.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default <a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#encode(java.util.Map)" class="member-name-link">encode</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&gt;&nbsp;deliveryAnnotations)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Encodes the <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> for transmission by the client.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#encode(java.util.Map,org.apache.qpid.protonj2.buffer.ProtonBufferAllocator)" class="member-name-link">encode</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&gt;&nbsp;deliveryAnnotations,
<a href="../buffer/ProtonBufferAllocator.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBufferAllocator</a>&nbsp;allocator)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Encodes the <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> for transmission by the client.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="../types/messaging/Footer.html" title="class in org.apache.qpid.protonj2.types.messaging">Footer</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#footer()" class="member-name-link">footer</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Return the current <a href="../types/messaging/Footer.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Footer</code></a> assigned to this message, if none was assigned yet
then this method returns <code>null</code>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#footer(org.apache.qpid.protonj2.types.messaging.Footer)" class="member-name-link">footer</a><wbr>(<a href="../types/messaging/Footer.html" title="class in org.apache.qpid.protonj2.types.messaging">Footer</a>&nbsp;footer)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Assign or replace the <a href="../types/messaging/Footer.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Footer</code></a> instance associated with this message.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#forEachBodySection(java.util.function.Consumer)" class="member-name-link">forEachBodySection</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link">Consumer</a>&lt;<a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging">Section</a>&lt;?&gt;&gt;&nbsp;consumer)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Performs the given action for each body <a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging"><code>Section</code></a> of the <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> until all
sections have been presented to the given <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link"><code>Consumer</code></a> or the consumer throws an exception.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="../types/messaging/Header.html" title="class in org.apache.qpid.protonj2.types.messaging">Header</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#header()" class="member-name-link">header</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Return the current <a href="../types/messaging/Header.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Header</code></a> assigned to this message, if none was assigned yet
then this method returns <code>null</code>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#header(org.apache.qpid.protonj2.types.messaging.Header)" class="member-name-link">header</a><wbr>(<a href="../types/messaging/Header.html" title="class in org.apache.qpid.protonj2.types.messaging">Header</a>&nbsp;header)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Assign or replace the <a href="../types/messaging/Header.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Header</code></a> instance associated with this message.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#messageFormat()" class="member-name-link">messageFormat</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#messageFormat(int)" class="member-name-link">messageFormat</a><wbr>(int&nbsp;messageFormat)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Sets the message format to use when the message is sent.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="../types/messaging/Properties.html" title="class in org.apache.qpid.protonj2.types.messaging">Properties</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#properties()" class="member-name-link">properties</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Return the current <a href="../types/messaging/Properties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Properties</code></a> assigned to this message, if none was assigned yet
then this method returns <code>null</code>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#properties(org.apache.qpid.protonj2.types.messaging.Properties)" class="member-name-link">properties</a><wbr>(<a href="../types/messaging/Properties.html" title="class in org.apache.qpid.protonj2.types.messaging">Properties</a>&nbsp;properties)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Assign or replace the <a href="../types/messaging/Properties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Properties</code></a> instance associated with this message.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.qpid.protonj2.client.Message">Methods inherited from interface&nbsp;org.apache.qpid.protonj2.client.<a href="Message.html" title="interface in org.apache.qpid.protonj2.client">Message</a></h3>
<code><a href="Message.html#absoluteExpiryTime()">absoluteExpiryTime</a>, <a href="Message.html#absoluteExpiryTime(long)">absoluteExpiryTime</a>, <a href="Message.html#annotation(java.lang.String)">annotation</a>, <a href="Message.html#annotation(java.lang.String,java.lang.Object)">annotation</a>, <a href="Message.html#body()">body</a>, <a href="Message.html#body(E)">body</a>, <a href="Message.html#contentEncoding()">contentEncoding</a>, <a href="Message.html#contentEncoding(java.lang.String)">contentEncoding</a>, <a href="Message.html#contentType()">contentType</a>, <a href="Message.html#contentType(java.lang.String)">contentType</a>, <a href="Message.html#correlationId()">correlationId</a>, <a href="Message.html#correlationId(java.lang.Object)">correlationId</a>, <a href="Message.html#creationTime()">creationTime</a>, <a href="Message.html#creationTime(long)">creationTime</a>, <a href="Message.html#deliveryCount()">deliveryCount</a>, <a href="Message.html#deliveryCount(long)">deliveryCount</a>, <a href="Message.html#durable()">durable</a>, <a href="Message.html#durable(boolean)">durable</a>, <a href="Message.html#firstAcquirer()">firstAcquirer</a>, <a href="Message.html#firstAcquirer(boolean)">firstAcquirer</a>, <a href="Message.html#footer(java.lang.String)">footer</a>, <a href="Message.html#footer(java.lang.String,java.lang.Object)">footer</a>, <a href="Message.html#forEachAnnotation(java.util.function.BiConsumer)">forEachAnnotation</a>, <a href="Message.html#forEachFooter(java.util.function.BiConsumer)">forEachFooter</a>, <a href="Message.html#forEachProperty(java.util.function.BiConsumer)">forEachProperty</a>, <a href="Message.html#groupId()">groupId</a>, <a href="Message.html#groupId(java.lang.String)">groupId</a>, <a href="Message.html#groupSequence()">groupSequence</a>, <a href="Message.html#groupSequence(int)">groupSequence</a>, <a href="Message.html#hasAnnotation(java.lang.String)">hasAnnotation</a>, <a href="Message.html#hasAnnotations()">hasAnnotations</a>, <a href="Message.html#hasFooter(java.lang.String)">hasFooter</a>, <a href="Message.html#hasFooters()">hasFooters</a>, <a href="Message.html#hasProperties()">hasProperties</a>, <a href="Message.html#hasProperty(java.lang.String)">hasProperty</a>, <a href="Message.html#messageId()">messageId</a>, <a href="Message.html#messageId(java.lang.Object)">messageId</a>, <a href="Message.html#priority()">priority</a>, <a href="Message.html#priority(byte)">priority</a>, <a href="Message.html#property(java.lang.String)">property</a>, <a href="Message.html#property(java.lang.String,java.lang.Object)">property</a>, <a href="Message.html#removeAnnotation(java.lang.String)">removeAnnotation</a>, <a href="Message.html#removeFooter(java.lang.String)">removeFooter</a>, <a href="Message.html#removeProperty(java.lang.String)">removeProperty</a>, <a href="Message.html#replyTo()">replyTo</a>, <a href="Message.html#replyTo(java.lang.String)">replyTo</a>, <a href="Message.html#replyToGroupId()">replyToGroupId</a>, <a href="Message.html#replyToGroupId(java.lang.String)">replyToGroupId</a>, <a href="Message.html#subject()">subject</a>, <a href="Message.html#subject(java.lang.String)">subject</a>, <a href="Message.html#timeToLive()">timeToLive</a>, <a href="Message.html#timeToLive(long)">timeToLive</a>, <a href="Message.html#to()">to</a>, <a href="Message.html#to(java.lang.String)">to</a>, <a href="Message.html#toAdvancedMessage()">toAdvancedMessage</a>, <a href="Message.html#userId()">userId</a>, <a href="Message.html#userId(byte%5B%5D)">userId</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="create()">
<h3>create</h3>
<div class="member-signature"><span class="modifiers">static</span>&nbsp;<span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type"><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;V&gt;</span>&nbsp;<span class="element-name">create</span>()</div>
<div class="block">Creates a new <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> instance using the library default implementation.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>V</code> - The type to use when specifying the body section value type.</dd>
<dt>Returns:</dt>
<dd>a new <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> instance.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="header()">
<h3>header</h3>
<div class="member-signature"><span class="return-type"><a href="../types/messaging/Header.html" title="class in org.apache.qpid.protonj2.types.messaging">Header</a></span>&nbsp;<span class="element-name">header</span>()
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Return the current <a href="../types/messaging/Header.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Header</code></a> assigned to this message, if none was assigned yet
then this method returns <code>null</code>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the currently assigned <a href="../types/messaging/Header.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Header</code></a> for this message.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while retrieving the message data.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="header(org.apache.qpid.protonj2.types.messaging.Header)">
<h3>header</h3>
<div class="member-signature"><span class="return-type"><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</span>&nbsp;<span class="element-name">header</span><wbr><span class="parameters">(<a href="../types/messaging/Header.html" title="class in org.apache.qpid.protonj2.types.messaging">Header</a>&nbsp;header)</span>
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Assign or replace the <a href="../types/messaging/Header.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Header</code></a> instance associated with this message.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>header</code> - The <a href="../types/messaging/Header.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Header</code></a> value to assign to this message.</dd>
<dt>Returns:</dt>
<dd>this <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> instance.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while writing the message <a href="../types/messaging/Header.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Header</code></a> value.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="annotations()">
<h3>annotations</h3>
<div class="member-signature"><span class="return-type"><a href="../types/messaging/MessageAnnotations.html" title="class in org.apache.qpid.protonj2.types.messaging">MessageAnnotations</a></span>&nbsp;<span class="element-name">annotations</span>()
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Return the current <a href="../types/messaging/MessageAnnotations.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>MessageAnnotations</code></a> assigned to this message, if none was assigned yet
then this method returns <code>null</code>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the currently assigned <a href="../types/messaging/MessageAnnotations.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>MessageAnnotations</code></a> for this message.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while retrieving the message data.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="annotations(org.apache.qpid.protonj2.types.messaging.MessageAnnotations)">
<h3>annotations</h3>
<div class="member-signature"><span class="return-type"><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</span>&nbsp;<span class="element-name">annotations</span><wbr><span class="parameters">(<a href="../types/messaging/MessageAnnotations.html" title="class in org.apache.qpid.protonj2.types.messaging">MessageAnnotations</a>&nbsp;messageAnnotations)</span>
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Assign or replace the <a href="../types/messaging/MessageAnnotations.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>MessageAnnotations</code></a> instance associated with this message.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>messageAnnotations</code> - The <a href="../types/messaging/MessageAnnotations.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>MessageAnnotations</code></a> value to assign to this message.</dd>
<dt>Returns:</dt>
<dd>this <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> instance.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while writing the message <a href="../types/messaging/MessageAnnotations.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>MessageAnnotations</code></a> value.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="properties()">
<h3>properties</h3>
<div class="member-signature"><span class="return-type"><a href="../types/messaging/Properties.html" title="class in org.apache.qpid.protonj2.types.messaging">Properties</a></span>&nbsp;<span class="element-name">properties</span>()
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Return the current <a href="../types/messaging/Properties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Properties</code></a> assigned to this message, if none was assigned yet
then this method returns <code>null</code>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the currently assigned <a href="../types/messaging/Properties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Properties</code></a> for this message.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while retrieving the message data.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="properties(org.apache.qpid.protonj2.types.messaging.Properties)">
<h3>properties</h3>
<div class="member-signature"><span class="return-type"><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</span>&nbsp;<span class="element-name">properties</span><wbr><span class="parameters">(<a href="../types/messaging/Properties.html" title="class in org.apache.qpid.protonj2.types.messaging">Properties</a>&nbsp;properties)</span>
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Assign or replace the <a href="../types/messaging/Properties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Properties</code></a> instance associated with this message.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>properties</code> - The <a href="../types/messaging/Properties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Properties</code></a> value to assign to this message.</dd>
<dt>Returns:</dt>
<dd>this <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> instance.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while writing the message <a href="../types/messaging/Properties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Properties</code></a> value.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="applicationProperties()">
<h3>applicationProperties</h3>
<div class="member-signature"><span class="return-type"><a href="../types/messaging/ApplicationProperties.html" title="class in org.apache.qpid.protonj2.types.messaging">ApplicationProperties</a></span>&nbsp;<span class="element-name">applicationProperties</span>()
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Return the current <a href="../types/messaging/ApplicationProperties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>ApplicationProperties</code></a> assigned to this message, if none was assigned yet
then this method returns <code>null</code>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the currently assigned <a href="../types/messaging/ApplicationProperties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>ApplicationProperties</code></a> for this message.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while retrieving the message data.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="applicationProperties(org.apache.qpid.protonj2.types.messaging.ApplicationProperties)">
<h3>applicationProperties</h3>
<div class="member-signature"><span class="return-type"><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</span>&nbsp;<span class="element-name">applicationProperties</span><wbr><span class="parameters">(<a href="../types/messaging/ApplicationProperties.html" title="class in org.apache.qpid.protonj2.types.messaging">ApplicationProperties</a>&nbsp;applicationProperties)</span>
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Assign or replace the <a href="../types/messaging/ApplicationProperties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>ApplicationProperties</code></a> instance associated with this message.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>applicationProperties</code> - The <a href="../types/messaging/ApplicationProperties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>ApplicationProperties</code></a> value to assign to this message.</dd>
<dt>Returns:</dt>
<dd>this <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> instance.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while writing the message <a href="../types/messaging/ApplicationProperties.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>ApplicationProperties</code></a> value.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="footer()">
<h3>footer</h3>
<div class="member-signature"><span class="return-type"><a href="../types/messaging/Footer.html" title="class in org.apache.qpid.protonj2.types.messaging">Footer</a></span>&nbsp;<span class="element-name">footer</span>()
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Return the current <a href="../types/messaging/Footer.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Footer</code></a> assigned to this message, if none was assigned yet
then this method returns <code>null</code>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the currently assigned <a href="../types/messaging/Footer.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Footer</code></a> for this message.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while retrieving the message data.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="footer(org.apache.qpid.protonj2.types.messaging.Footer)">
<h3>footer</h3>
<div class="member-signature"><span class="return-type"><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</span>&nbsp;<span class="element-name">footer</span><wbr><span class="parameters">(<a href="../types/messaging/Footer.html" title="class in org.apache.qpid.protonj2.types.messaging">Footer</a>&nbsp;footer)</span>
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Assign or replace the <a href="../types/messaging/Footer.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Footer</code></a> instance associated with this message.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>footer</code> - The <a href="../types/messaging/Footer.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Footer</code></a> value to assign to this message.</dd>
<dt>Returns:</dt>
<dd>this <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> instance.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while writing the message <a href="../types/messaging/Footer.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>Footer</code></a> value.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="messageFormat()">
<h3>messageFormat</h3>
<div class="member-signature"><span class="return-type">int</span>&nbsp;<span class="element-name">messageFormat</span>()
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the currently assigned message format for this message.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while retrieving the message data.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="messageFormat(int)">
<h3>messageFormat</h3>
<div class="member-signature"><span class="return-type"><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</span>&nbsp;<span class="element-name">messageFormat</span><wbr><span class="parameters">(int&nbsp;messageFormat)</span>
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Sets the message format to use when the message is sent. The exact structure of a
message, together with its encoding, is defined by the message format (default is
the AMQP defined message format zero.
<p>
This field MUST be specified for the first transfer of a multi-transfer message, if
it is not set at the time of send of the first transfer the sender uses the AMQP
default value of zero for this field.
<p>
The upper three octets of a message format code identify a particular message format.
The lowest octet indicates the version of said message format. Any given version of
a format is forwards compatible with all higher versions.
<pre>
3 octets 1 octet
+----------------+---------+
| message format | version |
+----------------+---------+
| |
msb lsb
</pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>messageFormat</code> - The message format to encode into the transfer frame that carries the message.</dd>
<dt>Returns:</dt>
<dd>this <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> instance.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while configuring the message format.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addBodySection(org.apache.qpid.protonj2.types.messaging.Section)">
<h3>addBodySection</h3>
<div class="member-signature"><span class="return-type"><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</span>&nbsp;<span class="element-name">addBodySection</span><wbr><span class="parameters">(<a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging">Section</a>&lt;?&gt;&nbsp;bodySection)</span>
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Adds the given <a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging"><code>Section</code></a> to the internal collection of sections that will be sent
to the remote peer when this message is encoded. If a previous section was added by a call
to the <a href="Message.html#body(E)"><code>Message.body(Object)</code></a> method it should be retained as the first element of
the running list of body sections contained in this message.
<p>
The implementation should make an attempt to validate that sections added are valid for
the message format that is assigned when they are added.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>bodySection</code> - The <a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging"><code>Section</code></a> instance to append to the internal collection.</dd>
<dt>Returns:</dt>
<dd>this <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> instance.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while writing to the message body sections.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="bodySections(java.util.Collection)">
<h3>bodySections</h3>
<div class="member-signature"><span class="return-type"><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</span>&nbsp;<span class="element-name">bodySections</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;<a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging">Section</a>&lt;?&gt;&gt;&nbsp;sections)</span>
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Sets the body <a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging"><code>Section</code></a> instances to use when encoding this message. The value
given replaces any existing sections assigned to this message through the <a href="Message.html#body(E)"><code>Message.body(Object)</code></a>
or <a href="#addBodySection(org.apache.qpid.protonj2.types.messaging.Section)"><code>addBodySection(Section)</code></a> methods. Calling this method with a null
or empty collection is equivalent to calling the <a href="#clearBodySections()"><code>clearBodySections()</code></a> method.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>sections</code> - The <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link"><code>Collection</code></a> of <a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging"><code>Section</code></a> instance to assign this message.</dd>
<dt>Returns:</dt>
<dd>this <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> instance.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while writing to the message body sections.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="bodySections()">
<h3>bodySections</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;<a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging">Section</a>&lt;?&gt;&gt;</span>&nbsp;<span class="element-name">bodySections</span>()
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Create and return an unmodifiable <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link"><code>Collection</code></a> that contains the <a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging"><code>Section</code></a> instances
currently assigned to this message. Changes to this message body after calling this will not be
reflected in the returned collection.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>an unmodifiable <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link"><code>Collection</code></a> that is a view of the current sections assigned to this message.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while retrieving the message data.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="forEachBodySection(java.util.function.Consumer)">
<h3>forEachBodySection</h3>
<div class="member-signature"><span class="return-type"><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</span>&nbsp;<span class="element-name">forEachBodySection</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link">Consumer</a>&lt;<a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging">Section</a>&lt;?&gt;&gt;&nbsp;consumer)</span>
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Performs the given action for each body <a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging"><code>Section</code></a> of the <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> until all
sections have been presented to the given <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link"><code>Consumer</code></a> or the consumer throws an exception.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>consumer</code> - the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Consumer.html" title="class or interface in java.util.function" class="external-link"><code>Consumer</code></a> that will operate on each of the body sections in this message.</dd>
<dt>Returns:</dt>
<dd>this <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> instance.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while iterating over the message data.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clearBodySections()">
<h3>clearBodySections</h3>
<div class="member-signature"><span class="return-type"><a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client">AdvancedMessage</a>&lt;<a href="AdvancedMessage.html" title="type parameter in AdvancedMessage">E</a>&gt;</span>&nbsp;<span class="element-name">clearBodySections</span>()
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Clears all current body <a href="../types/messaging/Section.html" title="interface in org.apache.qpid.protonj2.types.messaging"><code>Section</code></a> elements from the <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>this <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> instance.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while clearing the message body sections.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="encode(java.util.Map)">
<h3>encode</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type"><a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></span>&nbsp;<span class="element-name">encode</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&gt;&nbsp;deliveryAnnotations)</span>
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Encodes the <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> for transmission by the client. The provided <a href="../types/messaging/DeliveryAnnotations.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>DeliveryAnnotations</code></a>
can be included or augmented by the <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> implementation based on the target message format.
The implementation is responsible for ensuring that the delivery annotations are treated correctly encoded into
the correct location in the message.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>deliveryAnnotations</code> - A <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link"><code>Map</code></a> of delivery annotation values that were requested to be included in the transmitted message.</dd>
<dt>Returns:</dt>
<dd>the encoded form of this message in a <a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a> instance.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while encoding the message data.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="encode(java.util.Map,org.apache.qpid.protonj2.buffer.ProtonBufferAllocator)">
<h3>encode</h3>
<div class="member-signature"><span class="return-type"><a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBuffer</a></span>&nbsp;<span class="element-name">encode</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&gt;&nbsp;deliveryAnnotations,
<a href="../buffer/ProtonBufferAllocator.html" title="interface in org.apache.qpid.protonj2.buffer">ProtonBufferAllocator</a>&nbsp;allocator)</span>
throws <span class="exceptions"><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></span></div>
<div class="block">Encodes the <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> for transmission by the client. The provided <a href="../types/messaging/DeliveryAnnotations.html" title="class in org.apache.qpid.protonj2.types.messaging"><code>DeliveryAnnotations</code></a>
can be included or augmented by the <a href="AdvancedMessage.html" title="interface in org.apache.qpid.protonj2.client"><code>AdvancedMessage</code></a> implementation based on the target message format.
The implementation is responsible for ensuring that the delivery annotations are treated correctly encoded into
the correct location in the message.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>deliveryAnnotations</code> - A <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link"><code>Map</code></a> of delivery annotation values that were requested to be included in the transmitted message.</dd>
<dd><code>allocator</code> - An allocator that should be used to create the buffer the message is encoded into.</dd>
<dt>Returns:</dt>
<dd>the encoded form of this message in a <a href="../buffer/ProtonBuffer.html" title="interface in org.apache.qpid.protonj2.buffer"><code>ProtonBuffer</code></a> instance.</dd>
<dt>Throws:</dt>
<dd><code><a href="exceptions/ClientException.html" title="class in org.apache.qpid.protonj2.client.exceptions">ClientException</a></code> - if an error occurs while encoding the message data.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2024 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>