<!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.11"/>
<title>My Project: amqp::broker Class Reference</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="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">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <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>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- 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 id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>amqp</b></li><li class="navelem"><a class="el" href="classamqp_1_1broker.html">broker</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classamqp_1_1broker-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">amqp::broker Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="broker_8h_source.html">broker.h</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:a0c7899c607debf86876100975dfe4a08"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classamqp_1_1broker.html#a0c7899c607debf86876100975dfe4a08">broker</a> (<a class="el" href="classamqp_1_1exchange.html#aa77d5c51df9769c22e962a913b755184">exchange::type</a> etype)</td></tr>
<tr class="separator:a0c7899c607debf86876100975dfe4a08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1419ddc5fb90ab7a623f083354243003"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classamqp_1_1broker.html#a1419ddc5fb90ab7a623f083354243003">register_binding</a> (const string &amp;binding_key)</td></tr>
<tr class="separator:a1419ddc5fb90ab7a623f083354243003"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44db84559a9a342a58303d8b12bc6ca1"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="classamqp_1_1amqp__queue.html">amqp_queue</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classamqp_1_1broker.html#a44db84559a9a342a58303d8b12bc6ca1">register_client</a> (<a class="el" href="classamqp_1_1client.html">client</a> &amp;c, const string &amp;binding_key)</td></tr>
<tr class="separator:a44db84559a9a342a58303d8b12bc6ca1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabd44560b8ae525e6940ca2a2d5aea03"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classamqp_1_1broker.html#aabd44560b8ae525e6940ca2a2d5aea03">publish</a> (<a class="el" href="classamqp_1_1message.html">message</a> msg)</td></tr>
<tr class="separator:aabd44560b8ae525e6940ca2a2d5aea03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a122433014b6e246935a304dce54e55d0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classamqp_1_1broker.html#a122433014b6e246935a304dce54e55d0">endSimulation</a> ()</td></tr>
<tr class="separator:a122433014b6e246935a304dce54e55d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22368fdd9d5192e4814f8a5a00e6057d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classamqp_1_1broker.html#a22368fdd9d5192e4814f8a5a00e6057d">endBinding</a> (string i_bindingKey)</td></tr>
<tr class="separator:a22368fdd9d5192e4814f8a5a00e6057d"><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>The broker is responsible for creating the exchange and binding the queues to the exchange. This should run as a thread Will wait for messages on connections and invoke the exchange.</p>
<dl class="section author"><dt>Authors</dt><dd>Manpreet Kaur, Cliffton Fernandes </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a0c7899c607debf86876100975dfe4a08"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">broker::broker </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classamqp_1_1exchange.html#aa77d5c51df9769c22e962a913b755184">exchange::type</a>&#160;</td>
          <td class="paramname"><em>etype</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Construct broker with input exchange type </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a22368fdd9d5192e4814f8a5a00e6057d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void amqp::broker::endBinding </td>
          <td>(</td>
          <td class="paramtype">string&#160;</td>
          <td class="paramname"><em>i_bindingKey</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Remove the binding corresponding to input binding key </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a122433014b6e246935a304dce54e55d0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void amqp::broker::endSimulation </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>end simulation method will be called once main thread has exited. It will remove all the binding and queues. </p>

</div>
</div>
<a class="anchor" id="aabd44560b8ae525e6940ca2a2d5aea03"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void broker::publish </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classamqp_1_1message.html">message</a>&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>publish the input message based on the message type and exchange type</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msg</td><td>input Message </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1419ddc5fb90ab7a623f083354243003"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void broker::register_binding </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>binding_key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register all possible binding entered by user </p>

</div>
</div>
<a class="anchor" id="a44db84559a9a342a58303d8b12bc6ca1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="classamqp_1_1amqp__queue.html">amqp_queue</a> &gt; broker::register_client </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classamqp_1_1client.html">client</a> &amp;&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>binding_key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Register input client </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td>input client </td></tr>
    <tr><td class="paramname">binding_key</td><td>input binding key </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="broker_8h_source.html">broker.h</a></li>
<li>broker.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
