blob: def7cf0d8ace9c92c7240f97e3d20c6dc85f4ef8 [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: sender_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_1sender__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_1sender__options-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">sender_options</div> </div>
</div><!--header-->
<div class="contents">
<p>Options for creating a sender.
<a href="classproton_1_1sender__options.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="sender__options_8hpp_source.html">sender_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:a619c789958ede03d0682a1a723cd7658"><td class="memItemLeft" align="right" valign="top"><a id="a619c789958ede03d0682a1a723cd7658"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1sender__options.html#a619c789958ede03d0682a1a723cd7658">sender_options</a> ()</td></tr>
<tr class="memdesc:a619c789958ede03d0682a1a723cd7658"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an empty set of options. <br /></td></tr>
<tr class="separator:a619c789958ede03d0682a1a723cd7658"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a258f4dd5231e0a3f048ec1f351c23cd4"><td class="memItemLeft" align="right" valign="top"><a id="a258f4dd5231e0a3f048ec1f351c23cd4"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1sender__options.html#a258f4dd5231e0a3f048ec1f351c23cd4">sender_options</a> (const <a class="el" href="classproton_1_1sender__options.html">sender_options</a> &amp;)</td></tr>
<tr class="memdesc:a258f4dd5231e0a3f048ec1f351c23cd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy options. <br /></td></tr>
<tr class="separator:a258f4dd5231e0a3f048ec1f351c23cd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13e6aa698a300681f88a709ccb50c8f6"><td class="memItemLeft" align="right" valign="top"><a id="a13e6aa698a300681f88a709ccb50c8f6"></a>
<a class="el" href="classproton_1_1sender__options.html">sender_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1sender__options.html#a13e6aa698a300681f88a709ccb50c8f6">operator=</a> (const <a class="el" href="classproton_1_1sender__options.html">sender_options</a> &amp;)</td></tr>
<tr class="memdesc:a13e6aa698a300681f88a709ccb50c8f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy options. <br /></td></tr>
<tr class="separator:a13e6aa698a300681f88a709ccb50c8f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16b609dbb6a9df5ab7e719f0de05026b"><td class="memItemLeft" align="right" valign="top"><a id="a16b609dbb6a9df5ab7e719f0de05026b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1sender__options.html#a16b609dbb6a9df5ab7e719f0de05026b">update</a> (const <a class="el" href="classproton_1_1sender__options.html">sender_options</a> &amp;other)</td></tr>
<tr class="memdesc:a16b609dbb6a9df5ab7e719f0de05026b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Merge with another option set. <br /></td></tr>
<tr class="separator:a16b609dbb6a9df5ab7e719f0de05026b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d94e8f4c1746780259f3eb2d1728aff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classproton_1_1sender__options.html">sender_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1sender__options.html#a0d94e8f4c1746780259f3eb2d1728aff">handler</a> (class <a class="el" href="classproton_1_1messaging__handler.html">messaging_handler</a> &amp;)</td></tr>
<tr class="memdesc:a0d94e8f4c1746780259f3eb2d1728aff"><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 sender events only. <a href="classproton_1_1sender__options.html#a0d94e8f4c1746780259f3eb2d1728aff">More...</a><br /></td></tr>
<tr class="separator:a0d94e8f4c1746780259f3eb2d1728aff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7dc71a7b5737c2ca642058a296292db"><td class="memItemLeft" align="right" valign="top"><a id="ab7dc71a7b5737c2ca642058a296292db"></a>
<a class="el" href="classproton_1_1sender__options.html">sender_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1sender__options.html#ab7dc71a7b5737c2ca642058a296292db">delivery_mode</a> (<a class="el" href="structproton_1_1delivery__mode.html">delivery_mode</a>)</td></tr>
<tr class="memdesc:ab7dc71a7b5737c2ca642058a296292db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the delivery mode on the sender. <br /></td></tr>
<tr class="separator:ab7dc71a7b5737c2ca642058a296292db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a087eda4a18c293de85107fcfbb7ff31f"><td class="memItemLeft" align="right" valign="top"><a id="a087eda4a18c293de85107fcfbb7ff31f"></a>
<a class="el" href="classproton_1_1sender__options.html">sender_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1sender__options.html#a087eda4a18c293de85107fcfbb7ff31f">auto_settle</a> (bool)</td></tr>
<tr class="memdesc:a087eda4a18c293de85107fcfbb7ff31f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Automatically settle messages (default is true). <br /></td></tr>
<tr class="separator:a087eda4a18c293de85107fcfbb7ff31f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4bd1e60b98c766f4c822aad783162c0"><td class="memItemLeft" align="right" valign="top"><a id="af4bd1e60b98c766f4c822aad783162c0"></a>
<a class="el" href="classproton_1_1sender__options.html">sender_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1sender__options.html#af4bd1e60b98c766f4c822aad783162c0">source</a> (const <a class="el" href="classproton_1_1source__options.html">source_options</a> &amp;)</td></tr>
<tr class="memdesc:af4bd1e60b98c766f4c822aad783162c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Options for the source node of the sender. <br /></td></tr>
<tr class="separator:af4bd1e60b98c766f4c822aad783162c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d4e83ee43fa1ee99a45f5bbe837ffcc"><td class="memItemLeft" align="right" valign="top"><a id="a7d4e83ee43fa1ee99a45f5bbe837ffcc"></a>
<a class="el" href="classproton_1_1sender__options.html">sender_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1sender__options.html#a7d4e83ee43fa1ee99a45f5bbe837ffcc">target</a> (const <a class="el" href="classproton_1_1target__options.html">target_options</a> &amp;)</td></tr>
<tr class="memdesc:a7d4e83ee43fa1ee99a45f5bbe837ffcc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Options for the receiver node of the receiver. <br /></td></tr>
<tr class="separator:a7d4e83ee43fa1ee99a45f5bbe837ffcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af37454934677c6f0e8bbe8bb1087f1ed"><td class="memItemLeft" align="right" valign="top"><a id="af37454934677c6f0e8bbe8bb1087f1ed"></a>
<a class="el" href="classproton_1_1sender__options.html">sender_options</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1sender__options.html#af37454934677c6f0e8bbe8bb1087f1ed">name</a> (const std::string &amp;name)</td></tr>
<tr class="memdesc:af37454934677c6f0e8bbe8bb1087f1ed"><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:af37454934677c6f0e8bbe8bb1087f1ed"><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 sender. </p>
<p>Options can be "chained" like this:</p>
<div class="fragment"><div class="line">l = container.create_sender(url, <a class="code" href="classproton_1_1sender__options.html#a619c789958ede03d0682a1a723cd7658">sender_options</a>().<a class="code" href="classproton_1_1sender__options.html#a0d94e8f4c1746780259f3eb2d1728aff">handler</a>(h).<a class="code" href="classproton_1_1sender__options.html#a087eda4a18c293de85107fcfbb7ff31f">auto_settle</a>(<span class="keyword">false</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_1sender__options.html#a619c789958ede03d0682a1a723cd7658">sender_options</a> opts;</div>
<div class="line">opts.delivery_mode(<a class="code" href="structproton_1_1delivery__mode.html#a811fe196a5d9d37857c2f8adeeaac3c6adc975babe0d2bc27916397e614eb6624">delivery_mode::AT_MOST_ONCE</a>);</div>
<div class="line">l1 = container.open_sender(url1, opts.handler(h1));</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#_a11">broker.cpp</a>, <a class="el" href="server_direct_8cpp-example.html#_a12">server_direct.cpp</a>, and <a class="el" href="service_bus_8cpp-example.html#_a2">service_bus.cpp</a>.</dd>
</dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a0d94e8f4c1746780259f3eb2d1728aff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d94e8f4c1746780259f3eb2d1728aff">&#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_1sender__options.html">sender_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 sender events only. </p>
<p>The handler is no longer in use when <a class="el" href="classproton_1_1messaging__handler.html#aa604b2d3dad610ded346b0dcf3ec6f29" title="The remote peer closed the link.">messaging_handler::on_sender_close()</a> is called. <a class="el" href="classproton_1_1messaging__handler.html#aa604b2d3dad610ded346b0dcf3ec6f29" title="The remote peer closed the link.">messaging_handler::on_sender_close()</a> may not be called if a connection is aborted, in that case it should be cleaned up in its connection's <a class="el" href="classproton_1_1messaging__handler.html#a8a60c2f6628f44a9587deea8c8729f0f" title="The final event for a connection: there will be no more reconnect attempts and no more event function...">messaging_handler::on_transport_close()</a> </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>proton/<a class="el" href="sender__options_8hpp_source.html">sender_options.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclassproton_1_1sender__options_html_a619c789958ede03d0682a1a723cd7658"><div class="ttname"><a href="classproton_1_1sender__options.html#a619c789958ede03d0682a1a723cd7658">proton::sender_options::sender_options</a></div><div class="ttdeci">sender_options()</div><div class="ttdoc">Create an empty set of options.</div></div>
<div class="ttc" id="astructproton_1_1delivery__mode_html_a811fe196a5d9d37857c2f8adeeaac3c6adc975babe0d2bc27916397e614eb6624"><div class="ttname"><a href="structproton_1_1delivery__mode.html#a811fe196a5d9d37857c2f8adeeaac3c6adc975babe0d2bc27916397e614eb6624">proton::delivery_mode::AT_MOST_ONCE</a></div><div class="ttdeci">@ AT_MOST_ONCE</div><div class="ttdoc">Outgoing messages are settled immediately by the link.</div><div class="ttdef"><b>Definition:</b> delivery_mode.hpp:41</div></div>
<div class="ttc" id="aclassproton_1_1sender__options_html_a087eda4a18c293de85107fcfbb7ff31f"><div class="ttname"><a href="classproton_1_1sender__options.html#a087eda4a18c293de85107fcfbb7ff31f">proton::sender_options::auto_settle</a></div><div class="ttdeci">sender_options &amp; auto_settle(bool)</div><div class="ttdoc">Automatically settle messages (default is true).</div></div>
<div class="ttc" id="aclassproton_1_1sender__options_html_a0d94e8f4c1746780259f3eb2d1728aff"><div class="ttname"><a href="classproton_1_1sender__options.html#a0d94e8f4c1746780259f3eb2d1728aff">proton::sender_options::handler</a></div><div class="ttdeci">sender_options &amp; handler(class messaging_handler &amp;)</div><div class="ttdoc">Set a messaging_handler for sender events only.</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_1sender__options.html">sender_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>