blob: cb09d4d3d089d5540258cd3271944a9763ea161b [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Qpid Proton C++ API: receiver_options</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Qpid Proton C++ API
&#160;<span id="projectnumber">0.32.0</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.svg"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classproton_1_1receiver__options.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classproton_1_1receiver__options-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">receiver_options</div> </div>
</div><!--header-->
<div class="contents">
<p>Options for creating a receiver.
<a href="classproton_1_1receiver__options.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="receiver__options_8hpp_source.html">receiver_options.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9e10a473b92db75e78a3ad8498f32c36"><td class="memItemLeft" align="right" valign="top"><a id="a9e10a473b92db75e78a3ad8498f32c36"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1receiver__options.html#a9e10a473b92db75e78a3ad8498f32c36">receiver_options</a> ()</td></tr>
<tr class="memdesc:a9e10a473b92db75e78a3ad8498f32c36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an empty set of options. <br /></td></tr>
<tr class="separator:a9e10a473b92db75e78a3ad8498f32c36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09be031fe2c8df29e3f0f1b0f1c904c3"><td class="memItemLeft" align="right" valign="top"><a id="a09be031fe2c8df29e3f0f1b0f1c904c3"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1receiver__options.html#a09be031fe2c8df29e3f0f1b0f1c904c3">receiver_options</a> (const <a class="el" href="classproton_1_1receiver__options.html">receiver_options</a> &amp;)</td></tr>
<tr class="memdesc:a09be031fe2c8df29e3f0f1b0f1c904c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy options. <br /></td></tr>
<tr class="separator:a09be031fe2c8df29e3f0f1b0f1c904c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a815be8018205013b8ff011d4b62b7324"><td class="memItemLeft" align="right" valign="top"><a id="a815be8018205013b8ff011d4b62b7324"></a>
<a class="el" href="classproton_1_1receiver__options.html">receiver_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1receiver__options.html#a815be8018205013b8ff011d4b62b7324">operator=</a> (const <a class="el" href="classproton_1_1receiver__options.html">receiver_options</a> &amp;)</td></tr>
<tr class="memdesc:a815be8018205013b8ff011d4b62b7324"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy options. <br /></td></tr>
<tr class="separator:a815be8018205013b8ff011d4b62b7324"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bbed67f2faac1cd6a5c490dac90bda3"><td class="memItemLeft" align="right" valign="top"><a id="a7bbed67f2faac1cd6a5c490dac90bda3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1receiver__options.html#a7bbed67f2faac1cd6a5c490dac90bda3">update</a> (const <a class="el" href="classproton_1_1receiver__options.html">receiver_options</a> &amp;other)</td></tr>
<tr class="memdesc:a7bbed67f2faac1cd6a5c490dac90bda3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Merge with another option set. <br /></td></tr>
<tr class="separator:a7bbed67f2faac1cd6a5c490dac90bda3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84f38ac0f31f74011c9dc342e44a53df"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classproton_1_1receiver__options.html">receiver_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1receiver__options.html#a84f38ac0f31f74011c9dc342e44a53df">handler</a> (class <a class="el" href="classproton_1_1messaging__handler.html">messaging_handler</a> &amp;)</td></tr>
<tr class="memdesc:a84f38ac0f31f74011c9dc342e44a53df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a <a class="el" href="classproton_1_1messaging__handler.html" title="Handler for Proton messaging events.">messaging_handler</a> for receiver events only. <a href="classproton_1_1receiver__options.html#a84f38ac0f31f74011c9dc342e44a53df">More...</a><br /></td></tr>
<tr class="separator:a84f38ac0f31f74011c9dc342e44a53df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a582bced77754ed8a85f9597e2e457079"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classproton_1_1receiver__options.html">receiver_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1receiver__options.html#a582bced77754ed8a85f9597e2e457079">delivery_mode</a> (<a class="el" href="structproton_1_1delivery__mode.html">delivery_mode</a>)</td></tr>
<tr class="memdesc:a582bced77754ed8a85f9597e2e457079"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the delivery mode on the receiver. <a href="classproton_1_1receiver__options.html#a582bced77754ed8a85f9597e2e457079">More...</a><br /></td></tr>
<tr class="separator:a582bced77754ed8a85f9597e2e457079"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b9ad83418de47f87c6c7062eaefb5b6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classproton_1_1receiver__options.html">receiver_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1receiver__options.html#a9b9ad83418de47f87c6c7062eaefb5b6">auto_accept</a> (bool)</td></tr>
<tr class="memdesc:a9b9ad83418de47f87c6c7062eaefb5b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable automatic acceptance of messages that aren't otherwise released, rejected, or modified. <a href="classproton_1_1receiver__options.html#a9b9ad83418de47f87c6c7062eaefb5b6">More...</a><br /></td></tr>
<tr class="separator:a9b9ad83418de47f87c6c7062eaefb5b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af313abfa8d5b19e4b61c779907eb9980"><td class="memItemLeft" align="right" valign="top"><a id="af313abfa8d5b19e4b61c779907eb9980"></a>
<a class="el" href="classproton_1_1receiver__options.html">receiver_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1receiver__options.html#af313abfa8d5b19e4b61c779907eb9980">auto_settle</a> (bool)</td></tr>
<tr class="memdesc:af313abfa8d5b19e4b61c779907eb9980"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Deprecated</b> - Applicable only to sender, not receiver. <br /></td></tr>
<tr class="separator:af313abfa8d5b19e4b61c779907eb9980"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e2689fd52f88f551d11face38a4157b"><td class="memItemLeft" align="right" valign="top"><a id="a7e2689fd52f88f551d11face38a4157b"></a>
<a class="el" href="classproton_1_1receiver__options.html">receiver_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1receiver__options.html#a7e2689fd52f88f551d11face38a4157b">source</a> (<a class="el" href="classproton_1_1source__options.html">source_options</a> &amp;)</td></tr>
<tr class="memdesc:a7e2689fd52f88f551d11face38a4157b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Options for the source node of the receiver. <br /></td></tr>
<tr class="separator:a7e2689fd52f88f551d11face38a4157b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7823f6c72dc78481be578de1658b99eb"><td class="memItemLeft" align="right" valign="top"><a id="a7823f6c72dc78481be578de1658b99eb"></a>
<a class="el" href="classproton_1_1receiver__options.html">receiver_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1receiver__options.html#a7823f6c72dc78481be578de1658b99eb">target</a> (<a class="el" href="classproton_1_1target__options.html">target_options</a> &amp;)</td></tr>
<tr class="memdesc:a7823f6c72dc78481be578de1658b99eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Options for the target node of the receiver. <br /></td></tr>
<tr class="separator:a7823f6c72dc78481be578de1658b99eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a714a6a7dd1ea90c6046fe0460d2ce4f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classproton_1_1receiver__options.html">receiver_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1receiver__options.html#a714a6a7dd1ea90c6046fe0460d2ce4f0">credit_window</a> (int count)</td></tr>
<tr class="memdesc:a714a6a7dd1ea90c6046fe0460d2ce4f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Automatically replenish credit for flow control up to <code>count</code> messages. <a href="classproton_1_1receiver__options.html#a714a6a7dd1ea90c6046fe0460d2ce4f0">More...</a><br /></td></tr>
<tr class="separator:a714a6a7dd1ea90c6046fe0460d2ce4f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a038ed50e63983958b13e42d49d270b88"><td class="memItemLeft" align="right" valign="top"><a id="a038ed50e63983958b13e42d49d270b88"></a>
<a class="el" href="classproton_1_1receiver__options.html">receiver_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1receiver__options.html#a038ed50e63983958b13e42d49d270b88">name</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:a038ed50e63983958b13e42d49d270b88"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the link name. If not set a unique name is generated. <br /></td></tr>
<tr class="separator:a038ed50e63983958b13e42d49d270b88"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Options for creating a receiver. </p>
<p>Options can be "chained" like this:</p>
<div class="fragment"><div class="line">l = container.create_receiver(url, <a class="code" href="classproton_1_1receiver__options.html#a9e10a473b92db75e78a3ad8498f32c36">receiver_options</a>().<a class="code" href="classproton_1_1receiver__options.html#a84f38ac0f31f74011c9dc342e44a53df">handler</a>(h).<a class="code" href="classproton_1_1receiver__options.html#a9b9ad83418de47f87c6c7062eaefb5b6">auto_accept</a>(<span class="keyword">true</span>));</div>
</div><!-- fragment --><p>You can also create an options object with common settings and use it as a base for different connections that have mostly the same settings:</p>
<div class="fragment"><div class="line"><a class="code" href="classproton_1_1receiver__options.html#a9e10a473b92db75e78a3ad8498f32c36">receiver_options</a> opts;</div>
<div class="line">opts.auto_accept(<span class="keyword">true</span>);</div>
<div class="line">c2 = container.open_receiver(url2, opts.handler(h2));</div>
</div><!-- fragment --><p>Normal value semantics: copy or assign creates a separate copy of the options. </p>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="broker_8cpp-example.html#_a17">broker.cpp</a>, <a class="el" href="client_8cpp-example.html#_a0">client.cpp</a>, <a class="el" href="multithreaded_client_flow_control_8cpp-example.html#_a18">multithreaded_client_flow_control.cpp</a>, and <a class="el" href="service_bus_8cpp-example.html#_a3">service_bus.cpp</a>.</dd>
</dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a84f38ac0f31f74011c9dc342e44a53df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84f38ac0f31f74011c9dc342e44a53df">&#9670;&nbsp;</a></span>handler()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classproton_1_1receiver__options.html">receiver_options</a>&amp; handler </td>
<td>(</td>
<td class="paramtype">class <a class="el" href="classproton_1_1messaging__handler.html">messaging_handler</a> &amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a <a class="el" href="classproton_1_1messaging__handler.html" title="Handler for Proton messaging events.">messaging_handler</a> for receiver events only. </p>
<p>The handler is no longer in use when <a class="el" href="classproton_1_1messaging__handler.html#ae51075d0f1d0c180bc8098370957ae28" title="The remote peer closed the link.">messaging_handler::on_receiver_close()</a> is called. </p>
</div>
</div>
<a id="a582bced77754ed8a85f9597e2e457079"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a582bced77754ed8a85f9597e2e457079">&#9670;&nbsp;</a></span>delivery_mode()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classproton_1_1receiver__options.html">receiver_options</a>&amp; <a class="el" href="structproton_1_1delivery__mode.html">delivery_mode</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structproton_1_1delivery__mode.html">delivery_mode</a>&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the delivery mode on the receiver. </p>
<p>The default is <a class="el" href="structproton_1_1delivery__mode.html#a811fe196a5d9d37857c2f8adeeaac3c6a3cf51e9f762513a58768bb63e8ba14c1" title="The receiver settles the delivery first with an accept/reject/release disposition.">delivery_mode::AT_LEAST_ONCE</a>. </p>
</div>
</div>
<a id="a9b9ad83418de47f87c6c7062eaefb5b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b9ad83418de47f87c6c7062eaefb5b6">&#9670;&nbsp;</a></span>auto_accept()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classproton_1_1receiver__options.html">receiver_options</a>&amp; auto_accept </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enable or disable automatic acceptance of messages that aren't otherwise released, rejected, or modified. </p>
<p>It is enabled by default. </p>
</div>
</div>
<a id="a714a6a7dd1ea90c6046fe0460d2ce4f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a714a6a7dd1ea90c6046fe0460d2ce4f0">&#9670;&nbsp;</a></span>credit_window()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classproton_1_1receiver__options.html">receiver_options</a>&amp; credit_window </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>count</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Automatically replenish credit for flow control up to <code>count</code> messages. </p>
<p>The default is 10. Set to zero to disable automatic replenishment. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>proton/<a class="el" href="receiver__options_8hpp_source.html">receiver_options.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclassproton_1_1receiver__options_html_a84f38ac0f31f74011c9dc342e44a53df"><div class="ttname"><a href="classproton_1_1receiver__options.html#a84f38ac0f31f74011c9dc342e44a53df">proton::receiver_options::handler</a></div><div class="ttdeci">receiver_options &amp; handler(class messaging_handler &amp;)</div><div class="ttdoc">Set a messaging_handler for receiver events only.</div></div>
<div class="ttc" id="aclassproton_1_1receiver__options_html_a9e10a473b92db75e78a3ad8498f32c36"><div class="ttname"><a href="classproton_1_1receiver__options.html#a9e10a473b92db75e78a3ad8498f32c36">proton::receiver_options::receiver_options</a></div><div class="ttdeci">receiver_options()</div><div class="ttdoc">Create an empty set of options.</div></div>
<div class="ttc" id="aclassproton_1_1receiver__options_html_a9b9ad83418de47f87c6c7062eaefb5b6"><div class="ttname"><a href="classproton_1_1receiver__options.html#a9b9ad83418de47f87c6c7062eaefb5b6">proton::receiver_options::auto_accept</a></div><div class="ttdeci">receiver_options &amp; auto_accept(bool)</div><div class="ttdoc">Enable or disable automatic acceptance of messages that aren't otherwise released,...</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespaceproton.html">proton</a></li><li class="navelem"><a class="el" href="classproton_1_1receiver__options.html">receiver_options</a></li>
<li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
</ul>
</div>
</body>
</html>