/usr/share/doc/python-pika-doc/html/modules/adapters/select.html is in python-pika-doc 0.10.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | <!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/html; charset=utf-8" />
<title>Select Connection Adapter — pika 0.10.0 documentation</title>
<link rel="stylesheet" href="../../_static/classic.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.10.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
<link rel="top" title="pika 0.10.0 documentation" href="../../index.html" />
<link rel="up" title="Connection Adapters" href="index.html" />
<link rel="next" title="Tornado Connection Adapter" href="tornado.html" />
<link rel="prev" title="BlockingConnection" href="blocking.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="tornado.html" title="Tornado Connection Adapter"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="blocking.html" title="BlockingConnection"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pika 0.10.0 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Core Class and Module Documentation</a> »</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Connection Adapters</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-pika.adapters.select_connection">
<span id="select-connection-adapter"></span><h1>Select Connection Adapter<a class="headerlink" href="#module-pika.adapters.select_connection" title="Permalink to this headline">¶</a></h1>
<p>A connection adapter that tries to use the best polling method for the
platform pika is running on.</p>
<dl class="class">
<dt id="pika.adapters.select_connection.SelectConnection">
<em class="property">class </em><code class="descclassname">pika.adapters.select_connection.</code><code class="descname">SelectConnection</code><span class="sig-paren">(</span><em>parameters=None</em>, <em>on_open_callback=None</em>, <em>on_open_error_callback=None</em>, <em>on_close_callback=None</em>, <em>stop_ioloop_on_close=True</em>, <em>custom_ioloop=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection" title="Permalink to this definition">¶</a></dt>
<dd><p>An asynchronous connection adapter that attempts to use the fastest
event loop adapter for the given platform.</p>
<dl class="method">
<dt id="pika.adapters.select_connection.SelectConnection.add_backpressure_callback">
<code class="descname">add_backpressure_callback</code><span class="sig-paren">(</span><em>callback_method</em><span class="sig-paren">)</span><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.add_backpressure_callback" title="Permalink to this definition">¶</a></dt>
<dd><p>Call method “callback” when pika believes backpressure is being
applied.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>callback_method</strong> (<em>method</em>) – The method to call</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pika.adapters.select_connection.SelectConnection.add_on_close_callback">
<code class="descname">add_on_close_callback</code><span class="sig-paren">(</span><em>callback_method</em><span class="sig-paren">)</span><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.add_on_close_callback" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a callback notification when the connection has closed. The
callback will be passed the connection, the reply_code (int) and the
reply_text (str), if sent by the remote server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>callback_method</strong> (<em>method</em>) – Callback to call on close</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pika.adapters.select_connection.SelectConnection.add_on_connection_blocked_callback">
<code class="descname">add_on_connection_blocked_callback</code><span class="sig-paren">(</span><em>callback_method</em><span class="sig-paren">)</span><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.add_on_connection_blocked_callback" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a callback to be notified when RabbitMQ has sent a
<code class="docutils literal"><span class="pre">Connection.Blocked</span></code> frame indicating that RabbitMQ is low on
resources. Publishers can use this to voluntarily suspend publishing,
instead of relying on back pressure throttling. The callback
will be passed the <code class="docutils literal"><span class="pre">Connection.Blocked</span></code> method frame.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>callback_method</strong> (<em>method</em>) – Callback to call on <cite>Connection.Blocked</cite></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pika.adapters.select_connection.SelectConnection.add_on_connection_unblocked_callback">
<code class="descname">add_on_connection_unblocked_callback</code><span class="sig-paren">(</span><em>callback_method</em><span class="sig-paren">)</span><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.add_on_connection_unblocked_callback" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a callback to be notified when RabbitMQ has sent a
<code class="docutils literal"><span class="pre">Connection.Unblocked</span></code> frame letting publishers know it’s ok
to start publishing again. The callback will be passed the
<code class="docutils literal"><span class="pre">Connection.Unblocked</span></code> method frame.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>callback_method</strong> (<em>method</em>) – Callback to call on
<cite>Connection.Unblocked</cite></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pika.adapters.select_connection.SelectConnection.add_on_open_callback">
<code class="descname">add_on_open_callback</code><span class="sig-paren">(</span><em>callback_method</em><span class="sig-paren">)</span><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.add_on_open_callback" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a callback notification when the connection has opened.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>callback_method</strong> (<em>method</em>) – Callback to call when open</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pika.adapters.select_connection.SelectConnection.add_on_open_error_callback">
<code class="descname">add_on_open_error_callback</code><span class="sig-paren">(</span><em>callback_method</em>, <em>remove_default=True</em><span class="sig-paren">)</span><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.add_on_open_error_callback" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a callback notification when the connection can not be opened.</p>
<p>The callback method should accept the connection object that could not
connect, and an optional error message.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>callback_method</strong> (<em>method</em>) – Callback to call when can’t connect</li>
<li><strong>remove_default</strong> (<em>bool</em>) – Remove default exception raising callback</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pika.adapters.select_connection.SelectConnection.add_timeout">
<code class="descname">add_timeout</code><span class="sig-paren">(</span><em>deadline</em>, <em>callback_method</em><span class="sig-paren">)</span><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.add_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Add the callback_method to the IOLoop timer to fire after deadline
seconds. Returns a handle to the timeout</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>deadline</strong> (<em>int</em>) – The number of seconds to wait to call callback</li>
<li><strong>callback_method</strong> (<em>method</em>) – The callback method</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">str</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="pika.adapters.select_connection.SelectConnection.basic_nack">
<code class="descname">basic_nack</code><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.basic_nack" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies if the server supports basic.nack on the active connection.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pika.adapters.select_connection.SelectConnection.channel">
<code class="descname">channel</code><span class="sig-paren">(</span><em>on_open_callback</em>, <em>channel_number=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.channel" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new channel with the next available channel number or pass
in a channel number to use. Must be non-zero if you would like to
specify but it is recommended that you let Pika manage the channel
numbers.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>on_open_callback</strong> (<em>method</em>) – The callback when the channel is opened</li>
<li><strong>channel_number</strong> (<em>int</em>) – The channel number to use, defaults to the
next available.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="../channel.html#pika.channel.Channel" title="pika.channel.Channel">pika.channel.Channel</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pika.adapters.select_connection.SelectConnection.close">
<code class="descname">close</code><span class="sig-paren">(</span><em>reply_code=200</em>, <em>reply_text='Normal shutdown'</em><span class="sig-paren">)</span><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.close" title="Permalink to this definition">¶</a></dt>
<dd><p>Disconnect from RabbitMQ. If there are any open channels, it will
attempt to close them prior to fully disconnecting. Channels which
have active consumers will attempt to send a Basic.Cancel to RabbitMQ
to cleanly stop the delivery of messages prior to closing the channel.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>reply_code</strong> (<em>int</em>) – The code number for the close</li>
<li><strong>reply_text</strong> (<em>str</em>) – The text reason for the close</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pika.adapters.select_connection.SelectConnection.connect">
<code class="descname">connect</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.connect" title="Permalink to this definition">¶</a></dt>
<dd><p>Invoke if trying to reconnect to a RabbitMQ server. Constructing the
Connection object should connect on its own.</p>
</dd></dl>
<dl class="attribute">
<dt id="pika.adapters.select_connection.SelectConnection.consumer_cancel_notify">
<code class="descname">consumer_cancel_notify</code><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.consumer_cancel_notify" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies if the server supports consumer cancel notification on the
active connection.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="pika.adapters.select_connection.SelectConnection.exchange_exchange_bindings">
<code class="descname">exchange_exchange_bindings</code><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.exchange_exchange_bindings" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies if the active connection supports exchange to exchange
bindings.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="pika.adapters.select_connection.SelectConnection.is_closed">
<code class="descname">is_closed</code><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.is_closed" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a boolean reporting the current connection state.</p>
</dd></dl>
<dl class="attribute">
<dt id="pika.adapters.select_connection.SelectConnection.is_closing">
<code class="descname">is_closing</code><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.is_closing" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a boolean reporting the current connection state.</p>
</dd></dl>
<dl class="attribute">
<dt id="pika.adapters.select_connection.SelectConnection.is_open">
<code class="descname">is_open</code><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.is_open" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a boolean reporting the current connection state.</p>
</dd></dl>
<dl class="attribute">
<dt id="pika.adapters.select_connection.SelectConnection.publisher_confirms">
<code class="descname">publisher_confirms</code><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.publisher_confirms" title="Permalink to this definition">¶</a></dt>
<dd><p>Specifies if the active connection can use publisher confirmations.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pika.adapters.select_connection.SelectConnection.remove_timeout">
<code class="descname">remove_timeout</code><span class="sig-paren">(</span><em>timeout_id</em><span class="sig-paren">)</span><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.remove_timeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove the timeout from the IOLoop by the ID returned from
add_timeout.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pika.adapters.select_connection.SelectConnection.set_backpressure_multiplier">
<code class="descname">set_backpressure_multiplier</code><span class="sig-paren">(</span><em>value=10</em><span class="sig-paren">)</span><a class="headerlink" href="#pika.adapters.select_connection.SelectConnection.set_backpressure_multiplier" title="Permalink to this definition">¶</a></dt>
<dd><p>Alter the backpressure multiplier value. We set this to 10 by default.
This value is used to raise warnings and trigger the backpressure
callback.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>value</strong> (<em>int</em>) – The multiplier value to set</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="blocking.html"
title="previous chapter">BlockingConnection</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="tornado.html"
title="next chapter">Tornado Connection Adapter</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/modules/adapters/select.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="tornado.html" title="Tornado Connection Adapter"
>next</a> |</li>
<li class="right" >
<a href="blocking.html" title="BlockingConnection"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pika 0.10.0 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Core Class and Module Documentation</a> »</li>
<li class="nav-item nav-item-2"><a href="index.html" >Connection Adapters</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2009-2015, Tony Garnock-Jones, Gavin M. Roy, Pivotal and others..
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.3.
</div>
</body>
</html>
|