blob: 031bfea9dfc4f133fc6c8553319bb4bd29104e39 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Qpid Proton C++ API: messaging_handler</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>
<script type="text/javascript">
$(document).ready(initResizable);
</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">
$(document).ready(function() { init_search(); });
</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.25.0</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
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.png" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</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">
$(document).ready(function(){initNavTree('classproton_1_1messaging__handler.html','');});
</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_1messaging__handler-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">messaging_handler</div> </div>
</div><!--header-->
<div class="contents">
<p>A handler for Proton messaging events.
<a href="classproton_1_1messaging__handler.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="messaging__handler_8hpp_source.html">messaging_handler.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:a9188622c33638e076d2214080129c824"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a9188622c33638e076d2214080129c824">on_container_start</a> (<a class="el" href="classproton_1_1container.html">container</a> &amp;)</td></tr>
<tr class="memdesc:a9188622c33638e076d2214080129c824"><td class="mdescLeft">&#160;</td><td class="mdescRight">The container event loop is starting. <a href="#a9188622c33638e076d2214080129c824">More...</a><br /></td></tr>
<tr class="separator:a9188622c33638e076d2214080129c824"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6a0a8d9aad83b7e5a5b2f8a70f23c90"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#ac6a0a8d9aad83b7e5a5b2f8a70f23c90">on_container_stop</a> (<a class="el" href="classproton_1_1container.html">container</a> &amp;)</td></tr>
<tr class="memdesc:ac6a0a8d9aad83b7e5a5b2f8a70f23c90"><td class="mdescLeft">&#160;</td><td class="mdescRight">The container event loop is stopping. <a href="#ac6a0a8d9aad83b7e5a5b2f8a70f23c90">More...</a><br /></td></tr>
<tr class="separator:ac6a0a8d9aad83b7e5a5b2f8a70f23c90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a584c9daeadf4322801f58e054017fecb"><td class="memItemLeft" align="right" valign="top"><a id="a584c9daeadf4322801f58e054017fecb"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a584c9daeadf4322801f58e054017fecb">on_message</a> (<a class="el" href="classproton_1_1delivery.html">delivery</a> &amp;, <a class="el" href="classproton_1_1message.html">message</a> &amp;)</td></tr>
<tr class="memdesc:a584c9daeadf4322801f58e054017fecb"><td class="mdescLeft">&#160;</td><td class="mdescRight">A message is received. <br /></td></tr>
<tr class="separator:a584c9daeadf4322801f58e054017fecb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86c9509ba3ce1925150c5b7a9a937c94"><td class="memItemLeft" align="right" valign="top"><a id="a86c9509ba3ce1925150c5b7a9a937c94"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a86c9509ba3ce1925150c5b7a9a937c94">on_sendable</a> (<a class="el" href="classproton_1_1sender.html">sender</a> &amp;)</td></tr>
<tr class="memdesc:a86c9509ba3ce1925150c5b7a9a937c94"><td class="mdescLeft">&#160;</td><td class="mdescRight">A message can be sent. <br /></td></tr>
<tr class="separator:a86c9509ba3ce1925150c5b7a9a937c94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa68ce0021c22cc956890c6bcc5384b84"><td class="memItemLeft" align="right" valign="top"><a id="aa68ce0021c22cc956890c6bcc5384b84"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#aa68ce0021c22cc956890c6bcc5384b84">on_transport_open</a> (<a class="el" href="classproton_1_1transport.html">transport</a> &amp;)</td></tr>
<tr class="memdesc:aa68ce0021c22cc956890c6bcc5384b84"><td class="mdescLeft">&#160;</td><td class="mdescRight">The underlying network transport is open. <br /></td></tr>
<tr class="separator:aa68ce0021c22cc956890c6bcc5384b84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a60c2f6628f44a9587deea8c8729f0f"><td class="memItemLeft" align="right" valign="top"><a id="a8a60c2f6628f44a9587deea8c8729f0f"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a8a60c2f6628f44a9587deea8c8729f0f">on_transport_close</a> (<a class="el" href="classproton_1_1transport.html">transport</a> &amp;)</td></tr>
<tr class="memdesc:a8a60c2f6628f44a9587deea8c8729f0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The underlying network transport has closed. <br /></td></tr>
<tr class="separator:a8a60c2f6628f44a9587deea8c8729f0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab719e98555bab69986acf4ab1fe43665"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#ab719e98555bab69986acf4ab1fe43665">on_transport_error</a> (<a class="el" href="classproton_1_1transport.html">transport</a> &amp;)</td></tr>
<tr class="memdesc:ab719e98555bab69986acf4ab1fe43665"><td class="mdescLeft">&#160;</td><td class="mdescRight">The underlying network transport has closed with an error condition. <a href="#ab719e98555bab69986acf4ab1fe43665">More...</a><br /></td></tr>
<tr class="separator:ab719e98555bab69986acf4ab1fe43665"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41277abe0e33a3df2764b08dcc12d768"><td class="memItemLeft" align="right" valign="top"><a id="a41277abe0e33a3df2764b08dcc12d768"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a41277abe0e33a3df2764b08dcc12d768">on_connection_open</a> (<a class="el" href="classproton_1_1connection.html">connection</a> &amp;)</td></tr>
<tr class="memdesc:a41277abe0e33a3df2764b08dcc12d768"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer opened the connection. <br /></td></tr>
<tr class="separator:a41277abe0e33a3df2764b08dcc12d768"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8368c2f41b5c1dab4aa063c1c78a6e19"><td class="memItemLeft" align="right" valign="top"><a id="a8368c2f41b5c1dab4aa063c1c78a6e19"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a8368c2f41b5c1dab4aa063c1c78a6e19">on_connection_close</a> (<a class="el" href="classproton_1_1connection.html">connection</a> &amp;)</td></tr>
<tr class="memdesc:a8368c2f41b5c1dab4aa063c1c78a6e19"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer closed the connection. <br /></td></tr>
<tr class="separator:a8368c2f41b5c1dab4aa063c1c78a6e19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae93110a9bad4868663f37d15cd3139a4"><td class="memItemLeft" align="right" valign="top"><a id="ae93110a9bad4868663f37d15cd3139a4"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#ae93110a9bad4868663f37d15cd3139a4">on_connection_error</a> (<a class="el" href="classproton_1_1connection.html">connection</a> &amp;)</td></tr>
<tr class="memdesc:ae93110a9bad4868663f37d15cd3139a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer closed the connection with an error condition. <br /></td></tr>
<tr class="separator:ae93110a9bad4868663f37d15cd3139a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad43a0028727310bcdbd8f63feb99537"><td class="memItemLeft" align="right" valign="top"><a id="aad43a0028727310bcdbd8f63feb99537"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#aad43a0028727310bcdbd8f63feb99537">on_session_open</a> (<a class="el" href="classproton_1_1session.html">session</a> &amp;)</td></tr>
<tr class="memdesc:aad43a0028727310bcdbd8f63feb99537"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer opened the session. <br /></td></tr>
<tr class="separator:aad43a0028727310bcdbd8f63feb99537"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3ff10317b9fdcbe00e500cb1e9c96ec"><td class="memItemLeft" align="right" valign="top"><a id="aa3ff10317b9fdcbe00e500cb1e9c96ec"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#aa3ff10317b9fdcbe00e500cb1e9c96ec">on_session_close</a> (<a class="el" href="classproton_1_1session.html">session</a> &amp;)</td></tr>
<tr class="memdesc:aa3ff10317b9fdcbe00e500cb1e9c96ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer closed the session. <br /></td></tr>
<tr class="separator:aa3ff10317b9fdcbe00e500cb1e9c96ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63bb630e8dc357b22d6c33781c7c6a11"><td class="memItemLeft" align="right" valign="top"><a id="a63bb630e8dc357b22d6c33781c7c6a11"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a63bb630e8dc357b22d6c33781c7c6a11">on_session_error</a> (<a class="el" href="classproton_1_1session.html">session</a> &amp;)</td></tr>
<tr class="memdesc:a63bb630e8dc357b22d6c33781c7c6a11"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer closed the session with an error condition. <br /></td></tr>
<tr class="separator:a63bb630e8dc357b22d6c33781c7c6a11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77f7e38659ee43ccb764e417ad6dd401"><td class="memItemLeft" align="right" valign="top"><a id="a77f7e38659ee43ccb764e417ad6dd401"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a77f7e38659ee43ccb764e417ad6dd401">on_receiver_open</a> (<a class="el" href="classproton_1_1receiver.html">receiver</a> &amp;)</td></tr>
<tr class="memdesc:a77f7e38659ee43ccb764e417ad6dd401"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer opened the link. <br /></td></tr>
<tr class="separator:a77f7e38659ee43ccb764e417ad6dd401"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06b10fbf8524545eaf88def91d7235ef"><td class="memItemLeft" align="right" valign="top"><a id="a06b10fbf8524545eaf88def91d7235ef"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a06b10fbf8524545eaf88def91d7235ef">on_receiver_detach</a> (<a class="el" href="classproton_1_1receiver.html">receiver</a> &amp;)</td></tr>
<tr class="memdesc:a06b10fbf8524545eaf88def91d7235ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer detached the link. <br /></td></tr>
<tr class="separator:a06b10fbf8524545eaf88def91d7235ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae51075d0f1d0c180bc8098370957ae28"><td class="memItemLeft" align="right" valign="top"><a id="ae51075d0f1d0c180bc8098370957ae28"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#ae51075d0f1d0c180bc8098370957ae28">on_receiver_close</a> (<a class="el" href="classproton_1_1receiver.html">receiver</a> &amp;)</td></tr>
<tr class="memdesc:ae51075d0f1d0c180bc8098370957ae28"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer closed the link. <br /></td></tr>
<tr class="separator:ae51075d0f1d0c180bc8098370957ae28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0daca9ec2dc45353a04069c6a12f3aa"><td class="memItemLeft" align="right" valign="top"><a id="ac0daca9ec2dc45353a04069c6a12f3aa"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#ac0daca9ec2dc45353a04069c6a12f3aa">on_receiver_error</a> (<a class="el" href="classproton_1_1receiver.html">receiver</a> &amp;)</td></tr>
<tr class="memdesc:ac0daca9ec2dc45353a04069c6a12f3aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer closed the link with an error condition. <br /></td></tr>
<tr class="separator:ac0daca9ec2dc45353a04069c6a12f3aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac655d56c64574c9eb7b10e80d32764f4"><td class="memItemLeft" align="right" valign="top"><a id="ac655d56c64574c9eb7b10e80d32764f4"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#ac655d56c64574c9eb7b10e80d32764f4">on_sender_open</a> (<a class="el" href="classproton_1_1sender.html">sender</a> &amp;)</td></tr>
<tr class="memdesc:ac655d56c64574c9eb7b10e80d32764f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer opened the link. <br /></td></tr>
<tr class="separator:ac655d56c64574c9eb7b10e80d32764f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae103f0e8f35a8aebfb14b96c298ed938"><td class="memItemLeft" align="right" valign="top"><a id="ae103f0e8f35a8aebfb14b96c298ed938"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#ae103f0e8f35a8aebfb14b96c298ed938">on_sender_detach</a> (<a class="el" href="classproton_1_1sender.html">sender</a> &amp;)</td></tr>
<tr class="memdesc:ae103f0e8f35a8aebfb14b96c298ed938"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer detached the link. <br /></td></tr>
<tr class="separator:ae103f0e8f35a8aebfb14b96c298ed938"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa604b2d3dad610ded346b0dcf3ec6f29"><td class="memItemLeft" align="right" valign="top"><a id="aa604b2d3dad610ded346b0dcf3ec6f29"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#aa604b2d3dad610ded346b0dcf3ec6f29">on_sender_close</a> (<a class="el" href="classproton_1_1sender.html">sender</a> &amp;)</td></tr>
<tr class="memdesc:aa604b2d3dad610ded346b0dcf3ec6f29"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer closed the link. <br /></td></tr>
<tr class="separator:aa604b2d3dad610ded346b0dcf3ec6f29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2347cff02f9ed958ca41fcc31e58d792"><td class="memItemLeft" align="right" valign="top"><a id="a2347cff02f9ed958ca41fcc31e58d792"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a2347cff02f9ed958ca41fcc31e58d792">on_sender_error</a> (<a class="el" href="classproton_1_1sender.html">sender</a> &amp;)</td></tr>
<tr class="memdesc:a2347cff02f9ed958ca41fcc31e58d792"><td class="mdescLeft">&#160;</td><td class="mdescRight">The remote peer closed the link with an error condition. <br /></td></tr>
<tr class="separator:a2347cff02f9ed958ca41fcc31e58d792"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e61812588fe6fbde253b41f7c02e993"><td class="memItemLeft" align="right" valign="top"><a id="a4e61812588fe6fbde253b41f7c02e993"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a4e61812588fe6fbde253b41f7c02e993">on_tracker_accept</a> (<a class="el" href="classproton_1_1tracker.html">tracker</a> &amp;)</td></tr>
<tr class="memdesc:a4e61812588fe6fbde253b41f7c02e993"><td class="mdescLeft">&#160;</td><td class="mdescRight">The receiving peer accepted a transfer. <br /></td></tr>
<tr class="separator:a4e61812588fe6fbde253b41f7c02e993"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a116c831b8a80727a451ce20c44d781f8"><td class="memItemLeft" align="right" valign="top"><a id="a116c831b8a80727a451ce20c44d781f8"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a116c831b8a80727a451ce20c44d781f8">on_tracker_reject</a> (<a class="el" href="classproton_1_1tracker.html">tracker</a> &amp;)</td></tr>
<tr class="memdesc:a116c831b8a80727a451ce20c44d781f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">The receiving peer rejected a transfer. <br /></td></tr>
<tr class="separator:a116c831b8a80727a451ce20c44d781f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad107964511dce62449ca730e9b0aca88"><td class="memItemLeft" align="right" valign="top"><a id="ad107964511dce62449ca730e9b0aca88"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#ad107964511dce62449ca730e9b0aca88">on_tracker_release</a> (<a class="el" href="classproton_1_1tracker.html">tracker</a> &amp;)</td></tr>
<tr class="memdesc:ad107964511dce62449ca730e9b0aca88"><td class="mdescLeft">&#160;</td><td class="mdescRight">The receiving peer released a transfer. <br /></td></tr>
<tr class="separator:ad107964511dce62449ca730e9b0aca88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36620e631024c73f5c6766abf95a8356"><td class="memItemLeft" align="right" valign="top"><a id="a36620e631024c73f5c6766abf95a8356"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a36620e631024c73f5c6766abf95a8356">on_tracker_settle</a> (<a class="el" href="classproton_1_1tracker.html">tracker</a> &amp;)</td></tr>
<tr class="memdesc:a36620e631024c73f5c6766abf95a8356"><td class="mdescLeft">&#160;</td><td class="mdescRight">The receiving peer settled a transfer. <br /></td></tr>
<tr class="separator:a36620e631024c73f5c6766abf95a8356"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f0e5cebf65a87f301ba5ef82eb8537d"><td class="memItemLeft" align="right" valign="top"><a id="a4f0e5cebf65a87f301ba5ef82eb8537d"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a4f0e5cebf65a87f301ba5ef82eb8537d">on_delivery_settle</a> (<a class="el" href="classproton_1_1delivery.html">delivery</a> &amp;)</td></tr>
<tr class="memdesc:a4f0e5cebf65a87f301ba5ef82eb8537d"><td class="mdescLeft">&#160;</td><td class="mdescRight">The sending peer settled a transfer. <br /></td></tr>
<tr class="separator:a4f0e5cebf65a87f301ba5ef82eb8537d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac07a9aab7eee64a7415f1cacc278344b"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#ac07a9aab7eee64a7415f1cacc278344b">on_sender_drain_start</a> (<a class="el" href="classproton_1_1sender.html">sender</a> &amp;)</td></tr>
<tr class="memdesc:ac07a9aab7eee64a7415f1cacc278344b"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Unsettled API</b> - The receiving peer has requested a drain of remaining credit. <a href="#ac07a9aab7eee64a7415f1cacc278344b">More...</a><br /></td></tr>
<tr class="separator:ac07a9aab7eee64a7415f1cacc278344b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c3ba013a3515fd3d0a1871c984e497e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a0c3ba013a3515fd3d0a1871c984e497e">on_receiver_drain_finish</a> (<a class="el" href="classproton_1_1receiver.html">receiver</a> &amp;)</td></tr>
<tr class="memdesc:a0c3ba013a3515fd3d0a1871c984e497e"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Unsettled API</b> - The credit outstanding at the time of the drain request has been consumed or returned. <a href="#a0c3ba013a3515fd3d0a1871c984e497e">More...</a><br /></td></tr>
<tr class="separator:a0c3ba013a3515fd3d0a1871c984e497e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29bfba2d26604e5d8d7f3183f1374481"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a29bfba2d26604e5d8d7f3183f1374481">on_connection_wake</a> (<a class="el" href="classproton_1_1connection.html">connection</a> &amp;)</td></tr>
<tr class="memdesc:a29bfba2d26604e5d8d7f3183f1374481"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Unsettled API</b> - An event that can be triggered from another thread. <a href="#a29bfba2d26604e5d8d7f3183f1374481">More...</a><br /></td></tr>
<tr class="separator:a29bfba2d26604e5d8d7f3183f1374481"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a042f595d1807eb1abe0195ab79357edd"><td class="memItemLeft" align="right" valign="top"><a id="a042f595d1807eb1abe0195ab79357edd"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classproton_1_1messaging__handler.html#a042f595d1807eb1abe0195ab79357edd">on_error</a> (const <a class="el" href="classproton_1_1error__condition.html">error_condition</a> &amp;)</td></tr>
<tr class="memdesc:a042f595d1807eb1abe0195ab79357edd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fallback error handling. <br /></td></tr>
<tr class="separator:a042f595d1807eb1abe0195ab79357edd"><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>A handler for Proton messaging events. </p>
<p>Subclass and override the event-handling member functions.</p>
<p>Event handling functions can always use the objects passed as arguments.</p>
<dl class="section note"><dt>Note</dt><dd>A handler function <b>must not</b> use proton objects that are not accessible via the arguments passed without taking extra care. For example an <a class="el" href="classproton_1_1messaging__handler.html#a584c9daeadf4322801f58e054017fecb" title="A message is received. ">on_message()</a> handler called for connection "A" cannot simply call <a class="el" href="classproton_1_1sender.html#a214eb30b24e6831d016a47b9dddda830" title="Send a message on the sender. ">sender::send()</a> on a <a class="el" href="classproton_1_1sender.html" title="A channel for sending messages. ">proton::sender</a> belonging to connection "B".</dd></dl>
<p><b>Thread-safety</b>: To be safe for both single- and multi-threaded use, a handler <b>must not</b> directly use objects belonging to another connection. See <a class="el" href="mt_page.html">Multithreading</a> and <a class="el" href="classproton_1_1work__queue.html" title="Unsettled API - A context for thread-safe execution of work. ">proton::work_queue</a> for safe ways to communicate. We recommend writing safe handlers to avoid mysterious failures if the handler is ever used in a multi-threaded container.</p>
<p><b>Single-threaded only</b>: An application is single-threaded if it calls <a class="el" href="classproton_1_1container.html#a13a43e6d814de94978c515cb084873b1" title="Run the container in the current thread. ">container::run()</a> exactly once, and does not make proton calls from any other thread. In this case a handler can use objects belonging to another connection, but it must call <a class="el" href="classproton_1_1connection.html#a473371542eaeba6f67660582fe6a6074" title="Unsettled API - Trigger an event from another thread. ">connection::wake()</a> on the other connection before returning. Such a handler will fail mysteriously if the container is run with multiple threads.</p>
<h4>Close and error handling</h4>
<p>There are several objects that have <code>on_X_close</code> and <code>on_X_error</code> functions. They are called as follows:</p>
<ul>
<li>If <code>X</code> is closed cleanly, with no error status, then <code>on_X_close</code> is called.</li>
<li>If <code>X</code> is closed with an error, then <code>on_X_error</code> is called, followed by <code>on_X_close</code>. The error condition is also available in <code>on_X_close</code> from <code>X::error()</code>.</li>
</ul>
<p>By default, if you do not implement <code>on_X_error</code>, it will call <code>on_error</code>. If you do not implement <code>on_error</code> it will throw a <code><a class="el" href="structproton_1_1error.html" title="The base Proton error. ">proton::error</a></code> exception, which may not be what you want but does help to identify forgotten error handling quickly.</p>
<h4>Resource cleanup</h4>
<p>Every <code>on_X_open</code> event is paired with an <code>on_X_close</code> event which can clean up any resources created by the open handler. In particular this is still true if an error is reported with an <code>on_X_error</code> event. The error-handling logic doesn't have to manage resource clean up. It can assume that the close event will be along to handle it. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="broker_8cpp-example.html#_a0">broker.cpp</a>, <a class="el" href="client_8cpp-example.html#_a2">client.cpp</a>, <a class="el" href="direct_recv_8cpp-example.html#_a0">direct_recv.cpp</a>, <a class="el" href="direct_send_8cpp-example.html#_a0">direct_send.cpp</a>, <a class="el" href="helloworld_8cpp-example.html#_a0">helloworld.cpp</a>, <a class="el" href="multithreaded_client_8cpp-example.html#_a0">multithreaded_client.cpp</a>, <a class="el" href="multithreaded_client_flow_control_8cpp-example.html#_a0">multithreaded_client_flow_control.cpp</a>, <a class="el" href="scheduled_send_8cpp-example.html#_a0">scheduled_send.cpp</a>, <a class="el" href="scheduled_send_03_8cpp-example.html#_a0">scheduled_send_03.cpp</a>, <a class="el" href="server_8cpp-example.html#_a0">server.cpp</a>, <a class="el" href="server_direct_8cpp-example.html#_a0">server_direct.cpp</a>, <a class="el" href="service_bus_8cpp-example.html#_a4">service_bus.cpp</a>, <a class="el" href="simple_recv_8cpp-example.html#_a0">simple_recv.cpp</a>, and <a class="el" href="simple_send_8cpp-example.html#_a0">simple_send.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a9188622c33638e076d2214080129c824"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9188622c33638e076d2214080129c824">&#9670;&nbsp;</a></span>on_container_start()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void on_container_start </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classproton_1_1container.html">container</a> &amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The container event loop is starting. </p>
<p>This is the first event received after calling <code><a class="el" href="classproton_1_1container.html#a13a43e6d814de94978c515cb084873b1" title="Run the container in the current thread. ">container::run()</a></code>. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="client_8cpp-example.html#a5">client.cpp</a>, <a class="el" href="helloworld_8cpp-example.html#a1">helloworld.cpp</a>, <a class="el" href="multithreaded_client_8cpp-example.html#a8">multithreaded_client.cpp</a>, <a class="el" href="scheduled_send_8cpp-example.html#a5">scheduled_send.cpp</a>, <a class="el" href="scheduled_send_03_8cpp-example.html#a4">scheduled_send_03.cpp</a>, <a class="el" href="server_8cpp-example.html#a2">server.cpp</a>, <a class="el" href="simple_recv_8cpp-example.html#a2">simple_recv.cpp</a>, and <a class="el" href="simple_send_8cpp-example.html#a2">simple_send.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ac6a0a8d9aad83b7e5a5b2f8a70f23c90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac6a0a8d9aad83b7e5a5b2f8a70f23c90">&#9670;&nbsp;</a></span>on_container_stop()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void on_container_stop </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classproton_1_1container.html">container</a> &amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The container event loop is stopping. </p>
<p>This is the last event received before the container event loop stops. </p>
</div>
</div>
<a id="ab719e98555bab69986acf4ab1fe43665"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab719e98555bab69986acf4ab1fe43665">&#9670;&nbsp;</a></span>on_transport_error()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void on_transport_error </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classproton_1_1transport.html">transport</a> &amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The underlying network transport has closed with an error condition. </p>
</div>
</div>
<a id="ac07a9aab7eee64a7415f1cacc278344b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac07a9aab7eee64a7415f1cacc278344b">&#9670;&nbsp;</a></span>on_sender_drain_start()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void on_sender_drain_start </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classproton_1_1sender.html">sender</a> &amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p><b>Unsettled API</b> - The receiving peer has requested a drain of remaining credit. </p>
</div>
</div>
<a id="a0c3ba013a3515fd3d0a1871c984e497e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c3ba013a3515fd3d0a1871c984e497e">&#9670;&nbsp;</a></span>on_receiver_drain_finish()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void on_receiver_drain_finish </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classproton_1_1receiver.html">receiver</a> &amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p><b>Unsettled API</b> - The credit outstanding at the time of the drain request has been consumed or returned. </p>
</div>
</div>
<a id="a29bfba2d26604e5d8d7f3183f1374481"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29bfba2d26604e5d8d7f3183f1374481">&#9670;&nbsp;</a></span>on_connection_wake()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void on_connection_wake </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classproton_1_1connection.html">connection</a> &amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p><b>Unsettled API</b> - An event that can be triggered from another thread. </p>
<p>This event is triggered by a call to <code><a class="el" href="classproton_1_1connection.html#a473371542eaeba6f67660582fe6a6074" title="Unsettled API - Trigger an event from another thread. ">connection::wake()</a></code>. It is used to notify the application that something needs attention.</p>
<p><b>Thread-safety</b> - The application handler and the triggering thread must use some form of thread-safe state or communication to tell the handler what it needs to do. See <code><a class="el" href="classproton_1_1work__queue.html" title="Unsettled API - A context for thread-safe execution of work. ">proton::work_queue</a></code> for an easier way to execute code safely in the handler thread.</p>
<dl class="section note"><dt>Note</dt><dd>Spurious calls to <code><a class="el" href="classproton_1_1messaging__handler.html#a29bfba2d26604e5d8d7f3183f1374481" title="Unsettled API - An event that can be triggered from another thread. ">on_connection_wake()</a></code> can occur without any application call to <code><a class="el" href="classproton_1_1connection.html#a473371542eaeba6f67660582fe6a6074" title="Unsettled API - Trigger an event from another thread. ">connection::wake()</a></code>. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>proton/<a class="el" href="messaging__handler_8hpp_source.html">messaging_handler.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- 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_1messaging__handler.html">messaging_handler</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
</ul>
</div>
</body>
</html>