| |
| <!DOCTYPE html> |
| |
| <html> |
| <head> |
| <meta charset="utf-8" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| <title>Module proton — Qpid Proton Python API 0.32.0 documentation</title> |
| <link rel="stylesheet" href="_static/sphinxdoc.css" type="text/css" /> |
| <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> |
| <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> |
| <script src="_static/jquery.js"></script> |
| <script src="_static/underscore.js"></script> |
| <script src="_static/doctools.js"></script> |
| <script src="_static/language_data.js"></script> |
| <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> |
| <link rel="index" title="Index" href="genindex.html" /> |
| <link rel="search" title="Search" href="search.html" /> |
| <link rel="next" title="Module proton.handlers" href="proton.handlers.html" /> |
| <link rel="prev" title="Qpid Proton Python API Documentation" href="index.html" /> |
| </head><body> |
| <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="proton.handlers.html" title="Module proton.handlers" |
| accesskey="N">next</a> |</li> |
| <li class="right" > |
| <a href="index.html" title="Qpid Proton Python API Documentation" |
| accesskey="P">previous</a> |</li> |
| <li class="nav-item nav-item-0"><a href="index.html">Qpid Proton Python API 0.32.0 documentation</a> »</li> |
| <li class="nav-item nav-item-this"><a href="">Module <code class="docutils literal notranslate"><span class="pre">proton</span></code></a></li> |
| </ul> |
| </div> |
| |
| <div class="document"> |
| <div class="documentwrapper"> |
| <div class="bodywrapper"> |
| <div class="body" role="main"> |
| |
| <div class="section" id="module-proton"> |
| <h1>Module <code class="docutils literal notranslate"><span class="pre">proton</span></code><a class="headerlink" href="#module-proton" title="Permalink to this headline">¶</a></h1> |
| <div class="section" id="module-summary"> |
| <h2>Module Summary<a class="headerlink" href="#module-summary" title="Permalink to this headline">¶</a></h2> |
| <div class="line-block"> |
| <div class="line"><br /></div> |
| </div> |
| <table class="docutils align-default"> |
| <colgroup> |
| <col style="width: 22%" /> |
| <col style="width: 78%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.AnnotationDict" title="proton.AnnotationDict"><code class="xref py py-class docutils literal notranslate"><span class="pre">AnnotationDict</span></code></a></p></td> |
| <td><p>A dictionary that only takes <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> or <a class="reference internal" href="#proton.ulong" title="proton.ulong"><code class="xref py py-class docutils literal notranslate"><span class="pre">ulong</span></code></a> types as a key.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a></p></td> |
| <td><p>An AMQP Condition object.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a></p></td> |
| <td><p>A representation of an AMQP connection.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a></p></td> |
| <td><p>Provides an interface for decoding, extracting, creating, and encoding arbitrary AMQP data.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a></p></td> |
| <td><p>Tracks and/or records the delivery of a message over a link.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.Disposition" title="proton.Disposition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Disposition</span></code></a></p></td> |
| <td><p>A delivery state.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.Endpoint" title="proton.Endpoint"><code class="xref py py-class docutils literal notranslate"><span class="pre">Endpoint</span></code></a></p></td> |
| <td><p>Abstract class from which <a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a>, <a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a> and <a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a> are derived, |
| and which defines the state of these classes.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.Event" title="proton.Event"><code class="xref py py-class docutils literal notranslate"><span class="pre">Event</span></code></a></p></td> |
| <td><p>Notification of a state change in the protocol engine.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.EventType" title="proton.EventType"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventType</span></code></a></p></td> |
| <td><p>Connects an event number to an event name, and is used internally by <a class="reference internal" href="#proton.Event" title="proton.Event"><code class="xref py py-class docutils literal notranslate"><span class="pre">Event</span></code></a> to represent |
| all known event types.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a></p></td> |
| <td><p>A representation of an AMQP link (a unidirectional channel for transferring messages), of which |
| there are two concrete implementations, <a class="reference internal" href="#proton.Sender" title="proton.Sender"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sender</span></code></a> and <a class="reference internal" href="#proton.Receiver" title="proton.Receiver"><code class="xref py py-class docutils literal notranslate"><span class="pre">Receiver</span></code></a>.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.Message" title="proton.Message"><code class="xref py py-class docutils literal notranslate"><span class="pre">Message</span></code></a></p></td> |
| <td><p>A mutable holder of message content.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.PropertyDict" title="proton.PropertyDict"><code class="xref py py-class docutils literal notranslate"><span class="pre">PropertyDict</span></code></a></p></td> |
| <td><p>A dictionary that only takes <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> types as a key.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.Receiver" title="proton.Receiver"><code class="xref py py-class docutils literal notranslate"><span class="pre">Receiver</span></code></a></p></td> |
| <td><p>A link over which messages are received.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.SASL" title="proton.SASL"><code class="xref py py-class docutils literal notranslate"><span class="pre">SASL</span></code></a></p></td> |
| <td><p>The SASL layer is responsible for establishing an authenticated and/or encrypted tunnel over |
| which AMQP frames are passed between peers.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.Sender" title="proton.Sender"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sender</span></code></a></p></td> |
| <td><p>A link over which messages are sent.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a></p></td> |
| <td><p>A container of links.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.SSL" title="proton.SSL"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSL</span></code></a></p></td> |
| <td><p>An SSL session associated with a transport.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.SSLDomain" title="proton.SSLDomain"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLDomain</span></code></a></p></td> |
| <td><p>An SSL configuration domain, used to hold the SSL configuration for one or more SSL sessions.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.SSLSessionDetails" title="proton.SSLSessionDetails"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLSessionDetails</span></code></a></p></td> |
| <td><p>Unique identifier for the SSL session.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.SymbolList" title="proton.SymbolList"><code class="xref py py-class docutils literal notranslate"><span class="pre">SymbolList</span></code></a></p></td> |
| <td><p>A list that can only hold <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> elements.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a></p></td> |
| <td><p>A source or target for messages.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.Transport" title="proton.Transport"><code class="xref py py-class docutils literal notranslate"><span class="pre">Transport</span></code></a></p></td> |
| <td><p>A network channel supporting an AMQP connection.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.Url" title="proton.Url"><code class="xref py py-class docutils literal notranslate"><span class="pre">Url</span></code></a></p></td> |
| <td><p><strong>DEPRECATED</strong> Simple URL parser/constructor.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| <div class="line-block"> |
| <div class="line"><br /></div> |
| </div> |
| <div class="section" id="exceptions"> |
| <h3>Exceptions<a class="headerlink" href="#exceptions" title="Permalink to this headline">¶</a></h3> |
| <div class="line-block"> |
| <div class="line"><br /></div> |
| </div> |
| <table class="docutils align-default"> |
| <colgroup> |
| <col style="width: 25%" /> |
| <col style="width: 75%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.ConnectionException" title="proton.ConnectionException"><code class="xref py py-class docutils literal notranslate"><span class="pre">ConnectionException</span></code></a></p></td> |
| <td><p>An exception class raised when exceptions or errors related to a connection arise.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-class docutils literal notranslate"><span class="pre">DataException</span></code></a></p></td> |
| <td><p>The DataException class is the root of the Data exception hierarchy.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.LinkException" title="proton.LinkException"><code class="xref py py-class docutils literal notranslate"><span class="pre">LinkException</span></code></a></p></td> |
| <td><p>An exception class raised when exceptions or errors related to a link arise.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-class docutils literal notranslate"><span class="pre">MessageException</span></code></a></p></td> |
| <td><p>The MessageException class is the root of the message exception hierarchy.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.ProtonException" title="proton.ProtonException"><code class="xref py py-class docutils literal notranslate"><span class="pre">ProtonException</span></code></a></p></td> |
| <td><p>The root of the proton exception hierarchy.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.SessionException" title="proton.SessionException"><code class="xref py py-class docutils literal notranslate"><span class="pre">SessionException</span></code></a></p></td> |
| <td><p>An exception class raised when exceptions or errors related to a session arise.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.SSLUnavailable" title="proton.SSLUnavailable"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLUnavailable</span></code></a></p></td> |
| <td><p>An exception class raised when exceptions or errors related to SSL availability arise.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.SSLException" title="proton.SSLException"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLException</span></code></a></p></td> |
| <td><p>An exception class raised when exceptions or errors related to SSL usage arise.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.Timeout" title="proton.Timeout"><code class="xref py py-class docutils literal notranslate"><span class="pre">Timeout</span></code></a></p></td> |
| <td><p>A timeout exception indicates that a blocking operation has timed out.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.Interrupt" title="proton.Interrupt"><code class="xref py py-class docutils literal notranslate"><span class="pre">Interrupt</span></code></a></p></td> |
| <td><p>An interrupt exception indicates that a blocking operation was interrupted.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.TransportException" title="proton.TransportException"><code class="xref py py-class docutils literal notranslate"><span class="pre">TransportException</span></code></a></p></td> |
| <td><p>An exception class raised when exceptions or errors related to the AMQP transport arise.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| <div class="line-block"> |
| <div class="line"><br /></div> |
| </div> |
| </div> |
| <div class="section" id="amqp-types"> |
| <h3>AMQP Types<a class="headerlink" href="#amqp-types" title="Permalink to this headline">¶</a></h3> |
| <p><strong>NOTE:</strong> Some AMQP types are represented by native Python types. This table contains only classes for non-native |
| Python types defined in this module. See <a class="reference internal" href="types.html#types"><span class="std std-ref">AMQP Types</span></a> for a full list of AMQP types.</p> |
| <div class="line-block"> |
| <div class="line"><br /></div> |
| </div> |
| <table class="docutils align-default"> |
| <colgroup> |
| <col style="width: 26%" /> |
| <col style="width: 74%" /> |
| </colgroup> |
| <tbody> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.Array" title="proton.Array"><code class="xref py py-class docutils literal notranslate"><span class="pre">Array</span></code></a></p></td> |
| <td><p>An AMQP array, a sequence of AMQP values of a single type.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.byte" title="proton.byte"><code class="xref py py-class docutils literal notranslate"><span class="pre">byte</span></code></a></p></td> |
| <td><p>The byte AMQP type.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.char" title="proton.char"><code class="xref py py-class docutils literal notranslate"><span class="pre">char</span></code></a></p></td> |
| <td><p>The char AMQP type.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.Described" title="proton.Described"><code class="xref py py-class docutils literal notranslate"><span class="pre">Described</span></code></a></p></td> |
| <td><p>A described AMQP type.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.decimal32" title="proton.decimal32"><code class="xref py py-class docutils literal notranslate"><span class="pre">decimal32</span></code></a></p></td> |
| <td><p>The decimal32 AMQP type.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.decimal64" title="proton.decimal64"><code class="xref py py-class docutils literal notranslate"><span class="pre">decimal64</span></code></a></p></td> |
| <td><p>The decimal64 AMQP type.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.decimal128" title="proton.decimal128"><code class="xref py py-class docutils literal notranslate"><span class="pre">decimal128</span></code></a></p></td> |
| <td><p>The decimal128 AMQP type.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.float32" title="proton.float32"><code class="xref py py-class docutils literal notranslate"><span class="pre">float32</span></code></a></p></td> |
| <td><p>The float AMQP type.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.int32" title="proton.int32"><code class="xref py py-class docutils literal notranslate"><span class="pre">int32</span></code></a></p></td> |
| <td><p>The signed int AMQP type.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.short" title="proton.short"><code class="xref py py-class docutils literal notranslate"><span class="pre">short</span></code></a></p></td> |
| <td><p>The short AMQP type.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a></p></td> |
| <td><p>The symbol AMQP type.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.timestamp" title="proton.timestamp"><code class="xref py py-class docutils literal notranslate"><span class="pre">timestamp</span></code></a></p></td> |
| <td><p>The timestamp AMQP type.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.ubyte" title="proton.ubyte"><code class="xref py py-class docutils literal notranslate"><span class="pre">ubyte</span></code></a></p></td> |
| <td><p>The unsigned byte AMQP type.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.uint" title="proton.uint"><code class="xref py py-class docutils literal notranslate"><span class="pre">uint</span></code></a></p></td> |
| <td><p>The unsigned int AMQP type.</p></td> |
| </tr> |
| <tr class="row-odd"><td><p><a class="reference internal" href="#proton.ulong" title="proton.ulong"><code class="xref py py-class docutils literal notranslate"><span class="pre">ulong</span></code></a></p></td> |
| <td><p>The ulong AMQP type.</p></td> |
| </tr> |
| <tr class="row-even"><td><p><a class="reference internal" href="#proton.ushort" title="proton.ushort"><code class="xref py py-class docutils literal notranslate"><span class="pre">ushort</span></code></a></p></td> |
| <td><p>The unsigned short AMQP type.</p></td> |
| </tr> |
| </tbody> |
| </table> |
| <div class="line-block"> |
| <div class="line"><br /></div> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="module-detail"> |
| <h2>Module Detail<a class="headerlink" href="#module-detail" title="Permalink to this headline">¶</a></h2> |
| <dl class="py class"> |
| <dt id="proton.AnnotationDict"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">AnnotationDict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">e</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">raise_on_error</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#AnnotationDict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.AnnotationDict" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._data.RestrictedKeyDict</span></code></p> |
| <p>A dictionary that only takes <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> or <a class="reference internal" href="#proton.ulong" title="proton.ulong"><code class="xref py py-class docutils literal notranslate"><span class="pre">ulong</span></code></a> types |
| as a key. However, if a string key is provided, it will be silently |
| converted into a symbol key.</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">proton</span> <span class="kn">import</span> <span class="n">symbol</span><span class="p">,</span> <span class="n">ulong</span><span class="p">,</span> <span class="n">AnnotationDict</span> |
| <span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">AnnotationDict</span><span class="p">(</span><span class="n">one</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">two</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">a</span><span class="p">[</span><span class="n">ulong</span><span class="p">(</span><span class="mi">3</span><span class="p">)]</span> <span class="o">=</span> <span class="s1">'three'</span> |
| <span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">AnnotationDict</span><span class="p">({</span><span class="s1">'one'</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span> <span class="n">symbol</span><span class="p">(</span><span class="s1">'two'</span><span class="p">):</span><span class="mi">2</span><span class="p">,</span> <span class="n">ulong</span><span class="p">(</span><span class="mi">3</span><span class="p">):</span><span class="s1">'three'</span><span class="p">})</span> |
| <span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">AnnotationDict</span><span class="p">(</span><span class="nb">zip</span><span class="p">([</span><span class="n">symbol</span><span class="p">(</span><span class="s1">'one'</span><span class="p">),</span> <span class="s1">'two'</span><span class="p">,</span> <span class="n">ulong</span><span class="p">(</span><span class="mi">3</span><span class="p">)],</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="s1">'three'</span><span class="p">]))</span> |
| <span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="n">AnnotationDict</span><span class="p">([(</span><span class="s1">'one'</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="n">symbol</span><span class="p">(</span><span class="s1">'two'</span><span class="p">),</span> <span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="n">ulong</span><span class="p">(</span><span class="mi">3</span><span class="p">),</span> <span class="s1">'three'</span><span class="p">)])</span> |
| <span class="gp">>>> </span><span class="n">e</span> <span class="o">=</span> <span class="n">AnnotationDict</span><span class="p">(</span><span class="n">a</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">a</span> <span class="o">==</span> <span class="n">b</span> <span class="o">==</span> <span class="n">c</span> <span class="o">==</span> <span class="n">d</span> <span class="o">==</span> <span class="n">e</span> |
| <span class="go">True</span> |
| </pre></div> |
| </div> |
| <p>By default, non-string, non-symbol and non-ulong keys cause a <code class="docutils literal notranslate"><span class="pre">KeyError</span></code> to be raised:</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">AnnotationDict</span><span class="p">({</span><span class="s1">'one'</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">:</span> <span class="s1">'two'</span><span class="p">})</span> |
| <span class="go"> ...</span> |
| <span class="go">KeyError: "invalid non-symbol key: <type 'int'>: 2"</span> |
| </pre></div> |
| </div> |
| <p>but by setting <code class="docutils literal notranslate"><span class="pre">raise_on_error=False</span></code>, non-string, non-symbol and non-ulong keys will be ignored:</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">AnnotationDict</span><span class="p">({</span><span class="s1">'one'</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">:</span> <span class="s1">'two'</span><span class="p">},</span> <span class="n">raise_on_error</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> |
| <span class="go">AnnotationDict({2: 'two', symbol(u'one'): 1})</span> |
| </pre></div> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>e</strong> (<code class="docutils literal notranslate"><span class="pre">dict</span></code> or <code class="docutils literal notranslate"><span class="pre">list</span></code> of <code class="docutils literal notranslate"><span class="pre">tuple</span></code> or <code class="docutils literal notranslate"><span class="pre">zip</span></code> object) – Initialization for <code class="docutils literal notranslate"><span class="pre">dict</span></code></p></li> |
| <li><p><strong>raise_on_error</strong> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) – If <code class="docutils literal notranslate"><span class="pre">True</span></code>, will raise an <code class="docutils literal notranslate"><span class="pre">KeyError</span></code> if a non-string, non-symbol or |
| non-ulong is encountered as a key in the initialization, or in a subsequent |
| operation which adds such an key. If <code class="docutils literal notranslate"><span class="pre">False</span></code>, non-strings, non-ulongs and non-symbols |
| will be added as keys to the dictionary without an error.</p></li> |
| <li><p><strong>kwargs</strong> – Keyword args for initializing a <code class="docutils literal notranslate"><span class="pre">dict</span></code> of the form key1=val1, key2=val2, …</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="py method"> |
| <dt id="proton.AnnotationDict.clear"> |
| <code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → None. Remove all items from D.<a class="headerlink" href="#proton.AnnotationDict.clear" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.AnnotationDict.copy"> |
| <code class="sig-name descname">copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → a shallow copy of D<a class="headerlink" href="#proton.AnnotationDict.copy" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.AnnotationDict.fromkeys"> |
| <code class="sig-name descname">fromkeys</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">/</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.AnnotationDict.fromkeys" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Create a new dictionary with keys from iterable and values set to value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.AnnotationDict.get"> |
| <code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">default</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">/</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.AnnotationDict.get" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return the value for key if key is in the dictionary, else default.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.AnnotationDict.items"> |
| <code class="sig-name descname">items</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → a set-like object providing a view on D’s items<a class="headerlink" href="#proton.AnnotationDict.items" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.AnnotationDict.keys"> |
| <code class="sig-name descname">keys</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → a set-like object providing a view on D’s keys<a class="headerlink" href="#proton.AnnotationDict.keys" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.AnnotationDict.pop"> |
| <code class="sig-name descname">pop</code><span class="sig-paren">(</span><em class="sig-param">k</em><span class="optional">[</span>, <em class="sig-param">d</em><span class="optional">]</span><span class="sig-paren">)</span> → v, remove specified key and return the corresponding value.<a class="headerlink" href="#proton.AnnotationDict.pop" title="Permalink to this definition">¶</a></dt> |
| <dd><p>If key is not found, default is returned if given, otherwise KeyError is raised</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.AnnotationDict.popitem"> |
| <code class="sig-name descname">popitem</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.AnnotationDict.popitem" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Remove and return a (key, value) pair as a 2-tuple.</p> |
| <p>Pairs are returned in LIFO (last-in, first-out) order. |
| Raises KeyError if the dict is empty.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.AnnotationDict.setdefault"> |
| <code class="sig-name descname">setdefault</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">default</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">/</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.AnnotationDict.setdefault" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Insert key with a value of default if key is not in the dictionary.</p> |
| <p>Return the value for key if key is in the dictionary, else default.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.AnnotationDict.update"> |
| <code class="sig-name descname">update</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">e</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.AnnotationDict.update" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Equivalent to dict.update(), but it was needed to call <code class="xref py py-meth docutils literal notranslate"><span class="pre">__setitem__()</span></code> |
| instead of <code class="docutils literal notranslate"><span class="pre">dict.__setitem__()</span></code>.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.AnnotationDict.values"> |
| <code class="sig-name descname">values</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → an object providing a view on D’s values<a class="headerlink" href="#proton.AnnotationDict.values" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Condition"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Condition</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">description</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">info</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_condition.html#Condition"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Condition" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> |
| <p>An AMQP Condition object. Conditions hold exception information |
| pertaining to the closing of an AMQP endpoint such as a <a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a>, |
| <a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a>, or <a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a>. Conditions also hold similar information |
| pertaining to deliveries that have reached terminal states. |
| Connections, Sessions, Links, and Deliveries may all have local and |
| remote conditions associated with them.</p> |
| <p>The local condition may be modified by the local endpoint to signal |
| a particular condition to the remote peer. The remote condition may |
| be examined by the local endpoint to detect whatever condition the |
| remote peer may be signaling. Although often conditions are used to |
| indicate errors, not all conditions are errors <em>per/se</em>, e.g. |
| conditions may be used to redirect a connection from one host to |
| another.</p> |
| <p>Every condition has a short symbolic name, a longer description, |
| and an additional info map associated with it. The name identifies |
| the formally defined condition, and the map contains additional |
| information relevant to the identified condition.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Variables</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>name</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – The name of the condition.</p></li> |
| <li><p><strong>description</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – A description of the condition.</p></li> |
| <li><p><strong>info</strong> (<a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a>) – A data object that holds the additional information associated |
| with the condition. The data object may be used both to access and to |
| modify the additional information associated with the condition.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Connection"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Connection</code><span class="sig-paren">(</span><em class="sig-param">impl=<function pn_connection></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Connection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Connection" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._wrapper.Wrapper</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._endpoints.Endpoint</span></code></p> |
| <p>A representation of an AMQP connection.</p> |
| <dl class="py attribute"> |
| <dt id="proton.Connection.LOCAL_ACTIVE"> |
| <code class="sig-name descname">LOCAL_ACTIVE</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Connection.LOCAL_ACTIVE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Connection.LOCAL_CLOSED"> |
| <code class="sig-name descname">LOCAL_CLOSED</code><em class="property"> = 4</em><a class="headerlink" href="#proton.Connection.LOCAL_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Connection.LOCAL_UNINIT"> |
| <code class="sig-name descname">LOCAL_UNINIT</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Connection.LOCAL_UNINIT" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Connection.REMOTE_ACTIVE"> |
| <code class="sig-name descname">REMOTE_ACTIVE</code><em class="property"> = 16</em><a class="headerlink" href="#proton.Connection.REMOTE_ACTIVE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Connection.REMOTE_CLOSED"> |
| <code class="sig-name descname">REMOTE_CLOSED</code><em class="property"> = 32</em><a class="headerlink" href="#proton.Connection.REMOTE_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Connection.REMOTE_UNINIT"> |
| <code class="sig-name descname">REMOTE_UNINIT</code><em class="property"> = 8</em><a class="headerlink" href="#proton.Connection.REMOTE_UNINIT" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.close"> |
| <code class="sig-name descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Connection.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Connection.close" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Closes the connection.</p> |
| <p>In more detail, this moves the local state of the connection to |
| the <code class="docutils literal notranslate"><span class="pre">CLOSED</span></code> state and triggers a close frame to be sent to the |
| peer. A connection is fully closed once both peers have closed it.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.connected_address"> |
| <em class="property">property </em><code class="sig-name descname">connected_address</code><a class="headerlink" href="#proton.Connection.connected_address" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The address for this connection.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.connection"> |
| <em class="property">property </em><code class="sig-name descname">connection</code><a class="headerlink" href="#proton.Connection.connection" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get this connection.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.container"> |
| <em class="property">property </em><code class="sig-name descname">container</code><a class="headerlink" href="#proton.Connection.container" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The container name for this connection object.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.desired_capabilities"> |
| <em class="property">property </em><code class="sig-name descname">desired_capabilities</code><a class="headerlink" href="#proton.Connection.desired_capabilities" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Desired capabilities as a list of symbols. The AMQP 1.0 specification |
| restricts this list to symbol elements only. It is possible to use |
| the special <code class="docutils literal notranslate"><span class="pre">list</span></code> subclass <a class="reference internal" href="#proton.SymbolList" title="proton.SymbolList"><code class="xref py py-class docutils literal notranslate"><span class="pre">SymbolList</span></code></a> which will by |
| default enforce this restriction on construction. In addition, if string |
| types are used, this class will be silently convert them into symbols.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">list</span></code> containing <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a>.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.error"> |
| <em class="property">property </em><code class="sig-name descname">error</code><a class="headerlink" href="#proton.Connection.error" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Additional error information associated with the connection.</p> |
| <p>Whenever a connection operation fails (i.e. returns an error code), |
| additional error details can be obtained using this property. The |
| returned value is the error code defined by Proton in <code class="docutils literal notranslate"><span class="pre">pn_error_t</span></code> |
| (see <code class="docutils literal notranslate"><span class="pre">error.h</span></code>).</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.free"> |
| <code class="sig-name descname">free</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Connection.free"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Connection.free" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Releases this connection object.</p> |
| <p>When a connection object is released, all <a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a> and |
| <a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a> objects associated with this connection are also |
| released and all <a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a> objects are settled.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.handler"> |
| <em class="property">property </em><code class="sig-name descname">handler</code><a class="headerlink" href="#proton.Connection.handler" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Handler for events.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Getter</dt> |
| <dd class="field-odd"><p>Get the event handler, or return <code class="docutils literal notranslate"><span class="pre">None</span></code> if no handler has been set.</p> |
| </dd> |
| <dt class="field-even">Setter</dt> |
| <dd class="field-even"><p>Set the event handler.</p> |
| </dd> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">Handler</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.hostname"> |
| <em class="property">property </em><code class="sig-name descname">hostname</code><a class="headerlink" href="#proton.Connection.hostname" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Set the name of the host (either fully qualified or relative) to which this |
| connection is connecting to. This information may be used by the remote |
| peer to determine the correct back-end service to connect the client to. |
| This value will be sent in the Open performative, and will be used by SSL |
| and SASL layers to identify the peer.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.link_head"> |
| <code class="sig-name descname">link_head</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mask</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Connection.link_head"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Connection.link_head" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Retrieve the first link that matches the given state mask.</p> |
| <p>Examines the state of each link owned by the connection and returns |
| the first link that matches the given state mask. If state contains |
| both local and remote flags, then an exact match against those |
| flags is performed. If state contains only local or only remote |
| flags, then a match occurs if any of the local or remote flags are |
| set respectively. <code class="docutils literal notranslate"><span class="pre">state==0</span></code> matches all links.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>mask</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – State mask to match</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>The first link owned by the connection that matches the |
| mask, else <code class="docutils literal notranslate"><span class="pre">None</span></code> if no link matches.</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.offered_capabilities"> |
| <em class="property">property </em><code class="sig-name descname">offered_capabilities</code><a class="headerlink" href="#proton.Connection.offered_capabilities" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Offered capabilities as a list of symbols. The AMQP 1.0 specification |
| restricts this list to symbol elements only. It is possible to use |
| the special <code class="docutils literal notranslate"><span class="pre">list</span></code> subclass <a class="reference internal" href="#proton.SymbolList" title="proton.SymbolList"><code class="xref py py-class docutils literal notranslate"><span class="pre">SymbolList</span></code></a> as it will by |
| default enforce this restriction on construction. In addition, if a |
| string type is used, it will be silently converted into the required |
| symbol.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">list</span></code> containing <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a>.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.open"> |
| <code class="sig-name descname">open</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Connection.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Connection.open" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Opens the connection.</p> |
| <p>In more detail, this moves the local state of the connection to |
| the <code class="docutils literal notranslate"><span class="pre">ACTIVE</span></code> state and triggers an open frame to be sent to the |
| peer. A connection is fully active once both peers have opened it.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.password"> |
| <em class="property">property </em><code class="sig-name descname">password</code><a class="headerlink" href="#proton.Connection.password" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Set the authentication password for a client connection.</p> |
| <p>It is necessary to set the username and password before binding the connection |
| to a transport and it isn’t allowed to change after the binding.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>Getting the password always returns <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.properties"> |
| <em class="property">property </em><code class="sig-name descname">properties</code><a class="headerlink" href="#proton.Connection.properties" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Connection properties as a dictionary of key/values. The AMQP 1.0 |
| specification restricts this dictionary to have keys that are only |
| <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> types. It is possible to use the special <code class="docutils literal notranslate"><span class="pre">dict</span></code> |
| subclass <a class="reference internal" href="#proton.PropertyDict" title="proton.PropertyDict"><code class="xref py py-class docutils literal notranslate"><span class="pre">PropertyDict</span></code></a> which will by default enforce this |
| restrictions on construction. In addition, if strings type are used, |
| this will silently convert them into symbols.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">dict</span></code> containing <code class="xref py py-class docutils literal notranslate"><span class="pre">symbol`</span></code> keys.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.remote_condition"> |
| <em class="property">property </em><code class="sig-name descname">remote_condition</code><a class="headerlink" href="#proton.Connection.remote_condition" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote condition associated with the connection endpoint. |
| See <a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a> for more information.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.remote_container"> |
| <em class="property">property </em><code class="sig-name descname">remote_container</code><a class="headerlink" href="#proton.Connection.remote_container" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The container identifier specified by the remote peer for this connection.</p> |
| <p>This will return <code class="docutils literal notranslate"><span class="pre">None</span></code> until the :const:’REMOTE_ACTIVE` state is |
| reached. See <a class="reference internal" href="#proton.Endpoint" title="proton.Endpoint"><code class="xref py py-class docutils literal notranslate"><span class="pre">Endpoint</span></code></a> for more details on endpoint state.</p> |
| <p>Any (non <code class="docutils literal notranslate"><span class="pre">None</span></code>) name returned by this operation will be valid until |
| the connection object is unbound from a transport or freed, |
| whichever happens sooner.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.remote_desired_capabilities"> |
| <em class="property">property </em><code class="sig-name descname">remote_desired_capabilities</code><a class="headerlink" href="#proton.Connection.remote_desired_capabilities" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The capabilities desired by the remote peer for this connection.</p> |
| <p>This operation will return a <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object that |
| is valid until the connection object is freed. This <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> |
| object will be empty until the remote connection is opened as |
| indicated by the <a class="reference internal" href="#proton.Connection.REMOTE_ACTIVE" title="proton.Connection.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> flag.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.remote_hostname"> |
| <em class="property">property </em><code class="sig-name descname">remote_hostname</code><a class="headerlink" href="#proton.Connection.remote_hostname" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The hostname specified by the remote peer for this connection.</p> |
| <p>This will return <code class="docutils literal notranslate"><span class="pre">None</span></code> until the <a class="reference internal" href="#proton.Connection.REMOTE_ACTIVE" title="proton.Connection.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> state is |
| reached. See <a class="reference internal" href="#proton.Endpoint" title="proton.Endpoint"><code class="xref py py-class docutils literal notranslate"><span class="pre">Endpoint</span></code></a> for more details on endpoint state.</p> |
| <p>Any (non <code class="docutils literal notranslate"><span class="pre">None</span></code>) name returned by this operation will be valid until |
| the connection object is unbound from a transport or freed, |
| whichever happens sooner.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.remote_offered_capabilities"> |
| <em class="property">property </em><code class="sig-name descname">remote_offered_capabilities</code><a class="headerlink" href="#proton.Connection.remote_offered_capabilities" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The capabilities offered by the remote peer for this connection.</p> |
| <p>This operation will return a <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object that |
| is valid until the connection object is freed. This <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> |
| object will be empty until the remote connection is opened as |
| indicated by the <a class="reference internal" href="#proton.Connection.REMOTE_ACTIVE" title="proton.Connection.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> flag.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.remote_properties"> |
| <em class="property">property </em><code class="sig-name descname">remote_properties</code><a class="headerlink" href="#proton.Connection.remote_properties" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The properties specified by the remote peer for this connection.</p> |
| <p>This operation will return a <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object that |
| is valid until the connection object is freed. This <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> |
| object will be empty until the remote connection is opened as |
| indicated by the <a class="reference internal" href="#proton.Connection.REMOTE_ACTIVE" title="proton.Connection.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> flag.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.session"> |
| <code class="sig-name descname">session</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Connection.session"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Connection.session" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a new session on this connection.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>New session</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a></p> |
| </dd> |
| <dt class="field-odd">Raises</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.SessionException" title="proton.SessionException"><code class="xref py py-class docutils literal notranslate"><span class="pre">SessionException</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.session_head"> |
| <code class="sig-name descname">session_head</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mask</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Connection.session_head"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Connection.session_head" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Retrieve the first session from a given connection that matches the |
| specified state mask.</p> |
| <p>Examines the state of each session owned by the connection, and |
| returns the first session that matches the given state mask. If |
| state contains both local and remote flags, then an exact match |
| against those flags is performed. If state contains only local or |
| only remote flags, then a match occurs if any of the local or |
| remote flags are set respectively.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>mask</strong> – State mask to match</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>The first session owned by the connection that matches the |
| mask, else <code class="docutils literal notranslate"><span class="pre">None</span></code> if no sessions matches.</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.state"> |
| <em class="property">property </em><code class="sig-name descname">state</code><a class="headerlink" href="#proton.Connection.state" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The state of the connection as a bit field. The state has a local |
| and a remote component. Each of these can be in one of three |
| states: <code class="docutils literal notranslate"><span class="pre">UNINIT</span></code>, <code class="docutils literal notranslate"><span class="pre">ACTIVE</span></code> or <code class="docutils literal notranslate"><span class="pre">CLOSED</span></code>. These can be tested by masking |
| against <a class="reference internal" href="#proton.Connection.LOCAL_UNINIT" title="proton.Connection.LOCAL_UNINIT"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_UNINIT</span></code></a>, <a class="reference internal" href="#proton.Connection.LOCAL_ACTIVE" title="proton.Connection.LOCAL_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_ACTIVE</span></code></a>, <a class="reference internal" href="#proton.Connection.LOCAL_CLOSED" title="proton.Connection.LOCAL_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_CLOSED</span></code></a>, <a class="reference internal" href="#proton.Connection.REMOTE_UNINIT" title="proton.Connection.REMOTE_UNINIT"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_UNINIT</span></code></a>, |
| <a class="reference internal" href="#proton.Connection.REMOTE_ACTIVE" title="proton.Connection.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> and <a class="reference internal" href="#proton.Connection.REMOTE_CLOSED" title="proton.Connection.REMOTE_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_CLOSED</span></code></a>.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.transport"> |
| <em class="property">property </em><code class="sig-name descname">transport</code><a class="headerlink" href="#proton.Connection.transport" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The transport bound to this connection. If the connection |
| is unbound, then this operation will return <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Transport" title="proton.Transport"><code class="xref py py-class docutils literal notranslate"><span class="pre">Transport</span></code></a> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.user"> |
| <em class="property">property </em><code class="sig-name descname">user</code><a class="headerlink" href="#proton.Connection.user" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The authentication username for a client connection.</p> |
| <p>It is necessary to set the username and password before binding |
| the connection to a transport and it isn’t allowed to change |
| after the binding.</p> |
| <p>If not set then no authentication will be negotiated unless the |
| client sasl layer is explicitly created (this would be for something |
| like Kerberos where the credentials are implicit in the environment, |
| or to explicitly use the <code class="docutils literal notranslate"><span class="pre">ANONYMOUS</span></code> SASL mechanism)</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Connection.work_head"> |
| <em class="property">property </em><code class="sig-name descname">work_head</code><a class="headerlink" href="#proton.Connection.work_head" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Deprecated: use on_message(), on_accepted(), on_rejected(), |
| on_released(), and on_settled() instead.</p> |
| <p>Extracts the first delivery on the connection that has pending |
| operations.</p> |
| <p>Retrieves the first delivery on the Connection that has pending |
| operations. A readable delivery indicates message data is waiting |
| to be read. A writable delivery indicates that message data may be |
| sent. An updated delivery indicates that the delivery’s disposition |
| has changed. A delivery will never be both readable and writable, |
| but it may be both readable and updated or both writable and |
| updated.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The first delivery object that needs to be serviced, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if none.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.ConnectionException"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">ConnectionException</code><a class="reference internal" href="_modules/proton/_exceptions.html#ConnectionException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.ConnectionException" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._exceptions.ProtonException</span></code></p> |
| <p>An exception class raised when exceptions or errors related to a |
| connection arise.</p> |
| <dl class="py method"> |
| <dt id="proton.ConnectionException.with_traceback"> |
| <code class="sig-name descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.ConnectionException.with_traceback" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Exception.with_traceback(tb) – |
| set self.__traceback__ to tb and return self.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Data"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Data</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">capacity</span><span class="o">=</span><span class="default_value">16</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> |
| <p>The <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> class provides an interface for decoding, extracting, |
| creating, and encoding arbitrary AMQP data. A <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object |
| contains a tree of AMQP values. Leaf nodes in this tree correspond |
| to scalars in the AMQP type system such as <a class="reference internal" href="#proton.Data.INT" title="proton.Data.INT"><code class="xref py py-const docutils literal notranslate"><span class="pre">ints</span></code></a> or |
| <a class="reference internal" href="#proton.Data.STRING" title="proton.Data.STRING"><code class="xref py py-const docutils literal notranslate"><span class="pre">strings</span></code></a>. Non-leaf nodes in this tree correspond to |
| compound values in the AMQP type system such as <a class="reference internal" href="#proton.Data.LIST" title="proton.Data.LIST"><code class="xref py py-const docutils literal notranslate"><span class="pre">lists</span></code></a>, |
| <a class="reference internal" href="#proton.Data.MAP" title="proton.Data.MAP"><code class="xref py py-const docutils literal notranslate"><span class="pre">maps</span></code></a>, <a class="reference internal" href="#proton.Data.ARRAY" title="proton.Data.ARRAY"><code class="xref py py-const docutils literal notranslate"><span class="pre">arrays</span></code></a>, or <a class="reference internal" href="#proton.Data.DESCRIBED" title="proton.Data.DESCRIBED"><code class="xref py py-const docutils literal notranslate"><span class="pre">described</span> <span class="pre">values</span></code></a>. |
| The root node of the tree is the <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object itself and can have |
| an arbitrary number of children.</p> |
| <p>A <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object maintains the notion of the current sibling node |
| and a current parent node. Siblings are ordered within their parent. |
| Values are accessed and/or added by using the <a class="reference internal" href="#proton.Data.next" title="proton.Data.next"><code class="xref py py-meth docutils literal notranslate"><span class="pre">next()</span></code></a>, <a class="reference internal" href="#proton.Data.prev" title="proton.Data.prev"><code class="xref py py-meth docutils literal notranslate"><span class="pre">prev()</span></code></a>, |
| <a class="reference internal" href="#proton.Data.enter" title="proton.Data.enter"><code class="xref py py-meth docutils literal notranslate"><span class="pre">enter()</span></code></a>, and <a class="reference internal" href="#proton.Data.exit" title="proton.Data.exit"><code class="xref py py-meth docutils literal notranslate"><span class="pre">exit()</span></code></a> methods to navigate to the desired location in |
| the tree and using the supplied variety of <code class="docutils literal notranslate"><span class="pre">put_*</span></code> / <code class="docutils literal notranslate"><span class="pre">get_*</span></code> methods to |
| access or add a value of the desired type.</p> |
| <p>The <code class="docutils literal notranslate"><span class="pre">put_*</span></code> methods will always add a value <em>after</em> the current node |
| in the tree. If the current node has a next sibling the <code class="docutils literal notranslate"><span class="pre">put_*</span></code> method |
| will overwrite the value on this node. If there is no current node |
| or the current node has no next sibling then one will be added. The |
| <code class="docutils literal notranslate"><span class="pre">put_*</span></code> methods always set the added/modified node to the current |
| node. The <code class="docutils literal notranslate"><span class="pre">get_*</span></code> methods read the value of the current node and do |
| not change which node is current.</p> |
| <p>The following types of scalar values are supported:</p> |
| <blockquote> |
| <div><ul class="simple"> |
| <li><p><a class="reference internal" href="#proton.Data.NULL" title="proton.Data.NULL"><code class="xref py py-const docutils literal notranslate"><span class="pre">NULL</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.BOOL" title="proton.Data.BOOL"><code class="xref py py-const docutils literal notranslate"><span class="pre">BOOL</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.UBYTE" title="proton.Data.UBYTE"><code class="xref py py-const docutils literal notranslate"><span class="pre">UBYTE</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.USHORT" title="proton.Data.USHORT"><code class="xref py py-const docutils literal notranslate"><span class="pre">USHORT</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.SHORT" title="proton.Data.SHORT"><code class="xref py py-const docutils literal notranslate"><span class="pre">SHORT</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.UINT" title="proton.Data.UINT"><code class="xref py py-const docutils literal notranslate"><span class="pre">UINT</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.INT" title="proton.Data.INT"><code class="xref py py-const docutils literal notranslate"><span class="pre">INT</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.ULONG" title="proton.Data.ULONG"><code class="xref py py-const docutils literal notranslate"><span class="pre">ULONG</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.LONG" title="proton.Data.LONG"><code class="xref py py-const docutils literal notranslate"><span class="pre">LONG</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.FLOAT" title="proton.Data.FLOAT"><code class="xref py py-const docutils literal notranslate"><span class="pre">FLOAT</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.DOUBLE" title="proton.Data.DOUBLE"><code class="xref py py-const docutils literal notranslate"><span class="pre">DOUBLE</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.BINARY" title="proton.Data.BINARY"><code class="xref py py-const docutils literal notranslate"><span class="pre">BINARY</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.STRING" title="proton.Data.STRING"><code class="xref py py-const docutils literal notranslate"><span class="pre">STRING</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.SYMBOL" title="proton.Data.SYMBOL"><code class="xref py py-const docutils literal notranslate"><span class="pre">SYMBOL</span></code></a></p></li> |
| </ul> |
| </div></blockquote> |
| <p>The following types of compound values are supported:</p> |
| <blockquote> |
| <div><ul class="simple"> |
| <li><p><a class="reference internal" href="#proton.Data.DESCRIBED" title="proton.Data.DESCRIBED"><code class="xref py py-const docutils literal notranslate"><span class="pre">DESCRIBED</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.ARRAY" title="proton.Data.ARRAY"><code class="xref py py-const docutils literal notranslate"><span class="pre">ARRAY</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.LIST" title="proton.Data.LIST"><code class="xref py py-const docutils literal notranslate"><span class="pre">LIST</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.MAP" title="proton.Data.MAP"><code class="xref py py-const docutils literal notranslate"><span class="pre">MAP</span></code></a></p></li> |
| </ul> |
| </div></blockquote> |
| <dl class="py attribute"> |
| <dt id="proton.Data.ARRAY"> |
| <code class="sig-name descname">ARRAY</code><em class="property"> = 23</em><a class="headerlink" href="#proton.Data.ARRAY" title="Permalink to this definition">¶</a></dt> |
| <dd><p>An array value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.BINARY"> |
| <code class="sig-name descname">BINARY</code><em class="property"> = 19</em><a class="headerlink" href="#proton.Data.BINARY" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A binary string.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.BOOL"> |
| <code class="sig-name descname">BOOL</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Data.BOOL" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A boolean value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.BYTE"> |
| <code class="sig-name descname">BYTE</code><em class="property"> = 4</em><a class="headerlink" href="#proton.Data.BYTE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A signed byte value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.CHAR"> |
| <code class="sig-name descname">CHAR</code><em class="property"> = 9</em><a class="headerlink" href="#proton.Data.CHAR" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A character value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.DECIMAL128"> |
| <code class="sig-name descname">DECIMAL128</code><em class="property"> = 17</em><a class="headerlink" href="#proton.Data.DECIMAL128" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A DECIMAL128 value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.DECIMAL32"> |
| <code class="sig-name descname">DECIMAL32</code><em class="property"> = 15</em><a class="headerlink" href="#proton.Data.DECIMAL32" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A DECIMAL32 value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.DECIMAL64"> |
| <code class="sig-name descname">DECIMAL64</code><em class="property"> = 16</em><a class="headerlink" href="#proton.Data.DECIMAL64" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A DECIMAL64 value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.DESCRIBED"> |
| <code class="sig-name descname">DESCRIBED</code><em class="property"> = 22</em><a class="headerlink" href="#proton.Data.DESCRIBED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A described value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.DOUBLE"> |
| <code class="sig-name descname">DOUBLE</code><em class="property"> = 14</em><a class="headerlink" href="#proton.Data.DOUBLE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A double value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.FLOAT"> |
| <code class="sig-name descname">FLOAT</code><em class="property"> = 13</em><a class="headerlink" href="#proton.Data.FLOAT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A float value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.INT"> |
| <code class="sig-name descname">INT</code><em class="property"> = 8</em><a class="headerlink" href="#proton.Data.INT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A signed int value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.LIST"> |
| <code class="sig-name descname">LIST</code><em class="property"> = 24</em><a class="headerlink" href="#proton.Data.LIST" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A list value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.LONG"> |
| <code class="sig-name descname">LONG</code><em class="property"> = 11</em><a class="headerlink" href="#proton.Data.LONG" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A signed long value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.MAP"> |
| <code class="sig-name descname">MAP</code><em class="property"> = 25</em><a class="headerlink" href="#proton.Data.MAP" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A map value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.NULL"> |
| <code class="sig-name descname">NULL</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Data.NULL" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A null value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.SHORT"> |
| <code class="sig-name descname">SHORT</code><em class="property"> = 6</em><a class="headerlink" href="#proton.Data.SHORT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A short value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.STRING"> |
| <code class="sig-name descname">STRING</code><em class="property"> = 20</em><a class="headerlink" href="#proton.Data.STRING" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A unicode string.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.SYMBOL"> |
| <code class="sig-name descname">SYMBOL</code><em class="property"> = 21</em><a class="headerlink" href="#proton.Data.SYMBOL" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A symbolic string.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.TIMESTAMP"> |
| <code class="sig-name descname">TIMESTAMP</code><em class="property"> = 12</em><a class="headerlink" href="#proton.Data.TIMESTAMP" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A timestamp value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.UBYTE"> |
| <code class="sig-name descname">UBYTE</code><em class="property"> = 3</em><a class="headerlink" href="#proton.Data.UBYTE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>An unsigned byte value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.UINT"> |
| <code class="sig-name descname">UINT</code><em class="property"> = 7</em><a class="headerlink" href="#proton.Data.UINT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>An unsigned int value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.ULONG"> |
| <code class="sig-name descname">ULONG</code><em class="property"> = 10</em><a class="headerlink" href="#proton.Data.ULONG" title="Permalink to this definition">¶</a></dt> |
| <dd><p>An unsigned long value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.USHORT"> |
| <code class="sig-name descname">USHORT</code><em class="property"> = 5</em><a class="headerlink" href="#proton.Data.USHORT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>An unsigned short value.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.UUID"> |
| <code class="sig-name descname">UUID</code><em class="property"> = 18</em><a class="headerlink" href="#proton.Data.UUID" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A UUID value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.clear"> |
| <code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.clear" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Clears the data object.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.copy"> |
| <code class="sig-name descname">copy</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">src</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.copy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.copy" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Copy the contents of another pn_data_t object. Any values in the |
| data object will be lost.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>src</strong> (<a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a>) – The source object from which to copy</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.decode"> |
| <code class="sig-name descname">decode</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">encoded</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.decode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.decode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Decodes the first value from supplied AMQP data and returns the |
| number of bytes consumed.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>encoded</strong> (<em>binary</em>) – AMQP encoded binary data</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.dump"> |
| <code class="sig-name descname">dump</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.dump"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.dump" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Dumps a debug representation of the internal state of this <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> |
| object that includes its navigational state to <code class="docutils literal notranslate"><span class="pre">cout</span></code> (<code class="docutils literal notranslate"><span class="pre">stdout</span></code>) for |
| debugging purposes.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.encode"> |
| <code class="sig-name descname">encode</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.encode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.encode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a representation of the data encoded in AMQP format.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The size of the encoded data</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| <dt class="field-odd">Raise</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.encoded_size"> |
| <code class="sig-name descname">encoded_size</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.encoded_size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.encoded_size" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the size in bytes needed to encode the data in AMQP format.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The size of the encoded data or an error code if data is invalid.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.enter"> |
| <code class="sig-name descname">enter</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.enter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.enter" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the parent node to the current node and clears the current node. |
| Clearing the current node sets it <em>before</em> the first child, |
| call <a class="reference internal" href="#proton.Data.next" title="proton.Data.next"><code class="xref py py-meth docutils literal notranslate"><span class="pre">next()</span></code></a> to advance to the first child.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">True</span></code> iff the pointers to the current/parent nodes are changed, |
| <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.exit"> |
| <code class="sig-name descname">exit</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.exit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.exit" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the current node to the parent node and the parent node to |
| its own parent.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">True</span></code> iff the pointers to the current/parent nodes are changed, |
| <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.format"> |
| <code class="sig-name descname">format</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.format"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.format" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Formats the contents of this <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object in a human readable way.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>A Formatted string containing contents of this <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| <dt class="field-odd">Raise</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_array"> |
| <code class="sig-name descname">get_array</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_array"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_array" title="Permalink to this definition">¶</a></dt> |
| <dd><p>If the current node is an array, return a tuple of the element |
| count, a boolean indicating whether the array is described, and |
| the type of each element, otherwise return <code class="docutils literal notranslate"><span class="pre">None</span></code>. Array |
| data can be accessed by entering the array.</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="c1"># read an array of strings with a symbolic descriptor</span> |
| <span class="gp">>>> </span><span class="n">count</span><span class="p">,</span> <span class="n">described</span><span class="p">,</span> <span class="nb">type</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">get_array</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">enter</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">next</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="nb">print</span> <span class="s2">"Descriptor:"</span><span class="p">,</span> <span class="n">data</span><span class="o">.</span><span class="n">get_symbol</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">count</span><span class="p">):</span> |
| <span class="gp">... </span> <span class="n">data</span><span class="o">.</span><span class="n">next</span><span class="p">()</span> |
| <span class="gp">... </span> <span class="nb">print</span> <span class="s2">"Element:"</span><span class="p">,</span> <span class="n">data</span><span class="o">.</span><span class="n">get_string</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span> |
| </pre></div> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>A tuple containing the number of array elements, the descriptor |
| (or <code class="docutils literal notranslate"><span class="pre">None</span></code> if no descriptor) and the enumerated array element type.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">tuple</span></code> (<code class="docutils literal notranslate"><span class="pre">int</span></code>, <code class="docutils literal notranslate"><span class="pre">str</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>)</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_binary"> |
| <code class="sig-name descname">get_binary</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_binary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_binary" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as <code class="docutils literal notranslate"><span class="pre">bytes</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is binary, its value, <code class="docutils literal notranslate"><span class="pre">""</span></code> otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">bytes</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_bool"> |
| <code class="sig-name descname">get_bool</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_bool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_bool" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <code class="docutils literal notranslate"><span class="pre">bool</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a boolean type, returns its value, |
| <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_byte"> |
| <code class="sig-name descname">get_byte</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_byte"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_byte" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <a class="reference internal" href="#proton.byte" title="proton.byte"><code class="xref py py-class docutils literal notranslate"><span class="pre">byte</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a signed byte, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.byte" title="proton.byte"><code class="xref py py-class docutils literal notranslate"><span class="pre">byte</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_char"> |
| <code class="sig-name descname">get_char</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_char"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_char" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <a class="reference internal" href="#proton.char" title="proton.char"><code class="xref py py-class docutils literal notranslate"><span class="pre">char</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a char, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.char" title="proton.char"><code class="xref py py-class docutils literal notranslate"><span class="pre">char</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_decimal128"> |
| <code class="sig-name descname">get_decimal128</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_decimal128"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_decimal128" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <a class="reference internal" href="#proton.decimal128" title="proton.decimal128"><code class="xref py py-class docutils literal notranslate"><span class="pre">decimal128</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a decimal128, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.decimal128" title="proton.decimal128"><code class="xref py py-class docutils literal notranslate"><span class="pre">decimal128</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_decimal32"> |
| <code class="sig-name descname">get_decimal32</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_decimal32"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_decimal32" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <a class="reference internal" href="#proton.decimal32" title="proton.decimal32"><code class="xref py py-class docutils literal notranslate"><span class="pre">decimal32</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a decimal32, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.decimal32" title="proton.decimal32"><code class="xref py py-class docutils literal notranslate"><span class="pre">decimal32</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_decimal64"> |
| <code class="sig-name descname">get_decimal64</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_decimal64"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_decimal64" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <a class="reference internal" href="#proton.decimal64" title="proton.decimal64"><code class="xref py py-class docutils literal notranslate"><span class="pre">decimal64</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a decimal64, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.decimal64" title="proton.decimal64"><code class="xref py py-class docutils literal notranslate"><span class="pre">decimal64</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_dict"> |
| <code class="sig-name descname">get_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_dict" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method for decoding an AMQP map as a Python <code class="docutils literal notranslate"><span class="pre">dict</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The decoded dictionary.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">dict</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_double"> |
| <code class="sig-name descname">get_double</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_double"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_double" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <code class="docutils literal notranslate"><span class="pre">double</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a double, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">double</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_float"> |
| <code class="sig-name descname">get_float</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_float"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_float" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <a class="reference internal" href="#proton.float32" title="proton.float32"><code class="xref py py-class docutils literal notranslate"><span class="pre">float32</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a float, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.float32" title="proton.float32"><code class="xref py py-class docutils literal notranslate"><span class="pre">float32</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_int"> |
| <code class="sig-name descname">get_int</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_int"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_int" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <a class="reference internal" href="#proton.int32" title="proton.int32"><code class="xref py py-class docutils literal notranslate"><span class="pre">int32</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a signed int, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.int32" title="proton.int32"><code class="xref py py-class docutils literal notranslate"><span class="pre">int32</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_list"> |
| <code class="sig-name descname">get_list</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_list" title="Permalink to this definition">¶</a></dt> |
| <dd><p>If the current node is a list, return the number of elements, |
| otherwise return 0. List elements can be accessed by entering |
| the list.</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">count</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">get_list</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">enter</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">count</span><span class="p">):</span> |
| <span class="gp">... </span> <span class="nb">type</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">next</span><span class="p">()</span> |
| <span class="gp">... </span> <span class="k">if</span> <span class="nb">type</span> <span class="o">==</span> <span class="n">Data</span><span class="o">.</span><span class="n">STRING</span><span class="p">:</span> |
| <span class="gp">... </span> <span class="nb">print</span> <span class="n">data</span><span class="o">.</span><span class="n">get_string</span><span class="p">()</span> |
| <span class="gp">... </span> <span class="k">elif</span> <span class="nb">type</span> <span class="o">==</span> <span class="o">...</span><span class="p">:</span> |
| <span class="gp">... </span> <span class="o">...</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span> |
| </pre></div> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>the number of child elements of a list node</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_long"> |
| <code class="sig-name descname">get_long</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_long"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_long" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <a class="reference internal" href="#proton.ulong" title="proton.ulong"><code class="xref py py-class docutils literal notranslate"><span class="pre">ulong</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is an signed long, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">long</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_map"> |
| <code class="sig-name descname">get_map</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_map"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_map" title="Permalink to this definition">¶</a></dt> |
| <dd><p>If the current node is a map, return the number of child elements, |
| otherwise return 0. Key value pairs can be accessed by entering |
| the map.</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">count</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">get_map</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">enter</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">count</span><span class="o">/</span><span class="mi">2</span><span class="p">):</span> |
| <span class="gp">... </span> <span class="nb">type</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">next</span><span class="p">()</span> |
| <span class="gp">... </span> <span class="k">if</span> <span class="nb">type</span> <span class="o">==</span> <span class="n">Data</span><span class="o">.</span><span class="n">STRING</span><span class="p">:</span> |
| <span class="gp">... </span> <span class="nb">print</span> <span class="n">data</span><span class="o">.</span><span class="n">get_string</span><span class="p">()</span> |
| <span class="gp">... </span> <span class="k">elif</span> <span class="nb">type</span> <span class="o">==</span> <span class="o">...</span><span class="p">:</span> |
| <span class="gp">... </span> <span class="o">...</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span> |
| </pre></div> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>the number of child elements of a map node</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_object"> |
| <code class="sig-name descname">get_object</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_object"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_object" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_py_array"> |
| <code class="sig-name descname">get_py_array</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_py_array"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_py_array" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method for decoding an AMQP array into an |
| <a class="reference internal" href="#proton.Array" title="proton.Array"><code class="xref py py-class docutils literal notranslate"><span class="pre">Array</span></code></a> object. This method encapsulates all the |
| steps described in <a class="reference internal" href="#proton.Data.get_array" title="proton.Data.get_array"><code class="xref py py-func docutils literal notranslate"><span class="pre">get_array()</span></code></a> into a single function.</p> |
| <p>If the current node is an array, return an Array object |
| representing the array and its contents. Otherwise return <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The decoded AMQP array.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.Array" title="proton.Array"><code class="xref py py-class docutils literal notranslate"><span class="pre">Array</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_py_described"> |
| <code class="sig-name descname">get_py_described</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_py_described"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_py_described" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method for decoding an AMQP described value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The decoded AMQP descriptor.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.Described" title="proton.Described"><code class="xref py py-class docutils literal notranslate"><span class="pre">Described</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_sequence"> |
| <code class="sig-name descname">get_sequence</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_sequence"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_sequence" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method for decoding an AMQP list as a Python <code class="docutils literal notranslate"><span class="pre">list</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The decoded list.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">list</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_short"> |
| <code class="sig-name descname">get_short</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_short"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_short" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <a class="reference internal" href="#proton.short" title="proton.short"><code class="xref py py-class docutils literal notranslate"><span class="pre">short</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a signed short, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.short" title="proton.short"><code class="xref py py-class docutils literal notranslate"><span class="pre">short</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_string"> |
| <code class="sig-name descname">get_string</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_string" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as <code class="docutils literal notranslate"><span class="pre">str</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a string, its value, <code class="docutils literal notranslate"><span class="pre">""</span></code> otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_symbol"> |
| <code class="sig-name descname">get_symbol</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_symbol"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_symbol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a symbol, its value, <code class="docutils literal notranslate"><span class="pre">""</span></code> otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_timestamp"> |
| <code class="sig-name descname">get_timestamp</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_timestamp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_timestamp" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <a class="reference internal" href="#proton.timestamp" title="proton.timestamp"><code class="xref py py-class docutils literal notranslate"><span class="pre">timestamp</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a timestamp, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.timestamp" title="proton.timestamp"><code class="xref py py-class docutils literal notranslate"><span class="pre">timestamp</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_ubyte"> |
| <code class="sig-name descname">get_ubyte</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_ubyte"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_ubyte" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <a class="reference internal" href="#proton.ubyte" title="proton.ubyte"><code class="xref py py-class docutils literal notranslate"><span class="pre">ubyte</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is an unsigned byte, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.ubyte" title="proton.ubyte"><code class="xref py py-class docutils literal notranslate"><span class="pre">ubyte</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_uint"> |
| <code class="sig-name descname">get_uint</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_uint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_uint" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <a class="reference internal" href="#proton.uint" title="proton.uint"><code class="xref py py-class docutils literal notranslate"><span class="pre">uint</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is an unsigned int, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.uint" title="proton.uint"><code class="xref py py-class docutils literal notranslate"><span class="pre">uint</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_ulong"> |
| <code class="sig-name descname">get_ulong</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_ulong"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_ulong" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <code class="xref py py-class docutils literal notranslate"><span class="pre">long</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is an unsigned long, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.ulong" title="proton.ulong"><code class="xref py py-class docutils literal notranslate"><span class="pre">ulong</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_ushort"> |
| <code class="sig-name descname">get_ushort</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_ushort"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_ushort" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <a class="reference internal" href="#proton.ushort" title="proton.ushort"><code class="xref py py-class docutils literal notranslate"><span class="pre">ushort</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is an unsigned short, its value, 0 otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.ushort" title="proton.ushort"><code class="xref py py-class docutils literal notranslate"><span class="pre">ushort</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.get_uuid"> |
| <code class="sig-name descname">get_uuid</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.get_uuid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.get_uuid" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the current node value as a <code class="docutils literal notranslate"><span class="pre">uuid.UUID</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>If the current node is a UUID, its value, <code class="docutils literal notranslate"><span class="pre">None</span></code> otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">uuid.UUID</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.is_described"> |
| <code class="sig-name descname">is_described</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.is_described"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.is_described" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Checks if the current node is a described value. The descriptor |
| and value may be accessed by entering the described value.</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="c1"># read a symbolically described string</span> |
| <span class="gp">>>> </span><span class="k">assert</span> <span class="n">data</span><span class="o">.</span><span class="n">is_described</span><span class="p">()</span> <span class="c1"># will error if the current node is not described</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">enter</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">next</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="nb">print</span> <span class="n">data</span><span class="o">.</span><span class="n">get_symbol</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">next</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="nb">print</span> <span class="n">data</span><span class="o">.</span><span class="n">get_string</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span> |
| </pre></div> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if the current node is a described type, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.is_null"> |
| <code class="sig-name descname">is_null</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.is_null"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.is_null" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Checks if the current node is the AMQP null type.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if the current node is the AMQP null type, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.narrow"> |
| <code class="sig-name descname">narrow</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.narrow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.narrow" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Modify this <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object to behave as if the current node is the |
| root node of the tree. This impacts the behavior of <a class="reference internal" href="#proton.Data.rewind" title="proton.Data.rewind"><code class="xref py py-meth docutils literal notranslate"><span class="pre">rewind()</span></code></a>, |
| <a class="reference internal" href="#proton.Data.next" title="proton.Data.next"><code class="xref py py-meth docutils literal notranslate"><span class="pre">next()</span></code></a>, <a class="reference internal" href="#proton.Data.prev" title="proton.Data.prev"><code class="xref py py-meth docutils literal notranslate"><span class="pre">prev()</span></code></a>, and anything else that depends on the |
| navigational state of the <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object. Use <a class="reference internal" href="#proton.Data.widen" title="proton.Data.widen"><code class="xref py py-meth docutils literal notranslate"><span class="pre">widen()</span></code></a> |
| to reverse the effect of this operation.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.next"> |
| <code class="sig-name descname">next</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.next"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.next" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Advances the current node to its next sibling and returns its |
| type. If there is no next sibling the current node remains |
| unchanged and <code class="docutils literal notranslate"><span class="pre">None</span></code> is returned.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>Node type or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">int</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.prev"> |
| <code class="sig-name descname">prev</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.prev"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.prev" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Advances the current node to its previous sibling and returns its |
| type. If there is no previous sibling the current node remains |
| unchanged and <code class="docutils literal notranslate"><span class="pre">None</span></code> is returned.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>Node type or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">int</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_array"> |
| <code class="sig-name descname">put_array</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">described</span></em>, <em class="sig-param"><span class="n">element_type</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_array"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_array" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts an array value. Elements may be filled by entering the array |
| node and putting the element values. The values must all be of the |
| specified array element type. If an array is described then the |
| first child value of the array is the descriptor and may be of any |
| type.</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">Data</span><span class="p">()</span> |
| <span class="go">>>></span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_array</span><span class="p">(</span><span class="kc">False</span><span class="p">,</span> <span class="n">Data</span><span class="o">.</span><span class="n">INT</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">enter</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_int</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_int</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_int</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span> |
| <span class="go">>>></span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_array</span><span class="p">(</span><span class="kc">True</span><span class="p">,</span> <span class="n">Data</span><span class="o">.</span><span class="n">DOUBLE</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">enter</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_symbol</span><span class="p">(</span><span class="s2">"array-descriptor"</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_double</span><span class="p">(</span><span class="mf">1.1</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_double</span><span class="p">(</span><span class="mf">1.2</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_double</span><span class="p">(</span><span class="mf">1.3</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span> |
| </pre></div> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>described</strong> (<em>bool</em>) – specifies whether the array is described</p></li> |
| <li><p><strong>element_type</strong> (<em>int</em>) – the type of the array elements</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_binary"> |
| <code class="sig-name descname">put_binary</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">b</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_binary"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_binary" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a binary value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>b</strong> (<code class="docutils literal notranslate"><span class="pre">bytes</span></code>) – a binary value</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_bool"> |
| <code class="sig-name descname">put_bool</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">b</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_bool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_bool" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a boolean value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>b</strong> (<code class="docutils literal notranslate"><span class="pre">bool</span></code> or <code class="docutils literal notranslate"><span class="pre">int</span></code>) – a boolean value</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_buffer"> |
| <code class="sig-name descname">put_buffer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">buff</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_buffer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_buffer" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Put a Python buffer object as an AMQP binary value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>buff</strong> (<em>Any object supporting the Python buffer interface.</em>) – A Python buffer object (<strong>CHECK THIS</strong>)</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_byte"> |
| <code class="sig-name descname">put_byte</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">b</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_byte"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_byte" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a signed byte value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>b</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>, <a class="reference internal" href="#proton.byte" title="proton.byte"><code class="xref py py-class docutils literal notranslate"><span class="pre">byte</span></code></a>) – an integral value in the range <span class="math notranslate nohighlight">\(-(2^7)\)</span> to <span class="math notranslate nohighlight">\(2^7 - 1\)</span> inclusive.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><ul class="simple"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">AssertionError</span></code> if parameter is out of the range <span class="math notranslate nohighlight">\(-(2^7)\)</span> to <span class="math notranslate nohighlight">\(2^7 - 1\)</span> inclusive.</p></li> |
| <li><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_char"> |
| <code class="sig-name descname">put_char</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">c</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_char"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_char" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a char value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>c</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>, <a class="reference internal" href="#proton.char" title="proton.char"><code class="xref py py-class docutils literal notranslate"><span class="pre">char</span></code></a>) – a single character</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_decimal128"> |
| <code class="sig-name descname">put_decimal128</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">d</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_decimal128"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_decimal128" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a decimal128 value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>d</strong> (<code class="docutils literal notranslate"><span class="pre">bytes</span></code>, <a class="reference internal" href="#proton.decimal128" title="proton.decimal128"><code class="xref py py-class docutils literal notranslate"><span class="pre">decimal128</span></code></a>) – a decimal128 value encoded in a 16-byte binary value.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_decimal32"> |
| <code class="sig-name descname">put_decimal32</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">d</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_decimal32"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_decimal32" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a decimal32 value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>d</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>, <a class="reference internal" href="#proton.decimal32" title="proton.decimal32"><code class="xref py py-class docutils literal notranslate"><span class="pre">decimal32</span></code></a>) – a decimal32 number encoded in an 32-bit integral value.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_decimal64"> |
| <code class="sig-name descname">put_decimal64</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">d</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_decimal64"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_decimal64" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a decimal64 value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>d</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>, <code class="docutils literal notranslate"><span class="pre">long</span></code>, <a class="reference internal" href="#proton.decimal64" title="proton.decimal64"><code class="xref py py-class docutils literal notranslate"><span class="pre">decimal64</span></code></a>) – a decimal64 number encoded in an 32-bit integral value.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_described"> |
| <code class="sig-name descname">put_described</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_described"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_described" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a described value. A described node has two children, the |
| descriptor and the value. These are specified by entering the node |
| and putting the desired values.</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">Data</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_described</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">enter</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_symbol</span><span class="p">(</span><span class="s2">"value-descriptor"</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_string</span><span class="p">(</span><span class="s2">"the value"</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span> |
| </pre></div> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Raise</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_dict"> |
| <code class="sig-name descname">put_dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">d</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_dict" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method for encoding the contents of a Python <code class="docutils literal notranslate"><span class="pre">dict</span></code> |
| as an AMQP map.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>d</strong> (<code class="docutils literal notranslate"><span class="pre">dict</span></code>) – The dictionary to be encoded</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_double"> |
| <code class="sig-name descname">put_double</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">d</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_double"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_double" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a double value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>d</strong> (<code class="docutils literal notranslate"><span class="pre">double</span></code>) – a floating point value.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_float"> |
| <code class="sig-name descname">put_float</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">f</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_float"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_float" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a float value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>f</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>, <a class="reference internal" href="#proton.float32" title="proton.float32"><code class="xref py py-class docutils literal notranslate"><span class="pre">float32</span></code></a>) – a floating point value</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_int"> |
| <code class="sig-name descname">put_int</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">i</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_int"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_int" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a signed int value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>i</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>, <a class="reference internal" href="#proton.int32" title="proton.int32"><code class="xref py py-class docutils literal notranslate"><span class="pre">int32</span></code></a>) – an integral value in the range <span class="math notranslate nohighlight">\(-(2^{31})\)</span> to <span class="math notranslate nohighlight">\(2^{31} - 1\)</span> inclusive.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><ul class="simple"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">AssertionError</span></code> if parameter is out of the range <span class="math notranslate nohighlight">\(-(2^{31})\)</span> to <span class="math notranslate nohighlight">\(2^{31} - 1\)</span> inclusive.</p></li> |
| <li><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_list"> |
| <code class="sig-name descname">put_list</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_list" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a list value. Elements may be filled by entering the list |
| node and putting element values.</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">Data</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_list</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">enter</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_int</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_int</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_int</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span> |
| </pre></div> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Raise</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_long"> |
| <code class="sig-name descname">put_long</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">l</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_long"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_long" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a signed long value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>l</strong> – an integral value in the range <span class="math notranslate nohighlight">\(-(2^{63})\)</span> to <span class="math notranslate nohighlight">\(2^{63} - 1\)</span> inclusive.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><ul class="simple"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">AssertionError</span></code> if parameter is out of the range <span class="math notranslate nohighlight">\(-(2^{63})\)</span> to <span class="math notranslate nohighlight">\(2^{63} - 1\)</span> inclusive.</p></li> |
| <li><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_map"> |
| <code class="sig-name descname">put_map</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_map"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_map" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a map value. Elements may be filled by entering the map node |
| and putting alternating key value pairs.</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">data</span> <span class="o">=</span> <span class="n">Data</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_map</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">enter</span><span class="p">()</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_string</span><span class="p">(</span><span class="s2">"key"</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">put_string</span><span class="p">(</span><span class="s2">"value"</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">data</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span> |
| </pre></div> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Raise</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_memoryview"> |
| <code class="sig-name descname">put_memoryview</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mv</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_memoryview"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_memoryview" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Put a Python memoryview object as an AMQP binary value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>mv</strong> (<code class="docutils literal notranslate"><span class="pre">memoryview</span></code>) – A Python memoryview object</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_null"> |
| <code class="sig-name descname">put_null</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_null"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_null" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a null value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Raise</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_object"> |
| <code class="sig-name descname">put_object</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_object"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_object" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_py_array"> |
| <code class="sig-name descname">put_py_array</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">a</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_py_array"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_py_array" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method for encoding an <a class="reference internal" href="#proton.Array" title="proton.Array"><code class="xref py py-class docutils literal notranslate"><span class="pre">Array</span></code></a> object as |
| an AMQP array. This method encapsulates the steps described in |
| <a class="reference internal" href="#proton.Data.put_array" title="proton.Data.put_array"><code class="xref py py-func docutils literal notranslate"><span class="pre">put_array()</span></code></a> into a single function.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>a</strong> (<a class="reference internal" href="#proton.Array" title="proton.Array"><code class="xref py py-class docutils literal notranslate"><span class="pre">Array</span></code></a>) – The array object to be encoded</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_py_described"> |
| <code class="sig-name descname">put_py_described</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">d</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_py_described"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_py_described" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method for encoding a <a class="reference internal" href="#proton.Described" title="proton.Described"><code class="xref py py-class docutils literal notranslate"><span class="pre">Described</span></code></a> object |
| as an AMQP described value. This method encapsulates all the steps |
| described in <a class="reference internal" href="#proton.Data.put_described" title="proton.Data.put_described"><code class="xref py py-func docutils literal notranslate"><span class="pre">put_described()</span></code></a> into a single method.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>d</strong> (<a class="reference internal" href="#proton.Described" title="proton.Described"><code class="xref py py-class docutils literal notranslate"><span class="pre">Described</span></code></a>) – The descriptor to be encoded</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_sequence"> |
| <code class="sig-name descname">put_sequence</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">s</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_sequence"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_sequence" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method for encoding a Python <code class="docutils literal notranslate"><span class="pre">list</span></code> as an |
| AMQP list.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>s</strong> (<code class="docutils literal notranslate"><span class="pre">list</span></code>) – The sequence to be encoded</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_short"> |
| <code class="sig-name descname">put_short</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">s</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_short"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_short" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a signed short value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>s</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>, <a class="reference internal" href="#proton.short" title="proton.short"><code class="xref py py-class docutils literal notranslate"><span class="pre">short</span></code></a>) – an integral value in the range <span class="math notranslate nohighlight">\(-(2^{15})\)</span> to <span class="math notranslate nohighlight">\(2^{15} - 1\)</span> inclusive.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><ul class="simple"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">AssertionError</span></code> if parameter is out of the range <span class="math notranslate nohighlight">\(-(2^{15})\)</span> to <span class="math notranslate nohighlight">\(2^{15} - 1\)</span> inclusive.</p></li> |
| <li><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_string"> |
| <code class="sig-name descname">put_string</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">s</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_string" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a unicode value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>s</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code> (Python 3.x) or <code class="docutils literal notranslate"><span class="pre">unicode</span></code> (Python 2.x)) – a unicode string</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_symbol"> |
| <code class="sig-name descname">put_symbol</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">s</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_symbol"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_symbol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a symbolic value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>s</strong> (string, <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a>) – the symbol name</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_timestamp"> |
| <code class="sig-name descname">put_timestamp</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">t</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_timestamp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_timestamp" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a timestamp value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>t</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>, <a class="reference internal" href="#proton.timestamp" title="proton.timestamp"><code class="xref py py-class docutils literal notranslate"><span class="pre">timestamp</span></code></a>) – a positive integral value</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><ul class="simple"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">AssertionError</span></code> if parameter is negative.</p></li> |
| <li><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_ubyte"> |
| <code class="sig-name descname">put_ubyte</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ub</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_ubyte"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_ubyte" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts an unsigned byte value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>ub</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>, <a class="reference internal" href="#proton.ubyte" title="proton.ubyte"><code class="xref py py-class docutils literal notranslate"><span class="pre">ubyte</span></code></a>) – an integral value in the range <span class="math notranslate nohighlight">\(0\)</span> to <span class="math notranslate nohighlight">\(2^8 - 1\)</span> inclusive</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><ul class="simple"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">AssertionError</span></code> if parameter is out of the range <span class="math notranslate nohighlight">\(0\)</span> to <span class="math notranslate nohighlight">\(2^8 - 1\)</span> inclusive.</p></li> |
| <li><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_uint"> |
| <code class="sig-name descname">put_uint</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ui</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_uint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_uint" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts an unsigned int value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>ui</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>, <a class="reference internal" href="#proton.uint" title="proton.uint"><code class="xref py py-class docutils literal notranslate"><span class="pre">uint</span></code></a>) – an integral value in the range <span class="math notranslate nohighlight">\(0\)</span> to <span class="math notranslate nohighlight">\(2^{32} - 1\)</span> inclusive.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><ul class="simple"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">AssertionError</span></code> if parameter is out of the range <span class="math notranslate nohighlight">\(0\)</span> to <span class="math notranslate nohighlight">\(2^{32} - 1\)</span> inclusive.</p></li> |
| <li><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_ulong"> |
| <code class="sig-name descname">put_ulong</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ul</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_ulong"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_ulong" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts an unsigned long value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>ul</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>, <code class="docutils literal notranslate"><span class="pre">long</span></code>, <a class="reference internal" href="#proton.ulong" title="proton.ulong"><code class="xref py py-class docutils literal notranslate"><span class="pre">ulong</span></code></a>) – an integral value in the range <span class="math notranslate nohighlight">\(0\)</span> to <span class="math notranslate nohighlight">\(2^{64} - 1\)</span> inclusive.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><ul class="simple"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">AssertionError</span></code> if parameter is out of the range <span class="math notranslate nohighlight">\(0\)</span> to <span class="math notranslate nohighlight">\(2^{64} - 1\)</span> inclusive.</p></li> |
| <li><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_ushort"> |
| <code class="sig-name descname">put_ushort</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">us</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_ushort"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_ushort" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts an unsigned short value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>us</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>, <a class="reference internal" href="#proton.ushort" title="proton.ushort"><code class="xref py py-class docutils literal notranslate"><span class="pre">ushort</span></code></a>) – an integral value in the range <span class="math notranslate nohighlight">\(0\)</span> to <span class="math notranslate nohighlight">\(2^{16} - 1\)</span> inclusive.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><ul class="simple"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">AssertionError</span></code> if parameter is out of the range <span class="math notranslate nohighlight">\(0\)</span> to <span class="math notranslate nohighlight">\(2^{16} - 1\)</span> inclusive.</p></li> |
| <li><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.put_uuid"> |
| <code class="sig-name descname">put_uuid</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">u</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.put_uuid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.put_uuid" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Puts a UUID value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>u</strong> (<code class="docutils literal notranslate"><span class="pre">uuid.UUID</span></code>) – a uuid value.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.DataException" title="proton.DataException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">DataException</span></code></a> if there is a Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.rewind"> |
| <code class="sig-name descname">rewind</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.rewind"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.rewind" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Clears current node and sets the parent to the root node. Clearing the |
| current node sets it _before_ the first node, calling next() will advance to |
| the first node.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.type"> |
| <code class="sig-name descname">type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.type"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.type" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the type of the current node. Returns <cite>None</cite> if there is no |
| current node.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The current node type enumeration.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">int</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.type_name"> |
| <em class="property">classmethod </em><code class="sig-name descname">type_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.type_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.type_name" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return a string name for an AMQP type.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>type</strong> (<em>integer</em>) – Numeric Proton AMQP type (<cite>enum pn_type_t</cite>)</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p>String describing the AMQP type with numeric value <cite>amqptype</cite></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Data.type_names"> |
| <code class="sig-name descname">type_names</code><em class="property"> = {1: 'null', 2: 'bool', 3: 'ubyte', 4: 'byte', 5: 'ushort', 6: 'short', 7: 'uint', 8: 'int', 9: 'char', 10: 'ulong', 11: 'long', 12: 'timestamp', 13: 'float', 14: 'double', 15: 'decimal32', 16: 'decimal64', 17: 'decimal128', 18: 'uuid', 19: 'binary', 20: 'string', 21: 'symbol', 22: 'described', 23: 'array', 24: 'list', 25: 'map'}</em><a class="headerlink" href="#proton.Data.type_names" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A map which uses the enumerated type as a key to get a text name for the type.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Data.widen"> |
| <code class="sig-name descname">widen</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Data.widen"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Data.widen" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Reverse the effect of <a class="reference internal" href="#proton.Data.narrow" title="proton.Data.narrow"><code class="xref py py-meth docutils literal notranslate"><span class="pre">narrow()</span></code></a>.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.DataException"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">DataException</code><a class="reference internal" href="_modules/proton/_exceptions.html#DataException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.DataException" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._exceptions.ProtonException</span></code></p> |
| <p>The DataException class is the root of the Data exception hierarchy. |
| All exceptions raised by the Data class extend this exception.</p> |
| <dl class="py method"> |
| <dt id="proton.DataException.with_traceback"> |
| <code class="sig-name descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.DataException.with_traceback" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Exception.with_traceback(tb) – |
| set self.__traceback__ to tb and return self.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Delivery"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Delivery</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">impl</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_delivery.html#Delivery"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Delivery" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._wrapper.Wrapper</span></code></p> |
| <p>Tracks and/or records the delivery of a message over a link.</p> |
| <dl class="py attribute"> |
| <dt id="proton.Delivery.ACCEPTED"> |
| <code class="sig-name descname">ACCEPTED</code><em class="property"> = ACCEPTED</em><a class="headerlink" href="#proton.Delivery.ACCEPTED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A terminal state indicating that the delivery was successfully |
| processed. Once in this state there will be no further state |
| changes prior to the delivery being settled.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Delivery.MODIFIED"> |
| <code class="sig-name descname">MODIFIED</code><em class="property"> = MODIFIED</em><a class="headerlink" href="#proton.Delivery.MODIFIED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A terminal state indicating that the delivery is being |
| returned to the sender and should be annotated by the |
| sender prior to further delivery attempts. Once in this |
| state there will be no further state changes prior to the |
| delivery being settled.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Delivery.RECEIVED"> |
| <code class="sig-name descname">RECEIVED</code><em class="property"> = RECEIVED</em><a class="headerlink" href="#proton.Delivery.RECEIVED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A non terminal state indicating how much (if any) message data |
| has been received for a delivery.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Delivery.REJECTED"> |
| <code class="sig-name descname">REJECTED</code><em class="property"> = REJECTED</em><a class="headerlink" href="#proton.Delivery.REJECTED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A terminal state indicating that the delivery could not be |
| processed due to some error condition. Once in this state |
| there will be no further state changes prior to the delivery |
| being settled.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Delivery.RELEASED"> |
| <code class="sig-name descname">RELEASED</code><em class="property"> = RELEASED</em><a class="headerlink" href="#proton.Delivery.RELEASED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A terminal state indicating that the delivery is being |
| returned to the sender. Once in this state there will be no |
| further state changes prior to the delivery being settled.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.abort"> |
| <code class="sig-name descname">abort</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_delivery.html#Delivery.abort"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Delivery.abort" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Aborts the delivery. This indicates the application wishes to |
| invalidate any data that may have already been sent on this delivery. |
| The delivery cannot be aborted after it has been completely delivered.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.aborted"> |
| <em class="property">property </em><code class="sig-name descname">aborted</code><a class="headerlink" href="#proton.Delivery.aborted" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if the delivery has been aborted, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.connection"> |
| <em class="property">property </em><code class="sig-name descname">connection</code><a class="headerlink" href="#proton.Delivery.connection" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The <a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a> over which the delivery was sent or received.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.link"> |
| <em class="property">property </em><code class="sig-name descname">link</code><a class="headerlink" href="#proton.Delivery.link" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The <a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a> on which the delivery was sent or received.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.local_state"> |
| <em class="property">property </em><code class="sig-name descname">local_state</code><a class="headerlink" href="#proton.Delivery.local_state" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A string representation of the local state of the delivery.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.partial"> |
| <em class="property">property </em><code class="sig-name descname">partial</code><a class="headerlink" href="#proton.Delivery.partial" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> for an incoming delivery if not all the data is |
| yet available, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.pending"> |
| <em class="property">property </em><code class="sig-name descname">pending</code><a class="headerlink" href="#proton.Delivery.pending" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The amount of pending message data for a delivery.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.readable"> |
| <em class="property">property </em><code class="sig-name descname">readable</code><a class="headerlink" href="#proton.Delivery.readable" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> for an incoming delivery that has data to read, |
| <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise..</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.remote_state"> |
| <em class="property">property </em><code class="sig-name descname">remote_state</code><a class="headerlink" href="#proton.Delivery.remote_state" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A string representation of the state of the delivery as |
| indicated by the remote peer.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.session"> |
| <em class="property">property </em><code class="sig-name descname">session</code><a class="headerlink" href="#proton.Delivery.session" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The <a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a> over which the delivery was sent or received.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.settle"> |
| <code class="sig-name descname">settle</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_delivery.html#Delivery.settle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Delivery.settle" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Settles the delivery locally. This indicates the application |
| considers the delivery complete and does not wish to receive any |
| further events about it. Every delivery should be settled locally.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.settled"> |
| <em class="property">property </em><code class="sig-name descname">settled</code><a class="headerlink" href="#proton.Delivery.settled" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if the delivery has been settled by the remote peer, |
| <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.tag"> |
| <em class="property">property </em><code class="sig-name descname">tag</code><a class="headerlink" href="#proton.Delivery.tag" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The identifier for the delivery.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bytes</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.transport"> |
| <em class="property">property </em><code class="sig-name descname">transport</code><a class="headerlink" href="#proton.Delivery.transport" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The <a class="reference internal" href="#proton.Transport" title="proton.Transport"><code class="xref py py-class docutils literal notranslate"><span class="pre">Transport</span></code></a> bound to the <a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a> over which |
| the delivery was sent or received.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Transport" title="proton.Transport"><code class="xref py py-class docutils literal notranslate"><span class="pre">Transport</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.update"> |
| <code class="sig-name descname">update</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">state</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_delivery.html#Delivery.update"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Delivery.update" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Set the local state of the delivery e.g. <a class="reference internal" href="#proton.Delivery.ACCEPTED" title="proton.Delivery.ACCEPTED"><code class="xref py py-const docutils literal notranslate"><span class="pre">ACCEPTED</span></code></a>, |
| <a class="reference internal" href="#proton.Delivery.REJECTED" title="proton.Delivery.REJECTED"><code class="xref py py-const docutils literal notranslate"><span class="pre">REJECTED</span></code></a>, <a class="reference internal" href="#proton.Delivery.RELEASED" title="proton.Delivery.RELEASED"><code class="xref py py-const docutils literal notranslate"><span class="pre">RELEASED</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>state</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – State of delivery</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.updated"> |
| <em class="property">property </em><code class="sig-name descname">updated</code><a class="headerlink" href="#proton.Delivery.updated" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if the state of the delivery has been updated |
| (e.g. it has been settled and/or accepted, rejected etc), |
| <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.work_next"> |
| <em class="property">property </em><code class="sig-name descname">work_next</code><a class="headerlink" href="#proton.Delivery.work_next" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Deprecated: use on_message(), on_accepted(), on_rejected(), |
| on_released(), and on_settled() instead.</p> |
| <p>The next <a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a> on the connection that has pending |
| operations.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Delivery.writable"> |
| <em class="property">property </em><code class="sig-name descname">writable</code><a class="headerlink" href="#proton.Delivery.writable" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> for an outgoing delivery to which data can now be written, |
| <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise..</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Disposition"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Disposition</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">impl</span></em>, <em class="sig-param"><span class="n">local</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_delivery.html#Disposition"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Disposition" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> |
| <p>A delivery state.</p> |
| <p>Dispositions record the current state or final outcome of a |
| transfer. Every delivery contains both a local and remote |
| disposition. The local disposition holds the local state of the |
| delivery, and the remote disposition holds the last known remote |
| state of the delivery.</p> |
| <dl class="py attribute"> |
| <dt id="proton.Disposition.ACCEPTED"> |
| <code class="sig-name descname">ACCEPTED</code><em class="property"> = ACCEPTED</em><a class="headerlink" href="#proton.Disposition.ACCEPTED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A terminal state indicating that the delivery was successfully |
| processed. Once in this state there will be no further state |
| changes prior to the delivery being settled.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Disposition.MODIFIED"> |
| <code class="sig-name descname">MODIFIED</code><em class="property"> = MODIFIED</em><a class="headerlink" href="#proton.Disposition.MODIFIED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A terminal state indicating that the delivery is being |
| returned to the sender and should be annotated by the |
| sender prior to further delivery attempts. Once in this |
| state there will be no further state changes prior to the |
| delivery being settled.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Disposition.RECEIVED"> |
| <code class="sig-name descname">RECEIVED</code><em class="property"> = RECEIVED</em><a class="headerlink" href="#proton.Disposition.RECEIVED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A non terminal state indicating how much (if any) message data |
| has been received for a delivery.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Disposition.REJECTED"> |
| <code class="sig-name descname">REJECTED</code><em class="property"> = REJECTED</em><a class="headerlink" href="#proton.Disposition.REJECTED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A terminal state indicating that the delivery could not be |
| processed due to some error condition. Once in this state |
| there will be no further state changes prior to the delivery |
| being settled.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Disposition.RELEASED"> |
| <code class="sig-name descname">RELEASED</code><em class="property"> = RELEASED</em><a class="headerlink" href="#proton.Disposition.RELEASED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A terminal state indicating that the delivery is being |
| returned to the sender. Once in this state there will be no |
| further state changes prior to the delivery being settled.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Disposition.annotations"> |
| <em class="property">property </em><code class="sig-name descname">annotations</code><a class="headerlink" href="#proton.Disposition.annotations" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The annotations associated with a disposition.</p> |
| <p>The <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object retrieved by this operation may be modified |
| prior to updating a delivery. When a delivery is updated, the |
| annotations described by the <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> are reported to the peer |
| if applicable to the current delivery state, e.g. states such as |
| <a class="reference internal" href="#proton.Disposition.MODIFIED" title="proton.Disposition.MODIFIED"><code class="xref py py-const docutils literal notranslate"><span class="pre">MODIFIED</span></code></a>. The <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> must be empty or contain a symbol |
| keyed map.</p> |
| <p>The <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object returned by this operation is valid until |
| the parent delivery is settled.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Disposition.condition"> |
| <em class="property">property </em><code class="sig-name descname">condition</code><a class="headerlink" href="#proton.Disposition.condition" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The condition object associated with a disposition.</p> |
| <p>The <a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a> object retrieved by this operation may be |
| modified prior to updating a delivery. When a delivery is updated, |
| the condition described by the disposition is reported to the peer |
| if applicable to the current delivery state, e.g. states such as |
| <a class="reference internal" href="#proton.Disposition.REJECTED" title="proton.Disposition.REJECTED"><code class="xref py py-const docutils literal notranslate"><span class="pre">REJECTED</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Disposition.data"> |
| <em class="property">property </em><code class="sig-name descname">data</code><a class="headerlink" href="#proton.Disposition.data" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Access the disposition as a <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object.</p> |
| <p>Dispositions are an extension point in the AMQP protocol. The |
| disposition interface provides setters/getters for those |
| dispositions that are predefined by the specification, however |
| access to the raw disposition data is provided so that other |
| dispositions can be used.</p> |
| <p>The <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object returned by this operation is valid until |
| the parent delivery is settled.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Disposition.failed"> |
| <em class="property">property </em><code class="sig-name descname">failed</code><a class="headerlink" href="#proton.Disposition.failed" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The failed flag for this disposition.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Disposition.section_number"> |
| <em class="property">property </em><code class="sig-name descname">section_number</code><a class="headerlink" href="#proton.Disposition.section_number" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The section number associated with a disposition.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Disposition.section_offset"> |
| <em class="property">property </em><code class="sig-name descname">section_offset</code><a class="headerlink" href="#proton.Disposition.section_offset" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The section offset associated with a disposition.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Disposition.type"> |
| <em class="property">property </em><code class="sig-name descname">type</code><a class="headerlink" href="#proton.Disposition.type" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the type of this disposition object.</p> |
| <p>Defined values are:</p> |
| <ul class="simple"> |
| <li><p><a class="reference internal" href="#proton.Disposition.RECEIVED" title="proton.Disposition.RECEIVED"><code class="xref py py-const docutils literal notranslate"><span class="pre">RECEIVED</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Disposition.ACCEPTED" title="proton.Disposition.ACCEPTED"><code class="xref py py-const docutils literal notranslate"><span class="pre">ACCEPTED</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Disposition.REJECTED" title="proton.Disposition.REJECTED"><code class="xref py py-const docutils literal notranslate"><span class="pre">REJECTED</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Disposition.RELEASED" title="proton.Disposition.RELEASED"><code class="xref py py-const docutils literal notranslate"><span class="pre">RELEASED</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.Disposition.MODIFIED" title="proton.Disposition.MODIFIED"><code class="xref py py-const docutils literal notranslate"><span class="pre">MODIFIED</span></code></a></p></li> |
| </ul> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Disposition.undeliverable"> |
| <em class="property">property </em><code class="sig-name descname">undeliverable</code><a class="headerlink" href="#proton.Disposition.undeliverable" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The undeliverable flag for this disposition.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Described"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Described</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">descriptor</span></em>, <em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Described"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Described" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> |
| <p>A described AMQP type.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Variables</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>descriptor</strong> (<a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a>) – A symbol describing the value.</p></li> |
| <li><p><strong>value</strong> (<em>Any AMQP value</em>) – The described value</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Endpoint"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Endpoint</code><a class="reference internal" href="_modules/proton/_endpoints.html#Endpoint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Endpoint" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> |
| <p>Abstract class from which <a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a>, <a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a> |
| and <a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a> are derived, and which defines the state |
| of these classes.</p> |
| <p>The <a class="reference internal" href="#proton.Endpoint" title="proton.Endpoint"><code class="xref py py-class docutils literal notranslate"><span class="pre">Endpoint</span></code></a> state is an integral value with flags that |
| encode both the local and remote state of an AMQP Endpoint |
| (<a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a>, <a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a>, or <a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a>). |
| The individual bits may be accessed using <a class="reference internal" href="#proton.Endpoint.LOCAL_UNINIT" title="proton.Endpoint.LOCAL_UNINIT"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_UNINIT</span></code></a>, |
| <a class="reference internal" href="#proton.Endpoint.LOCAL_ACTIVE" title="proton.Endpoint.LOCAL_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_ACTIVE</span></code></a>, <a class="reference internal" href="#proton.Endpoint.LOCAL_CLOSED" title="proton.Endpoint.LOCAL_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_CLOSED</span></code></a>, and |
| <a class="reference internal" href="#proton.Endpoint.REMOTE_UNINIT" title="proton.Endpoint.REMOTE_UNINIT"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_UNINIT</span></code></a>, <a class="reference internal" href="#proton.Endpoint.REMOTE_ACTIVE" title="proton.Endpoint.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a>, <a class="reference internal" href="#proton.Endpoint.REMOTE_CLOSED" title="proton.Endpoint.REMOTE_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_CLOSED</span></code></a>.</p> |
| <p>Every AMQP endpoint (<a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a>, <a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a>, or |
| <a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a>) starts out in an uninitialized state and then |
| proceeds linearly to an active and then closed state. This |
| lifecycle occurs at both endpoints involved, and so the state |
| model for an endpoint includes not only the known local state, |
| but also the last known state of the remote endpoint.</p> |
| <dl class="py attribute"> |
| <dt id="proton.Endpoint.LOCAL_ACTIVE"> |
| <code class="sig-name descname">LOCAL_ACTIVE</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Endpoint.LOCAL_ACTIVE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local endpoint state is closed.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Endpoint.LOCAL_CLOSED"> |
| <code class="sig-name descname">LOCAL_CLOSED</code><em class="property"> = 4</em><a class="headerlink" href="#proton.Endpoint.LOCAL_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote endpoint state is active.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Endpoint.LOCAL_UNINIT"> |
| <code class="sig-name descname">LOCAL_UNINIT</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Endpoint.LOCAL_UNINIT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local endpoint state is uninitialized.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Endpoint.REMOTE_ACTIVE"> |
| <code class="sig-name descname">REMOTE_ACTIVE</code><em class="property"> = 16</em><a class="headerlink" href="#proton.Endpoint.REMOTE_ACTIVE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote endpoint state is uninitialized.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Endpoint.REMOTE_CLOSED"> |
| <code class="sig-name descname">REMOTE_CLOSED</code><em class="property"> = 32</em><a class="headerlink" href="#proton.Endpoint.REMOTE_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote endpoint state is closed.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Endpoint.REMOTE_UNINIT"> |
| <code class="sig-name descname">REMOTE_UNINIT</code><em class="property"> = 8</em><a class="headerlink" href="#proton.Endpoint.REMOTE_UNINIT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local endpoint state is active.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Endpoint.handler"> |
| <em class="property">property </em><code class="sig-name descname">handler</code><a class="headerlink" href="#proton.Endpoint.handler" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Handler for events.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Getter</dt> |
| <dd class="field-odd"><p>Get the event handler, or return <code class="docutils literal notranslate"><span class="pre">None</span></code> if no handler has been set.</p> |
| </dd> |
| <dt class="field-even">Setter</dt> |
| <dd class="field-even"><p>Set the event handler.</p> |
| </dd> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">Handler</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Endpoint.remote_condition"> |
| <em class="property">property </em><code class="sig-name descname">remote_condition</code><a class="headerlink" href="#proton.Endpoint.remote_condition" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote condition associated with the connection endpoint. |
| See <a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a> for more information.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Event"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Event</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">impl</span></em>, <em class="sig-param"><span class="n">number</span></em>, <em class="sig-param"><span class="n">clsname</span></em>, <em class="sig-param"><span class="n">context</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_events.html#Event"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Event" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._events.EventBase</span></code></p> |
| <p>Notification of a state change in the protocol engine.</p> |
| <dl class="py attribute"> |
| <dt id="proton.Event.CONNECTION_BOUND"> |
| <code class="sig-name descname">CONNECTION_BOUND</code><em class="property"> = EventType(name=PN_CONNECTION_BOUND, number=6)</em><a class="headerlink" href="#proton.Event.CONNECTION_BOUND" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The connection has been bound to a transport. This event is |
| issued when the <a class="reference internal" href="#proton.Transport.bind" title="proton.Transport.bind"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Transport.bind()</span></code></a> operation is invoked.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.CONNECTION_FINAL"> |
| <code class="sig-name descname">CONNECTION_FINAL</code><em class="property"> = EventType(name=PN_CONNECTION_FINAL, number=12)</em><a class="headerlink" href="#proton.Event.CONNECTION_FINAL" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The connection has been freed and any outstanding processing has |
| been completed. This is the final event that will ever be issued |
| for a connection.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.CONNECTION_INIT"> |
| <code class="sig-name descname">CONNECTION_INIT</code><em class="property"> = EventType(name=PN_CONNECTION_INIT, number=5)</em><a class="headerlink" href="#proton.Event.CONNECTION_INIT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The connection has been created. This is the first event that |
| will ever be issued for a connection. Events of this type point |
| to the relevant connection.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.CONNECTION_LOCAL_CLOSE"> |
| <code class="sig-name descname">CONNECTION_LOCAL_CLOSE</code><em class="property"> = EventType(name=PN_CONNECTION_LOCAL_CLOSE, number=10)</em><a class="headerlink" href="#proton.Event.CONNECTION_LOCAL_CLOSE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local connection endpoint has been closed. Events of this |
| type point to the relevant connection.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.CONNECTION_LOCAL_OPEN"> |
| <code class="sig-name descname">CONNECTION_LOCAL_OPEN</code><em class="property"> = EventType(name=PN_CONNECTION_LOCAL_OPEN, number=8)</em><a class="headerlink" href="#proton.Event.CONNECTION_LOCAL_OPEN" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local connection endpoint has been closed. Events of this |
| type point to the relevant connection.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.CONNECTION_REMOTE_CLOSE"> |
| <code class="sig-name descname">CONNECTION_REMOTE_CLOSE</code><em class="property"> = EventType(name=PN_CONNECTION_REMOTE_CLOSE, number=11)</em><a class="headerlink" href="#proton.Event.CONNECTION_REMOTE_CLOSE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote endpoint has closed the connection. Events of this |
| type point to the relevant connection.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.CONNECTION_REMOTE_OPEN"> |
| <code class="sig-name descname">CONNECTION_REMOTE_OPEN</code><em class="property"> = EventType(name=PN_CONNECTION_REMOTE_OPEN, number=9)</em><a class="headerlink" href="#proton.Event.CONNECTION_REMOTE_OPEN" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote endpoint has opened the connection. Events of this |
| type point to the relevant connection.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.CONNECTION_UNBOUND"> |
| <code class="sig-name descname">CONNECTION_UNBOUND</code><em class="property"> = EventType(name=PN_CONNECTION_UNBOUND, number=7)</em><a class="headerlink" href="#proton.Event.CONNECTION_UNBOUND" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The connection has been unbound from its transport. This event is |
| issued when the <a class="reference internal" href="#proton.Transport.unbind" title="proton.Transport.unbind"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Transport.unbind()</span></code></a> operation is invoked.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.DELIVERY"> |
| <code class="sig-name descname">DELIVERY</code><em class="property"> = EventType(name=PN_DELIVERY, number=28)</em><a class="headerlink" href="#proton.Event.DELIVERY" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A delivery has been created or updated. Events of this type point |
| to the relevant delivery.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.LINK_FINAL"> |
| <code class="sig-name descname">LINK_FINAL</code><em class="property"> = EventType(name=PN_LINK_FINAL, number=27)</em><a class="headerlink" href="#proton.Event.LINK_FINAL" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The link has been freed and any outstanding processing has been |
| completed. This is the final event that will ever be issued for a |
| link. Events of this type point to the relevant link.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.LINK_FLOW"> |
| <code class="sig-name descname">LINK_FLOW</code><em class="property"> = EventType(name=PN_LINK_FLOW, number=26)</em><a class="headerlink" href="#proton.Event.LINK_FLOW" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The flow control state for a link has changed. Events of this |
| type point to the relevant link.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.LINK_INIT"> |
| <code class="sig-name descname">LINK_INIT</code><em class="property"> = EventType(name=PN_LINK_INIT, number=19)</em><a class="headerlink" href="#proton.Event.LINK_INIT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The link has been created. This is the first event that will ever |
| be issued for a link.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.LINK_LOCAL_CLOSE"> |
| <code class="sig-name descname">LINK_LOCAL_CLOSE</code><em class="property"> = EventType(name=PN_LINK_LOCAL_CLOSE, number=22)</em><a class="headerlink" href="#proton.Event.LINK_LOCAL_CLOSE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local link endpoint has been closed. Events of this type |
| point to the relevant link.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.LINK_LOCAL_DETACH"> |
| <code class="sig-name descname">LINK_LOCAL_DETACH</code><em class="property"> = EventType(name=PN_LINK_LOCAL_DETACH, number=24)</em><a class="headerlink" href="#proton.Event.LINK_LOCAL_DETACH" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local link endpoint has been detached. Events of this type |
| point to the relevant link.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.LINK_LOCAL_OPEN"> |
| <code class="sig-name descname">LINK_LOCAL_OPEN</code><em class="property"> = EventType(name=PN_LINK_LOCAL_OPEN, number=20)</em><a class="headerlink" href="#proton.Event.LINK_LOCAL_OPEN" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local link endpoint has been opened. Events of this type |
| point ot the relevant link.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.LINK_REMOTE_CLOSE"> |
| <code class="sig-name descname">LINK_REMOTE_CLOSE</code><em class="property"> = EventType(name=PN_LINK_REMOTE_CLOSE, number=23)</em><a class="headerlink" href="#proton.Event.LINK_REMOTE_CLOSE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote endpoint has closed the link. Events of this type |
| point to the relevant link.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.LINK_REMOTE_DETACH"> |
| <code class="sig-name descname">LINK_REMOTE_DETACH</code><em class="property"> = EventType(name=PN_LINK_REMOTE_DETACH, number=25)</em><a class="headerlink" href="#proton.Event.LINK_REMOTE_DETACH" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote endpoint has detached the link. Events of this type |
| point to the relevant link.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.LINK_REMOTE_OPEN"> |
| <code class="sig-name descname">LINK_REMOTE_OPEN</code><em class="property"> = EventType(name=PN_LINK_REMOTE_OPEN, number=21)</em><a class="headerlink" href="#proton.Event.LINK_REMOTE_OPEN" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote endpoint has opened the link. Events of this type |
| point to the relevant link.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.REACTOR_FINAL"> |
| <code class="sig-name descname">REACTOR_FINAL</code><em class="property"> = EventType(name=reactor_final, number=10002)</em><a class="headerlink" href="#proton.Event.REACTOR_FINAL" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A reactor has been stopped. Events of this type point to the |
| reactor.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.REACTOR_INIT"> |
| <code class="sig-name descname">REACTOR_INIT</code><em class="property"> = EventType(name=reactor_init, number=10000)</em><a class="headerlink" href="#proton.Event.REACTOR_INIT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A reactor has been started. Events of this type point to the |
| reactor.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.REACTOR_QUIESCED"> |
| <code class="sig-name descname">REACTOR_QUIESCED</code><em class="property"> = EventType(name=reactor_quiesced, number=10001)</em><a class="headerlink" href="#proton.Event.REACTOR_QUIESCED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A reactor has no more events to process. Events of this type |
| point to the reactor.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.SELECTABLE_ERROR"> |
| <code class="sig-name descname">SELECTABLE_ERROR</code><em class="property"> = EventType(name=selectable_error, number=10008)</em><a class="headerlink" href="#proton.Event.SELECTABLE_ERROR" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.SELECTABLE_EXPIRED"> |
| <code class="sig-name descname">SELECTABLE_EXPIRED</code><em class="property"> = EventType(name=selectable_expired, number=10007)</em><a class="headerlink" href="#proton.Event.SELECTABLE_EXPIRED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.SELECTABLE_FINAL"> |
| <code class="sig-name descname">SELECTABLE_FINAL</code><em class="property"> = EventType(name=selectable_final, number=10009)</em><a class="headerlink" href="#proton.Event.SELECTABLE_FINAL" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.SELECTABLE_INIT"> |
| <code class="sig-name descname">SELECTABLE_INIT</code><em class="property"> = EventType(name=selectable_init, number=10003)</em><a class="headerlink" href="#proton.Event.SELECTABLE_INIT" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.SELECTABLE_READABLE"> |
| <code class="sig-name descname">SELECTABLE_READABLE</code><em class="property"> = EventType(name=selectable_readable, number=10005)</em><a class="headerlink" href="#proton.Event.SELECTABLE_READABLE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.SELECTABLE_UPDATED"> |
| <code class="sig-name descname">SELECTABLE_UPDATED</code><em class="property"> = EventType(name=selectable_updated, number=10004)</em><a class="headerlink" href="#proton.Event.SELECTABLE_UPDATED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.SELECTABLE_WRITABLE"> |
| <code class="sig-name descname">SELECTABLE_WRITABLE</code><em class="property"> = EventType(name=selectable_writable, number=10006)</em><a class="headerlink" href="#proton.Event.SELECTABLE_WRITABLE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.SESSION_FINAL"> |
| <code class="sig-name descname">SESSION_FINAL</code><em class="property"> = EventType(name=PN_SESSION_FINAL, number=18)</em><a class="headerlink" href="#proton.Event.SESSION_FINAL" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The session has been freed and any outstanding processing has |
| been completed. This is the final event that will ever be issued |
| for a session.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.SESSION_INIT"> |
| <code class="sig-name descname">SESSION_INIT</code><em class="property"> = EventType(name=PN_SESSION_INIT, number=13)</em><a class="headerlink" href="#proton.Event.SESSION_INIT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The session has been created. This is the first event that will |
| ever be issued for a session.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.SESSION_LOCAL_CLOSE"> |
| <code class="sig-name descname">SESSION_LOCAL_CLOSE</code><em class="property"> = EventType(name=PN_SESSION_LOCAL_CLOSE, number=16)</em><a class="headerlink" href="#proton.Event.SESSION_LOCAL_CLOSE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local session endpoint has been closed. Events of this type |
| point ot the relevant session.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.SESSION_LOCAL_OPEN"> |
| <code class="sig-name descname">SESSION_LOCAL_OPEN</code><em class="property"> = EventType(name=PN_SESSION_LOCAL_OPEN, number=14)</em><a class="headerlink" href="#proton.Event.SESSION_LOCAL_OPEN" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local session endpoint has been opened. Events of this type |
| point to the relevant session.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.SESSION_REMOTE_CLOSE"> |
| <code class="sig-name descname">SESSION_REMOTE_CLOSE</code><em class="property"> = EventType(name=PN_SESSION_REMOTE_CLOSE, number=17)</em><a class="headerlink" href="#proton.Event.SESSION_REMOTE_CLOSE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote endpoint has closed the session. Events of this type |
| point to the relevant session.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.SESSION_REMOTE_OPEN"> |
| <code class="sig-name descname">SESSION_REMOTE_OPEN</code><em class="property"> = EventType(name=PN_SESSION_REMOTE_OPEN, number=15)</em><a class="headerlink" href="#proton.Event.SESSION_REMOTE_OPEN" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote endpoint has opened the session. Events of this type |
| point to the relevant session.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.TIMER_TASK"> |
| <code class="sig-name descname">TIMER_TASK</code><em class="property"> = EventType(name=PN_TIMER_TASK, number=4)</em><a class="headerlink" href="#proton.Event.TIMER_TASK" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A timer event has occurred.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.TRANSPORT"> |
| <code class="sig-name descname">TRANSPORT</code><em class="property"> = EventType(name=PN_TRANSPORT, number=29)</em><a class="headerlink" href="#proton.Event.TRANSPORT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The transport has new data to read and/or write. Events of this |
| type point to the relevant transport.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.TRANSPORT_CLOSED"> |
| <code class="sig-name descname">TRANSPORT_CLOSED</code><em class="property"> = EventType(name=PN_TRANSPORT_CLOSED, number=34)</em><a class="headerlink" href="#proton.Event.TRANSPORT_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Indicates that the both the “head” and “tail” of the transport are |
| closed. Events of this type point to the relevant transport.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.TRANSPORT_ERROR"> |
| <code class="sig-name descname">TRANSPORT_ERROR</code><em class="property"> = EventType(name=PN_TRANSPORT_ERROR, number=31)</em><a class="headerlink" href="#proton.Event.TRANSPORT_ERROR" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Indicates that a transport error has occurred. Use <a class="reference internal" href="#proton.Transport.condition" title="proton.Transport.condition"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Transport.condition</span></code></a> |
| to access the details of the error from the associated transport.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.TRANSPORT_HEAD_CLOSED"> |
| <code class="sig-name descname">TRANSPORT_HEAD_CLOSED</code><em class="property"> = EventType(name=PN_TRANSPORT_HEAD_CLOSED, number=32)</em><a class="headerlink" href="#proton.Event.TRANSPORT_HEAD_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Indicates that the “head” or writing end of the transport has been closed. This |
| means the transport will never produce more bytes for output to |
| the network. Events of this type point to the relevant transport.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Event.TRANSPORT_TAIL_CLOSED"> |
| <code class="sig-name descname">TRANSPORT_TAIL_CLOSED</code><em class="property"> = EventType(name=PN_TRANSPORT_TAIL_CLOSED, number=33)</em><a class="headerlink" href="#proton.Event.TRANSPORT_TAIL_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Indicates that the “tail” of the transport has been closed. This |
| means the transport will never be able to process more bytes from |
| the network. Events of this type point to the relevant transport.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.clazz"> |
| <em class="property">property </em><code class="sig-name descname">clazz</code><a class="headerlink" href="#proton.Event.clazz" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The name of the class associated with the event context.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.connection"> |
| <em class="property">property </em><code class="sig-name descname">connection</code><a class="headerlink" href="#proton.Event.connection" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The connection associated with the event, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if none |
| is associated with it.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.container"> |
| <em class="property">property </em><code class="sig-name descname">container</code><a class="headerlink" href="#proton.Event.container" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The <a class="reference internal" href="proton.reactor.html#proton.reactor.Container" title="proton.reactor.Container"><code class="xref py py-class docutils literal notranslate"><span class="pre">reactor.Container</span></code></a> associated with the event.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.context"> |
| <em class="property">property </em><code class="sig-name descname">context</code><a class="headerlink" href="#proton.Event.context" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The context object associated with the event.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p>Depends on the type of event, and include the following: |
| - <a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a> |
| - <a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a> |
| - <a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a> |
| - <a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a> |
| - <a class="reference internal" href="#proton.Transport" title="proton.Transport"><code class="xref py py-class docutils literal notranslate"><span class="pre">Transport</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.delivery"> |
| <em class="property">property </em><code class="sig-name descname">delivery</code><a class="headerlink" href="#proton.Event.delivery" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The delivery associated with the event, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if none |
| is associated with it.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.dispatch"> |
| <code class="sig-name descname">dispatch</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">handler</span></em>, <em class="sig-param"><span class="n">type</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.Event.dispatch" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Process this event by sending it to all known handlers that |
| are valid for this event type.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>handler</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">Handler</span></code>) – Parent handler to process this event</p></li> |
| <li><p><strong>type</strong> (<a class="reference internal" href="#proton.EventType" title="proton.EventType"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventType</span></code></a>) – Event type</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.handler"> |
| <em class="property">property </em><code class="sig-name descname">handler</code><a class="headerlink" href="#proton.Event.handler" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The handler for this event. The handler is determined by looking |
| at the following in order:</p> |
| <ul class="simple"> |
| <li><p>The link</p></li> |
| <li><p>The session</p></li> |
| <li><p>The connection</p></li> |
| <li><p>The context object with an attribute “handler”</p></li> |
| </ul> |
| <p>If none of these has a handler, then <code class="docutils literal notranslate"><span class="pre">None</span></code> is returned.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.link"> |
| <em class="property">property </em><code class="sig-name descname">link</code><a class="headerlink" href="#proton.Event.link" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The link associated with the event, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if none |
| is associated with it.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.reactor"> |
| <em class="property">property </em><code class="sig-name descname">reactor</code><a class="headerlink" href="#proton.Event.reactor" title="Permalink to this definition">¶</a></dt> |
| <dd><p><strong>Deprecated</strong> - The <a class="reference internal" href="proton.reactor.html#proton.reactor.Container" title="proton.reactor.Container"><code class="xref py py-class docutils literal notranslate"><span class="pre">reactor.Container</span></code></a> (was reactor) associated with the event.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.receiver"> |
| <em class="property">property </em><code class="sig-name descname">receiver</code><a class="headerlink" href="#proton.Event.receiver" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The receiver link associated with the event, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if |
| none is associated with it. This is essentially an alias for |
| link(), that does an additional check on the type of the link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Receiver" title="proton.Receiver"><code class="xref py py-class docutils literal notranslate"><span class="pre">Receiver</span></code></a> (<strong><– CHECK!</strong>)</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.sender"> |
| <em class="property">property </em><code class="sig-name descname">sender</code><a class="headerlink" href="#proton.Event.sender" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The sender link associated with the event, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if |
| none is associated with it. This is essentially an alias for |
| link(), that does an additional check on the type of the |
| link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Sender" title="proton.Sender"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sender</span></code></a> (<strong><– CHECK!</strong>)</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.session"> |
| <em class="property">property </em><code class="sig-name descname">session</code><a class="headerlink" href="#proton.Event.session" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The session associated with the event, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if none |
| is associated with it.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.transport"> |
| <em class="property">property </em><code class="sig-name descname">transport</code><a class="headerlink" href="#proton.Event.transport" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The transport associated with the event, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if none |
| is associated with it.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Transport" title="proton.Transport"><code class="xref py py-class docutils literal notranslate"><span class="pre">Transport</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Event.type"> |
| <em class="property">property </em><code class="sig-name descname">type</code><a class="headerlink" href="#proton.Event.type" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The type name for this event</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.EventType"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">EventType</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">number</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">method</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_events.html#EventType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.EventType" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> |
| <p>Connects an event number to an event name, and is used |
| internally by <a class="reference internal" href="#proton.Event" title="proton.Event"><code class="xref py py-class docutils literal notranslate"><span class="pre">Event</span></code></a> to represent all known |
| event types. A global list of events is maintained. An |
| <a class="reference internal" href="#proton.EventType" title="proton.EventType"><code class="xref py py-class docutils literal notranslate"><span class="pre">EventType</span></code></a> created with a name but no number is |
| treated as an <em>extended</em> event, and is assigned an |
| internal event number starting at 10000.</p> |
| <dl class="py attribute"> |
| <dt id="proton.EventType.TYPES"> |
| <code class="sig-name descname">TYPES</code><em class="property"> = {4: EventType(name=PN_TIMER_TASK, number=4), 5: EventType(name=PN_CONNECTION_INIT, number=5), 6: EventType(name=PN_CONNECTION_BOUND, number=6), 7: EventType(name=PN_CONNECTION_UNBOUND, number=7), 8: EventType(name=PN_CONNECTION_LOCAL_OPEN, number=8), 9: EventType(name=PN_CONNECTION_REMOTE_OPEN, number=9), 10: EventType(name=PN_CONNECTION_LOCAL_CLOSE, number=10), 11: EventType(name=PN_CONNECTION_REMOTE_CLOSE, number=11), 12: EventType(name=PN_CONNECTION_FINAL, number=12), 13: EventType(name=PN_SESSION_INIT, number=13), 14: EventType(name=PN_SESSION_LOCAL_OPEN, number=14), 15: EventType(name=PN_SESSION_REMOTE_OPEN, number=15), 16: EventType(name=PN_SESSION_LOCAL_CLOSE, number=16), 17: EventType(name=PN_SESSION_REMOTE_CLOSE, number=17), 18: EventType(name=PN_SESSION_FINAL, number=18), 19: EventType(name=PN_LINK_INIT, number=19), 20: EventType(name=PN_LINK_LOCAL_OPEN, number=20), 21: EventType(name=PN_LINK_REMOTE_OPEN, number=21), 22: EventType(name=PN_LINK_LOCAL_CLOSE, number=22), 23: EventType(name=PN_LINK_REMOTE_CLOSE, number=23), 24: EventType(name=PN_LINK_LOCAL_DETACH, number=24), 25: EventType(name=PN_LINK_REMOTE_DETACH, number=25), 26: EventType(name=PN_LINK_FLOW, number=26), 27: EventType(name=PN_LINK_FINAL, number=27), 28: EventType(name=PN_DELIVERY, number=28), 29: EventType(name=PN_TRANSPORT, number=29), 31: EventType(name=PN_TRANSPORT_ERROR, number=31), 32: EventType(name=PN_TRANSPORT_HEAD_CLOSED, number=32), 33: EventType(name=PN_TRANSPORT_TAIL_CLOSED, number=33), 34: EventType(name=PN_TRANSPORT_CLOSED, number=34), 10000: EventType(name=reactor_init, number=10000), 10001: EventType(name=reactor_quiesced, number=10001), 10002: EventType(name=reactor_final, number=10002), 10003: EventType(name=selectable_init, number=10003), 10004: EventType(name=selectable_updated, number=10004), 10005: EventType(name=selectable_readable, number=10005), 10006: EventType(name=selectable_writable, number=10006), 10007: EventType(name=selectable_expired, number=10007), 10008: EventType(name=selectable_error, number=10008), 10009: EventType(name=selectable_final, number=10009)}</em><a class="headerlink" href="#proton.EventType.TYPES" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Link"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Link</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">impl</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Link"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Link" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._wrapper.Wrapper</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._endpoints.Endpoint</span></code></p> |
| <p>A representation of an AMQP link (a unidirectional channel for |
| transferring messages), of which there are two concrete |
| implementations, <a class="reference internal" href="#proton.Sender" title="proton.Sender"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sender</span></code></a> and <a class="reference internal" href="#proton.Receiver" title="proton.Receiver"><code class="xref py py-class docutils literal notranslate"><span class="pre">Receiver</span></code></a>.</p> |
| <dl class="py attribute"> |
| <dt id="proton.Link.LOCAL_ACTIVE"> |
| <code class="sig-name descname">LOCAL_ACTIVE</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Link.LOCAL_ACTIVE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Link.LOCAL_CLOSED"> |
| <code class="sig-name descname">LOCAL_CLOSED</code><em class="property"> = 4</em><a class="headerlink" href="#proton.Link.LOCAL_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Link.LOCAL_UNINIT"> |
| <code class="sig-name descname">LOCAL_UNINIT</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Link.LOCAL_UNINIT" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Link.RCV_FIRST"> |
| <code class="sig-name descname">RCV_FIRST</code><em class="property"> = 0</em><a class="headerlink" href="#proton.Link.RCV_FIRST" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The receiver will settle deliveries regardless of what the sender does.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Link.RCV_SECOND"> |
| <code class="sig-name descname">RCV_SECOND</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Link.RCV_SECOND" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The receiver will only settle deliveries after the sender settles.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Link.REMOTE_ACTIVE"> |
| <code class="sig-name descname">REMOTE_ACTIVE</code><em class="property"> = 16</em><a class="headerlink" href="#proton.Link.REMOTE_ACTIVE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Link.REMOTE_CLOSED"> |
| <code class="sig-name descname">REMOTE_CLOSED</code><em class="property"> = 32</em><a class="headerlink" href="#proton.Link.REMOTE_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Link.REMOTE_UNINIT"> |
| <code class="sig-name descname">REMOTE_UNINIT</code><em class="property"> = 8</em><a class="headerlink" href="#proton.Link.REMOTE_UNINIT" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Link.SND_MIXED"> |
| <code class="sig-name descname">SND_MIXED</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Link.SND_MIXED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The sender may send a mixture of settled and unsettled deliveries.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Link.SND_SETTLED"> |
| <code class="sig-name descname">SND_SETTLED</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Link.SND_SETTLED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The sender will send all deliveries settled to the receiver.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Link.SND_UNSETTLED"> |
| <code class="sig-name descname">SND_UNSETTLED</code><em class="property"> = 0</em><a class="headerlink" href="#proton.Link.SND_UNSETTLED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The sender will send all deliveries initially unsettled.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.advance"> |
| <code class="sig-name descname">advance</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Link.advance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Link.advance" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Advance the current delivery of this link to the next delivery.</p> |
| <p>For sending links this operation is used to finish sending message |
| data for the current outgoing delivery and move on to the next |
| outgoing delivery (if any).</p> |
| <p>For receiving links, this operation is used to finish accessing |
| message data from the current incoming delivery and move on to the |
| next incoming delivery (if any).</p> |
| <p>Each link maintains a sequence of deliveries in the order they were |
| created, along with a pointer to the <em>current</em> delivery. The |
| <a class="reference internal" href="#proton.Link.advance" title="proton.Link.advance"><code class="xref py py-meth docutils literal notranslate"><span class="pre">advance()</span></code></a> operation will modify the <em>current</em> delivery on the |
| link to point to the next delivery in the sequence. If there is no |
| next delivery in the sequence, the current delivery will be set to |
| <code class="docutils literal notranslate"><span class="pre">NULL</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if the value of the current delivery changed (even |
| if it was set to <code class="docutils literal notranslate"><span class="pre">NULL</span></code>, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.available"> |
| <em class="property">property </em><code class="sig-name descname">available</code><a class="headerlink" href="#proton.Link.available" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The available deliveries hint for this link.</p> |
| <p>The available count for a link provides a hint as to the number of |
| deliveries that might be able to be sent if sufficient credit were |
| issued by the receiving link endpoint. See <a class="reference internal" href="#proton.Sender.offered" title="proton.Sender.offered"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Sender.offered()</span></code></a> for |
| more details.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.close"> |
| <code class="sig-name descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Link.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Link.close" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Closes the link.</p> |
| <p>In more detail, this moves the local state of the link to the |
| <a class="reference internal" href="#proton.Link.LOCAL_CLOSED" title="proton.Link.LOCAL_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_CLOSED</span></code></a> state and triggers an detach frame (with |
| the closed flag set) to be sent to the peer. A link is fully |
| closed once both peers have detached it.</p> |
| <p>This may be called without calling <a class="reference internal" href="#proton.Link.open" title="proton.Link.open"><code class="xref py py-meth docutils literal notranslate"><span class="pre">open()</span></code></a>, in this case it |
| is equivalent to calling <a class="reference internal" href="#proton.Link.open" title="proton.Link.open"><code class="xref py py-meth docutils literal notranslate"><span class="pre">open()</span></code></a> followed by <a class="reference internal" href="#proton.Link.close" title="proton.Link.close"><code class="xref py py-meth docutils literal notranslate"><span class="pre">close()</span></code></a>.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.connection"> |
| <em class="property">property </em><code class="sig-name descname">connection</code><a class="headerlink" href="#proton.Link.connection" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The connection on which this link was attached.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.credit"> |
| <em class="property">property </em><code class="sig-name descname">credit</code><a class="headerlink" href="#proton.Link.credit" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The amount of outstanding credit on this link.</p> |
| <p>Links use a credit based flow control scheme. Every receiver |
| maintains a credit balance that corresponds to the number of |
| deliveries that the receiver can accept at any given moment. As |
| more capacity becomes available at the receiver (see |
| <a class="reference internal" href="#proton.Receiver.flow" title="proton.Receiver.flow"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Receiver.flow()</span></code></a>), it adds credit to this balance and |
| communicates the new balance to the sender. Whenever a delivery |
| is sent/received, the credit balance maintained by the link is |
| decremented by one. Once the credit balance at the sender reaches |
| zero, the sender must pause sending until more credit is obtained |
| from the receiver.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>A sending link may still be used to send deliveries even |
| if <a class="reference internal" href="#proton.Link.credit" title="proton.Link.credit"><code class="xref py py-attr docutils literal notranslate"><span class="pre">credit</span></code></a> reaches zero, however those deliveries will end |
| up being buffered by the link until enough credit is obtained from |
| the receiver to send them over the wire. In this case the balance |
| reported by <a class="reference internal" href="#proton.Link.credit" title="proton.Link.credit"><code class="xref py py-attr docutils literal notranslate"><span class="pre">credit</span></code></a> will go negative.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.current"> |
| <em class="property">property </em><code class="sig-name descname">current</code><a class="headerlink" href="#proton.Link.current" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The current delivery for this link.</p> |
| <p>Each link maintains a sequence of deliveries in the order |
| they were created, along with a pointer to the <em>current</em> |
| delivery. All send/recv operations on a link take place |
| on the <em>current</em> delivery. If a link has no current delivery, |
| the current delivery is automatically initialized to the |
| next delivery created on the link. Once initialized, the |
| current delivery remains the same until it is changed through |
| use of <a class="reference internal" href="#proton.Link.advance" title="proton.Link.advance"><code class="xref py py-meth docutils literal notranslate"><span class="pre">advance()</span></code></a> or until it is settled via |
| <a class="reference internal" href="#proton.Delivery.settle" title="proton.Delivery.settle"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Delivery.settle()</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.delivery"> |
| <code class="sig-name descname">delivery</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">tag</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Link.delivery"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Link.delivery" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Create a delivery. Every delivery object within a |
| link must be supplied with a unique tag. Links |
| maintain a sequence of delivery object in the order that |
| they are created.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>tag</strong> (<code class="docutils literal notranslate"><span class="pre">bytes</span></code>) – Delivery tag unique for this link.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.detach"> |
| <code class="sig-name descname">detach</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Link.detach"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Link.detach" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Detach this link.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.drain_mode"> |
| <em class="property">property </em><code class="sig-name descname">drain_mode</code><a class="headerlink" href="#proton.Link.drain_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The drain mode on this link.</p> |
| <p>If a link is in drain mode (<code class="docutils literal notranslate"><span class="pre">True</span></code>), then the sending |
| endpoint of a link must immediately use up all available |
| credit on the link. If this is not possible, the excess |
| credit must be returned by invoking <a class="reference internal" href="#proton.Link.drained" title="proton.Link.drained"><code class="xref py py-meth docutils literal notranslate"><span class="pre">drained()</span></code></a>. Only |
| the receiving endpoint can set the drain mode.</p> |
| <p>When <code class="docutils literal notranslate"><span class="pre">False</span></code>, this link is not in drain mode.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.drained"> |
| <code class="sig-name descname">drained</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Link.drained"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Link.drained" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Drain excess credit for this link.</p> |
| <p>When a link is in drain mode (see <a class="reference internal" href="#proton.Link.drain_mode" title="proton.Link.drain_mode"><code class="xref py py-attr docutils literal notranslate"><span class="pre">drain_mode</span></code></a>), the |
| sender must use all excess credit immediately, and release |
| any excess credit back to the receiver if there are no |
| deliveries available to send.</p> |
| <p>When invoked on a sending link that is in drain mode, this |
| operation will release all excess credit back to the receiver |
| and return the number of credits released back to the sender. |
| If the link is not in drain mode, this operation is a noop.</p> |
| <p>When invoked on a receiving link, this operation will return |
| and reset the number of credits the sender has released back |
| to the receiver.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The number of credits drained.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.free"> |
| <code class="sig-name descname">free</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Link.free"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Link.free" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Free this link object. When a link object is freed, |
| all <a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a> objects associated with the session (<strong><– CHECK THIS</strong>) |
| are also freed. Freeing a link will settle any unsettled |
| deliveries on the link.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.handler"> |
| <em class="property">property </em><code class="sig-name descname">handler</code><a class="headerlink" href="#proton.Link.handler" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Handler for events.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Getter</dt> |
| <dd class="field-odd"><p>Get the event handler, or return <code class="docutils literal notranslate"><span class="pre">None</span></code> if no handler has been set.</p> |
| </dd> |
| <dt class="field-even">Setter</dt> |
| <dd class="field-even"><p>Set the event handler.</p> |
| </dd> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">Handler</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.is_receiver"> |
| <em class="property">property </em><code class="sig-name descname">is_receiver</code><a class="headerlink" href="#proton.Link.is_receiver" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if this link is a receiver, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.is_sender"> |
| <em class="property">property </em><code class="sig-name descname">is_sender</code><a class="headerlink" href="#proton.Link.is_sender" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if this link is a sender, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.max_message_size"> |
| <em class="property">property </em><code class="sig-name descname">max_message_size</code><a class="headerlink" href="#proton.Link.max_message_size" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The maximum message size for this link. A zero value means the |
| size is unlimited.</p> |
| <div class="admonition warning"> |
| <p class="admonition-title">Warning</p> |
| <p><strong>Unsettled API</strong></p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">long</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.name"> |
| <em class="property">property </em><code class="sig-name descname">name</code><a class="headerlink" href="#proton.Link.name" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The name of the link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.next"> |
| <code class="sig-name descname">next</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mask</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Link.next"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Link.next" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Retrieve the next link that matches the given state mask.</p> |
| <p>When used with <a class="reference internal" href="#proton.Connection.link_head" title="proton.Connection.link_head"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Connection.link_head()</span></code></a>, the application |
| can access all links on the connection that match the given |
| state. See <a class="reference internal" href="#proton.Connection.link_head" title="proton.Connection.link_head"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Connection.link_head()</span></code></a> for a description of |
| match behavior.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>mask</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – State mask to match</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>The next link that matches the given state mask, or |
| <code class="docutils literal notranslate"><span class="pre">None</span></code> if no link matches.</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.open"> |
| <code class="sig-name descname">open</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Link.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Link.open" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Opens the link.</p> |
| <p>In more detail, this moves the local state of the link to the |
| <a class="reference internal" href="#proton.Link.LOCAL_ACTIVE" title="proton.Link.LOCAL_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_ACTIVE</span></code></a> state and triggers an attach frame to be |
| sent to the peer. A link is fully active once both peers have |
| attached it.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.properties"> |
| <em class="property">property </em><code class="sig-name descname">properties</code><a class="headerlink" href="#proton.Link.properties" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Link properties as a dictionary of key/values. The AMQP 1.0 |
| specification restricts this dictionary to have keys that are only |
| <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> types. It is possible to use the special <code class="docutils literal notranslate"><span class="pre">dict</span></code> |
| subclass <a class="reference internal" href="#proton.PropertyDict" title="proton.PropertyDict"><code class="xref py py-class docutils literal notranslate"><span class="pre">PropertyDict</span></code></a> which will by default enforce this |
| restrictions on construction. In addition, if strings type are used, |
| this will silently convert them into symbols.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">dict</span></code> containing <code class="xref py py-class docutils literal notranslate"><span class="pre">symbol`</span></code> keys.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.queued"> |
| <em class="property">property </em><code class="sig-name descname">queued</code><a class="headerlink" href="#proton.Link.queued" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The number of queued deliveries for a link.</p> |
| <p>Links may queue deliveries for a number of reasons, for example |
| there may be insufficient credit to send them to the receiver (see |
| <a class="reference internal" href="#proton.Link.credit" title="proton.Link.credit"><code class="xref py py-meth docutils literal notranslate"><span class="pre">credit()</span></code></a>), or they simply may not have yet had a chance to |
| be written to the wire. This operation will return the number of |
| queued deliveries on a link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.rcv_settle_mode"> |
| <em class="property">property </em><code class="sig-name descname">rcv_settle_mode</code><a class="headerlink" href="#proton.Link.rcv_settle_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local receiver settle mode for this link. One of |
| <a class="reference internal" href="#proton.Link.RCV_FIRST" title="proton.Link.RCV_FIRST"><code class="xref py py-const docutils literal notranslate"><span class="pre">RCV_FIRST</span></code></a> or <a class="reference internal" href="#proton.Link.RCV_SECOND" title="proton.Link.RCV_SECOND"><code class="xref py py-const docutils literal notranslate"><span class="pre">RCV_SECOND</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.remote_condition"> |
| <em class="property">property </em><code class="sig-name descname">remote_condition</code><a class="headerlink" href="#proton.Link.remote_condition" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote condition associated with the connection endpoint. |
| See <a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a> for more information.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.remote_max_message_size"> |
| <em class="property">property </em><code class="sig-name descname">remote_max_message_size</code><a class="headerlink" href="#proton.Link.remote_max_message_size" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the remote view of the maximum message size for this link.</p> |
| <div class="admonition warning"> |
| <p class="admonition-title">Warning</p> |
| <p><strong>Unsettled API</strong></p> |
| </div> |
| <p>A zero value means the size is unlimited.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">long</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.remote_properties"> |
| <em class="property">property </em><code class="sig-name descname">remote_properties</code><a class="headerlink" href="#proton.Link.remote_properties" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The properties specified by the remote peer for this link.</p> |
| <p>This operation will return a <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object that |
| is valid until the link object is freed. This <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> |
| object will be empty until the remote link is opened as |
| indicated by the <a class="reference internal" href="#proton.Link.REMOTE_ACTIVE" title="proton.Link.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> flag.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.remote_rcv_settle_mode"> |
| <em class="property">property </em><code class="sig-name descname">remote_rcv_settle_mode</code><a class="headerlink" href="#proton.Link.remote_rcv_settle_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote receiver settle mode for this link. One of |
| <a class="reference internal" href="#proton.Link.RCV_FIRST" title="proton.Link.RCV_FIRST"><code class="xref py py-const docutils literal notranslate"><span class="pre">RCV_FIRST</span></code></a> or <a class="reference internal" href="#proton.Link.RCV_SECOND" title="proton.Link.RCV_SECOND"><code class="xref py py-const docutils literal notranslate"><span class="pre">RCV_SECOND</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.remote_snd_settle_mode"> |
| <em class="property">property </em><code class="sig-name descname">remote_snd_settle_mode</code><a class="headerlink" href="#proton.Link.remote_snd_settle_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote sender settle mode for this link. One of |
| <a class="reference internal" href="#proton.Link.SND_UNSETTLED" title="proton.Link.SND_UNSETTLED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_UNSETTLED</span></code></a>, <a class="reference internal" href="#proton.Link.SND_SETTLED" title="proton.Link.SND_SETTLED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_SETTLED</span></code></a> or |
| <a class="reference internal" href="#proton.Link.SND_MIXED" title="proton.Link.SND_MIXED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_MIXED</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.remote_source"> |
| <em class="property">property </em><code class="sig-name descname">remote_source</code><a class="headerlink" href="#proton.Link.remote_source" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The source of the link as described by the remote peer. The |
| returned object is valid until the link is freed. The remote |
| <a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a> object will be empty until the link is |
| remotely opened as indicated by the <a class="reference internal" href="#proton.Link.REMOTE_ACTIVE" title="proton.Link.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> |
| flag.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.remote_target"> |
| <em class="property">property </em><code class="sig-name descname">remote_target</code><a class="headerlink" href="#proton.Link.remote_target" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The target of the link as described by the remote peer. The |
| returned object is valid until the link is freed. The remote |
| <a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a> object will be empty until the link is |
| remotely opened as indicated by the <a class="reference internal" href="#proton.Link.REMOTE_ACTIVE" title="proton.Link.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> |
| flag.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.session"> |
| <em class="property">property </em><code class="sig-name descname">session</code><a class="headerlink" href="#proton.Link.session" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The parent session for this link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.snd_settle_mode"> |
| <em class="property">property </em><code class="sig-name descname">snd_settle_mode</code><a class="headerlink" href="#proton.Link.snd_settle_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local sender settle mode for this link. One of |
| <a class="reference internal" href="#proton.Link.SND_UNSETTLED" title="proton.Link.SND_UNSETTLED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_UNSETTLED</span></code></a>, <a class="reference internal" href="#proton.Link.SND_SETTLED" title="proton.Link.SND_SETTLED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_SETTLED</span></code></a> or |
| <a class="reference internal" href="#proton.Link.SND_MIXED" title="proton.Link.SND_MIXED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_MIXED</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.source"> |
| <em class="property">property </em><code class="sig-name descname">source</code><a class="headerlink" href="#proton.Link.source" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The source of the link as described by the local peer. The |
| returned object is valid until the link is freed.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.state"> |
| <em class="property">property </em><code class="sig-name descname">state</code><a class="headerlink" href="#proton.Link.state" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The state of the link as a bit field. The state has a local |
| and a remote component. Each of these can be in one of three |
| states: <code class="docutils literal notranslate"><span class="pre">UNINIT</span></code>, <code class="docutils literal notranslate"><span class="pre">ACTIVE</span></code> or <code class="docutils literal notranslate"><span class="pre">CLOSED</span></code>. These can be |
| tested by masking against <a class="reference internal" href="#proton.Link.LOCAL_UNINIT" title="proton.Link.LOCAL_UNINIT"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_UNINIT</span></code></a>, |
| <a class="reference internal" href="#proton.Link.LOCAL_ACTIVE" title="proton.Link.LOCAL_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_ACTIVE</span></code></a>, <a class="reference internal" href="#proton.Link.LOCAL_CLOSED" title="proton.Link.LOCAL_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_CLOSED</span></code></a>, |
| <a class="reference internal" href="#proton.Link.REMOTE_UNINIT" title="proton.Link.REMOTE_UNINIT"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_UNINIT</span></code></a>, <a class="reference internal" href="#proton.Link.REMOTE_ACTIVE" title="proton.Link.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> and |
| <a class="reference internal" href="#proton.Link.REMOTE_CLOSED" title="proton.Link.REMOTE_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_CLOSED</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.target"> |
| <em class="property">property </em><code class="sig-name descname">target</code><a class="headerlink" href="#proton.Link.target" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The target of the link as described by the local peer. The |
| returned object is valid until the link is freed.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.transport"> |
| <em class="property">property </em><code class="sig-name descname">transport</code><a class="headerlink" href="#proton.Link.transport" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The transport bound to the connection on which this link was attached.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Transport" title="proton.Transport"><code class="xref py py-class docutils literal notranslate"><span class="pre">Transport</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Link.unsettled"> |
| <em class="property">property </em><code class="sig-name descname">unsettled</code><a class="headerlink" href="#proton.Link.unsettled" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The number of unsettled deliveries for this link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.LinkException"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">LinkException</code><a class="reference internal" href="_modules/proton/_exceptions.html#LinkException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.LinkException" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._exceptions.ProtonException</span></code></p> |
| <p>An exception class raised when exceptions or errors related to a |
| link arise.</p> |
| <dl class="py method"> |
| <dt id="proton.LinkException.with_traceback"> |
| <code class="sig-name descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.LinkException.with_traceback" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Exception.with_traceback(tb) – |
| set self.__traceback__ to tb and return self.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Message"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Message</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">body</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_message.html#Message"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Message" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> |
| <p>The <a class="reference internal" href="#proton.Message" title="proton.Message"><code class="xref py py-class docutils literal notranslate"><span class="pre">Message</span></code></a> class is a mutable holder of message content.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Variables</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><a class="reference internal" href="#proton.Message.instructions" title="proton.Message.instructions"><strong>instructions</strong></a> (<code class="docutils literal notranslate"><span class="pre">dict</span></code>) – delivery instructions for the message (“Delivery Annotations” in the AMQP 1.0 spec)</p></li> |
| <li><p><strong>annotations</strong> (<code class="docutils literal notranslate"><span class="pre">dict</span></code>) – infrastructure defined message annotations (“Message Annotations” in the AMQP 1.0 spec)</p></li> |
| <li><p><strong>properties</strong> (<code class="docutils literal notranslate"><span class="pre">dict</span></code>) – application defined message properties</p></li> |
| <li><p><strong>body</strong> (<em>bytes | unicode | dict | list | int | long | float | UUID</em>) – message body</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Parameters</dt> |
| <dd class="field-even"><p><strong>kwargs</strong> – Message property name/value pairs to initialize the Message</p> |
| </dd> |
| </dl> |
| <dl class="py attribute"> |
| <dt id="proton.Message.DEFAULT_PRIORITY"> |
| <code class="sig-name descname">DEFAULT_PRIORITY</code><em class="property"> = 4</em><a class="headerlink" href="#proton.Message.DEFAULT_PRIORITY" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Default AMQP message priority</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.address"> |
| <em class="property">property </em><code class="sig-name descname">address</code><a class="headerlink" href="#proton.Message.address" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The address of the message.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.annotations"> |
| <em class="property">property </em><code class="sig-name descname">annotations</code><a class="headerlink" href="#proton.Message.annotations" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Message annotations as a dictionary of key/values. The AMQP 1.0 |
| specification restricts this dictionary to have keys that are either |
| <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> or <a class="reference internal" href="#proton.ulong" title="proton.ulong"><code class="xref py py-class docutils literal notranslate"><span class="pre">ulong</span></code></a> types. It is possible to use |
| the special <code class="docutils literal notranslate"><span class="pre">dict</span></code> subclass <a class="reference internal" href="#proton.AnnotationDict" title="proton.AnnotationDict"><code class="xref py py-class docutils literal notranslate"><span class="pre">AnnotationDict</span></code></a> which |
| will by default enforce these restrictions on construction. In addition, |
| if a string types are used, this class will silently convert them into |
| symbols.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.AnnotationDict" title="proton.AnnotationDict"><code class="xref py py-class docutils literal notranslate"><span class="pre">AnnotationDict</span></code></a>. Any <code class="docutils literal notranslate"><span class="pre">dict</span></code> with <a class="reference internal" href="#proton.ulong" title="proton.ulong"><code class="xref py py-class docutils literal notranslate"><span class="pre">ulong</span></code></a> or <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> keys.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.clear"> |
| <code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_message.html#Message.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Message.clear" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Clears the contents of the <a class="reference internal" href="#proton.Message" title="proton.Message"><code class="xref py py-class docutils literal notranslate"><span class="pre">Message</span></code></a>. All fields will be reset to |
| their default values.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.content_encoding"> |
| <em class="property">property </em><code class="sig-name descname">content_encoding</code><a class="headerlink" href="#proton.Message.content_encoding" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The content-encoding of the message.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.content_type"> |
| <em class="property">property </em><code class="sig-name descname">content_type</code><a class="headerlink" href="#proton.Message.content_type" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The RFC-2046 [RFC2046] MIME type for the message body.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.correlation_id"> |
| <em class="property">property </em><code class="sig-name descname">correlation_id</code><a class="headerlink" href="#proton.Message.correlation_id" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The correlation-id for the message.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p>The valid AMQP types for a correlation-id are one of:</p> |
| <ul class="simple"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">int</span></code> (unsigned)</p></li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">uuid.UUID</span></code></p></li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">bytes</span></code></p></li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.creation_time"> |
| <em class="property">property </em><code class="sig-name descname">creation_time</code><a class="headerlink" href="#proton.Message.creation_time" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The creation time of the message in seconds using the Unix time_t [IEEE1003] encoding.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.delivery_count"> |
| <em class="property">property </em><code class="sig-name descname">delivery_count</code><a class="headerlink" href="#proton.Message.delivery_count" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The number of delivery attempts made for this message.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.durable"> |
| <em class="property">property </em><code class="sig-name descname">durable</code><a class="headerlink" href="#proton.Message.durable" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The durable property indicates that the message should be held durably |
| by any intermediaries taking responsibility for the message.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.expiry_time"> |
| <em class="property">property </em><code class="sig-name descname">expiry_time</code><a class="headerlink" href="#proton.Message.expiry_time" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The absolute expiry time of the message in seconds using the Unix time_t [IEEE1003] encoding.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.first_acquirer"> |
| <em class="property">property </em><code class="sig-name descname">first_acquirer</code><a class="headerlink" href="#proton.Message.first_acquirer" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> iff the recipient is the first to acquire the message, |
| <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.group_id"> |
| <em class="property">property </em><code class="sig-name descname">group_id</code><a class="headerlink" href="#proton.Message.group_id" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The group id of the message.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.group_sequence"> |
| <em class="property">property </em><code class="sig-name descname">group_sequence</code><a class="headerlink" href="#proton.Message.group_sequence" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The sequence of the message within its group.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.id"> |
| <em class="property">property </em><code class="sig-name descname">id</code><a class="headerlink" href="#proton.Message.id" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The globally unique id of the message, and can be used |
| to determine if a received message is a duplicate. The allowed |
| types to set the id are:</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p>The valid AMQP types for an id are one of:</p> |
| <ul class="simple"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">int</span></code> (unsigned)</p></li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">uuid.UUID</span></code></p></li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">bytes</span></code></p></li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.inferred"> |
| <em class="property">property </em><code class="sig-name descname">inferred</code><a class="headerlink" href="#proton.Message.inferred" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The inferred flag for a message indicates how the message content |
| is encoded into AMQP sections. If inferred is true then binary and |
| list values in the body of the message will be encoded as AMQP DATA |
| and AMQP SEQUENCE sections, respectively. If inferred is false, |
| then all values in the body of the message will be encoded as AMQP |
| VALUE sections regardless of their type.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.instructions"> |
| <em class="property">property </em><code class="sig-name descname">instructions</code><a class="headerlink" href="#proton.Message.instructions" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Delivery annotations as a dictionary of key/values. The AMQP 1.0 |
| specification restricts this dictionary to have keys that are either |
| <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> or <a class="reference internal" href="#proton.ulong" title="proton.ulong"><code class="xref py py-class docutils literal notranslate"><span class="pre">ulong</span></code></a> types. It is possible to use |
| the special <code class="docutils literal notranslate"><span class="pre">dict</span></code> subclass <a class="reference internal" href="#proton.AnnotationDict" title="proton.AnnotationDict"><code class="xref py py-class docutils literal notranslate"><span class="pre">AnnotationDict</span></code></a> which |
| will by default enforce these restrictions on construction. In addition, |
| if string types are used, this class will be silently convert them into |
| symbols.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.AnnotationDict" title="proton.AnnotationDict"><code class="xref py py-class docutils literal notranslate"><span class="pre">AnnotationDict</span></code></a>. Any <code class="docutils literal notranslate"><span class="pre">dict</span></code> with <a class="reference internal" href="#proton.ulong" title="proton.ulong"><code class="xref py py-class docutils literal notranslate"><span class="pre">ulong</span></code></a> or <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> keys.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.priority"> |
| <em class="property">property </em><code class="sig-name descname">priority</code><a class="headerlink" href="#proton.Message.priority" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The relative priority of the message, with higher numbers indicating |
| higher priority. The number of available priorities depends |
| on the implementation, but AMQP defines the default priority as |
| the value <code class="docutils literal notranslate"><span class="pre">4</span></code>. See the |
| <a class="reference external" href="http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-header">OASIS AMQP 1.0 standard</a> |
| for more details on message priority.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.recv"> |
| <code class="sig-name descname">recv</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">link</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_message.html#Message.recv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Message.recv" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Receives and decodes the message content for the current <a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a> |
| from the link. Upon success it will return the current delivery |
| for the link. If there is no current delivery, or if the current |
| delivery is incomplete, or if the link is not a receiver, it will |
| return <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>link</strong> (<a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a>) – The link to receive a message from</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>the delivery associated with the decoded message (or None)</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.reply_to"> |
| <em class="property">property </em><code class="sig-name descname">reply_to</code><a class="headerlink" href="#proton.Message.reply_to" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The reply-to address for the message.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.reply_to_group_id"> |
| <em class="property">property </em><code class="sig-name descname">reply_to_group_id</code><a class="headerlink" href="#proton.Message.reply_to_group_id" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The group-id for any replies.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.send"> |
| <code class="sig-name descname">send</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sender</span></em>, <em class="sig-param"><span class="n">tag</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_message.html#Message.send"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Message.send" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Encodes and sends the message content using the specified sender, |
| and, if present, using the specified tag. Upon success, will |
| return the <a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a> object for the sent message.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>sender</strong> (<a class="reference internal" href="#proton.Sender" title="proton.Sender"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sender</span></code></a>) – The sender to send the message</p></li> |
| <li><p><strong>tag</strong> (<code class="docutils literal notranslate"><span class="pre">bytes</span></code>) – The delivery tag for the sent message</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>The delivery associated with the sent message</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.subject"> |
| <em class="property">property </em><code class="sig-name descname">subject</code><a class="headerlink" href="#proton.Message.subject" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The subject of the message.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.ttl"> |
| <em class="property">property </em><code class="sig-name descname">ttl</code><a class="headerlink" href="#proton.Message.ttl" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The time to live of the message measured in seconds. Expired messages |
| may be dropped.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Message.user_id"> |
| <em class="property">property </em><code class="sig-name descname">user_id</code><a class="headerlink" href="#proton.Message.user_id" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The user id of the message creator.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bytes</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.MessageException" title="proton.MessageException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">MessageException</span></code></a> if there is any Proton error when using the setter.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.MessageException"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">MessageException</code><a class="reference internal" href="_modules/proton/_exceptions.html#MessageException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.MessageException" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._exceptions.ProtonException</span></code></p> |
| <p>The MessageException class is the root of the message exception |
| hierarchy. All exceptions generated by the Message class derive from |
| this exception.</p> |
| <dl class="py method"> |
| <dt id="proton.MessageException.with_traceback"> |
| <code class="sig-name descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.MessageException.with_traceback" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Exception.with_traceback(tb) – |
| set self.__traceback__ to tb and return self.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.ProtonException"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">ProtonException</code><a class="reference internal" href="_modules/proton/_exceptions.html#ProtonException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.ProtonException" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p> |
| <p>The root of the proton exception hierarchy. All proton exception |
| classes derive from this exception.</p> |
| <dl class="py method"> |
| <dt id="proton.ProtonException.with_traceback"> |
| <code class="sig-name descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.ProtonException.with_traceback" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Exception.with_traceback(tb) – |
| set self.__traceback__ to tb and return self.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.PropertyDict"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">PropertyDict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">e</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">raise_on_error</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#PropertyDict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.PropertyDict" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._data.RestrictedKeyDict</span></code></p> |
| <p>A dictionary that only takes <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> types as a key. |
| However, if a string key is provided, it will be silently converted |
| into a symbol key.</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">proton</span> <span class="kn">import</span> <span class="n">symbol</span><span class="p">,</span> <span class="n">ulong</span><span class="p">,</span> <span class="n">PropertyDict</span> |
| <span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">PropertyDict</span><span class="p">(</span><span class="n">one</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">two</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">PropertyDict</span><span class="p">({</span><span class="s1">'one'</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span> <span class="n">symbol</span><span class="p">(</span><span class="s1">'two'</span><span class="p">):</span><span class="mi">2</span><span class="p">})</span> |
| <span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">PropertyDict</span><span class="p">(</span><span class="nb">zip</span><span class="p">([</span><span class="s1">'one'</span><span class="p">,</span> <span class="n">symbol</span><span class="p">(</span><span class="s1">'two'</span><span class="p">)],</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">]))</span> |
| <span class="gp">>>> </span><span class="n">d</span> <span class="o">=</span> <span class="n">PropertyDict</span><span class="p">([(</span><span class="n">symbol</span><span class="p">(</span><span class="s1">'one'</span><span class="p">),</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="s1">'two'</span><span class="p">,</span> <span class="mi">2</span><span class="p">)])</span> |
| <span class="gp">>>> </span><span class="n">e</span> <span class="o">=</span> <span class="n">PropertyDict</span><span class="p">(</span><span class="n">a</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">a</span> <span class="o">==</span> <span class="n">b</span> <span class="o">==</span> <span class="n">c</span> <span class="o">==</span> <span class="n">d</span> <span class="o">==</span> <span class="n">e</span> |
| <span class="go">True</span> |
| </pre></div> |
| </div> |
| <p>By default, non-string and non-symbol keys cause a <code class="docutils literal notranslate"><span class="pre">KeyError</span></code> to be raised:</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">PropertyDict</span><span class="p">({</span><span class="s1">'one'</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">:</span><span class="s1">'two'</span><span class="p">})</span> |
| <span class="go"> ...</span> |
| <span class="go">KeyError: "invalid non-symbol key: <type 'int'>: 2"</span> |
| </pre></div> |
| </div> |
| <p>but by setting <code class="docutils literal notranslate"><span class="pre">raise_on_error=False</span></code>, non-string and non-symbol keys will be ignored:</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">PropertyDict</span><span class="p">({</span><span class="s1">'one'</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">:</span><span class="s1">'two'</span><span class="p">},</span> <span class="n">raise_on_error</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> |
| <span class="go">PropertyDict({2: 'two', symbol(u'one'): 1})</span> |
| </pre></div> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>e</strong> (<code class="docutils literal notranslate"><span class="pre">dict</span></code> or <code class="docutils literal notranslate"><span class="pre">list</span></code> of <code class="docutils literal notranslate"><span class="pre">tuple</span></code> or <code class="docutils literal notranslate"><span class="pre">zip</span></code> object) – Initialization for <code class="docutils literal notranslate"><span class="pre">dict</span></code></p></li> |
| <li><p><strong>raise_on_error</strong> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) – If <code class="docutils literal notranslate"><span class="pre">True</span></code>, will raise an <code class="docutils literal notranslate"><span class="pre">KeyError</span></code> if a non-string or non-symbol |
| is encountered as a key in the initialization, or in a subsequent operation which |
| adds such an key. If <code class="docutils literal notranslate"><span class="pre">False</span></code>, non-strings and non-symbols will be added as keys |
| to the dictionary without an error.</p></li> |
| <li><p><strong>kwargs</strong> – Keyword args for initializing a <code class="docutils literal notranslate"><span class="pre">dict</span></code> of the form key1=val1, key2=val2, …</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="py method"> |
| <dt id="proton.PropertyDict.clear"> |
| <code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → None. Remove all items from D.<a class="headerlink" href="#proton.PropertyDict.clear" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.PropertyDict.copy"> |
| <code class="sig-name descname">copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → a shallow copy of D<a class="headerlink" href="#proton.PropertyDict.copy" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.PropertyDict.fromkeys"> |
| <code class="sig-name descname">fromkeys</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">/</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.PropertyDict.fromkeys" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Create a new dictionary with keys from iterable and values set to value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.PropertyDict.get"> |
| <code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">default</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">/</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.PropertyDict.get" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return the value for key if key is in the dictionary, else default.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.PropertyDict.items"> |
| <code class="sig-name descname">items</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → a set-like object providing a view on D’s items<a class="headerlink" href="#proton.PropertyDict.items" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.PropertyDict.keys"> |
| <code class="sig-name descname">keys</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → a set-like object providing a view on D’s keys<a class="headerlink" href="#proton.PropertyDict.keys" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.PropertyDict.pop"> |
| <code class="sig-name descname">pop</code><span class="sig-paren">(</span><em class="sig-param">k</em><span class="optional">[</span>, <em class="sig-param">d</em><span class="optional">]</span><span class="sig-paren">)</span> → v, remove specified key and return the corresponding value.<a class="headerlink" href="#proton.PropertyDict.pop" title="Permalink to this definition">¶</a></dt> |
| <dd><p>If key is not found, default is returned if given, otherwise KeyError is raised</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.PropertyDict.popitem"> |
| <code class="sig-name descname">popitem</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.PropertyDict.popitem" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Remove and return a (key, value) pair as a 2-tuple.</p> |
| <p>Pairs are returned in LIFO (last-in, first-out) order. |
| Raises KeyError if the dict is empty.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.PropertyDict.setdefault"> |
| <code class="sig-name descname">setdefault</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">default</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">/</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.PropertyDict.setdefault" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Insert key with a value of default if key is not in the dictionary.</p> |
| <p>Return the value for key if key is in the dictionary, else default.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.PropertyDict.update"> |
| <code class="sig-name descname">update</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">e</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.PropertyDict.update" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Equivalent to dict.update(), but it was needed to call <code class="xref py py-meth docutils literal notranslate"><span class="pre">__setitem__()</span></code> |
| instead of <code class="docutils literal notranslate"><span class="pre">dict.__setitem__()</span></code>.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.PropertyDict.values"> |
| <code class="sig-name descname">values</code><span class="sig-paren">(</span><span class="sig-paren">)</span> → an object providing a view on D’s values<a class="headerlink" href="#proton.PropertyDict.values" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Receiver"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Receiver</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">impl</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Receiver"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Receiver" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._endpoints.Link</span></code></p> |
| <p>A link over which messages are received.</p> |
| <dl class="py attribute"> |
| <dt id="proton.Receiver.LOCAL_ACTIVE"> |
| <code class="sig-name descname">LOCAL_ACTIVE</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Receiver.LOCAL_ACTIVE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Receiver.LOCAL_CLOSED"> |
| <code class="sig-name descname">LOCAL_CLOSED</code><em class="property"> = 4</em><a class="headerlink" href="#proton.Receiver.LOCAL_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Receiver.LOCAL_UNINIT"> |
| <code class="sig-name descname">LOCAL_UNINIT</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Receiver.LOCAL_UNINIT" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Receiver.RCV_FIRST"> |
| <code class="sig-name descname">RCV_FIRST</code><em class="property"> = 0</em><a class="headerlink" href="#proton.Receiver.RCV_FIRST" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Receiver.RCV_SECOND"> |
| <code class="sig-name descname">RCV_SECOND</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Receiver.RCV_SECOND" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Receiver.REMOTE_ACTIVE"> |
| <code class="sig-name descname">REMOTE_ACTIVE</code><em class="property"> = 16</em><a class="headerlink" href="#proton.Receiver.REMOTE_ACTIVE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Receiver.REMOTE_CLOSED"> |
| <code class="sig-name descname">REMOTE_CLOSED</code><em class="property"> = 32</em><a class="headerlink" href="#proton.Receiver.REMOTE_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Receiver.REMOTE_UNINIT"> |
| <code class="sig-name descname">REMOTE_UNINIT</code><em class="property"> = 8</em><a class="headerlink" href="#proton.Receiver.REMOTE_UNINIT" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Receiver.SND_MIXED"> |
| <code class="sig-name descname">SND_MIXED</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Receiver.SND_MIXED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Receiver.SND_SETTLED"> |
| <code class="sig-name descname">SND_SETTLED</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Receiver.SND_SETTLED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Receiver.SND_UNSETTLED"> |
| <code class="sig-name descname">SND_UNSETTLED</code><em class="property"> = 0</em><a class="headerlink" href="#proton.Receiver.SND_UNSETTLED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.advance"> |
| <code class="sig-name descname">advance</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Receiver.advance" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Advance the current delivery of this link to the next delivery.</p> |
| <p>For sending links this operation is used to finish sending message |
| data for the current outgoing delivery and move on to the next |
| outgoing delivery (if any).</p> |
| <p>For receiving links, this operation is used to finish accessing |
| message data from the current incoming delivery and move on to the |
| next incoming delivery (if any).</p> |
| <p>Each link maintains a sequence of deliveries in the order they were |
| created, along with a pointer to the <em>current</em> delivery. The |
| <a class="reference internal" href="#proton.Receiver.advance" title="proton.Receiver.advance"><code class="xref py py-meth docutils literal notranslate"><span class="pre">advance()</span></code></a> operation will modify the <em>current</em> delivery on the |
| link to point to the next delivery in the sequence. If there is no |
| next delivery in the sequence, the current delivery will be set to |
| <code class="docutils literal notranslate"><span class="pre">NULL</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if the value of the current delivery changed (even |
| if it was set to <code class="docutils literal notranslate"><span class="pre">NULL</span></code>, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.available"> |
| <em class="property">property </em><code class="sig-name descname">available</code><a class="headerlink" href="#proton.Receiver.available" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The available deliveries hint for this link.</p> |
| <p>The available count for a link provides a hint as to the number of |
| deliveries that might be able to be sent if sufficient credit were |
| issued by the receiving link endpoint. See <a class="reference internal" href="#proton.Sender.offered" title="proton.Sender.offered"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Sender.offered()</span></code></a> for |
| more details.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.close"> |
| <code class="sig-name descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Receiver.close" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Closes the link.</p> |
| <p>In more detail, this moves the local state of the link to the |
| <a class="reference internal" href="#proton.Receiver.LOCAL_CLOSED" title="proton.Receiver.LOCAL_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_CLOSED</span></code></a> state and triggers an detach frame (with |
| the closed flag set) to be sent to the peer. A link is fully |
| closed once both peers have detached it.</p> |
| <p>This may be called without calling <a class="reference internal" href="#proton.Receiver.open" title="proton.Receiver.open"><code class="xref py py-meth docutils literal notranslate"><span class="pre">open()</span></code></a>, in this case it |
| is equivalent to calling <a class="reference internal" href="#proton.Receiver.open" title="proton.Receiver.open"><code class="xref py py-meth docutils literal notranslate"><span class="pre">open()</span></code></a> followed by <a class="reference internal" href="#proton.Receiver.close" title="proton.Receiver.close"><code class="xref py py-meth docutils literal notranslate"><span class="pre">close()</span></code></a>.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.connection"> |
| <em class="property">property </em><code class="sig-name descname">connection</code><a class="headerlink" href="#proton.Receiver.connection" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The connection on which this link was attached.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.credit"> |
| <em class="property">property </em><code class="sig-name descname">credit</code><a class="headerlink" href="#proton.Receiver.credit" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The amount of outstanding credit on this link.</p> |
| <p>Links use a credit based flow control scheme. Every receiver |
| maintains a credit balance that corresponds to the number of |
| deliveries that the receiver can accept at any given moment. As |
| more capacity becomes available at the receiver (see |
| <a class="reference internal" href="#proton.Receiver.flow" title="proton.Receiver.flow"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Receiver.flow()</span></code></a>), it adds credit to this balance and |
| communicates the new balance to the sender. Whenever a delivery |
| is sent/received, the credit balance maintained by the link is |
| decremented by one. Once the credit balance at the sender reaches |
| zero, the sender must pause sending until more credit is obtained |
| from the receiver.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>A sending link may still be used to send deliveries even |
| if <a class="reference internal" href="#proton.Receiver.credit" title="proton.Receiver.credit"><code class="xref py py-attr docutils literal notranslate"><span class="pre">credit</span></code></a> reaches zero, however those deliveries will end |
| up being buffered by the link until enough credit is obtained from |
| the receiver to send them over the wire. In this case the balance |
| reported by <a class="reference internal" href="#proton.Receiver.credit" title="proton.Receiver.credit"><code class="xref py py-attr docutils literal notranslate"><span class="pre">credit</span></code></a> will go negative.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.current"> |
| <em class="property">property </em><code class="sig-name descname">current</code><a class="headerlink" href="#proton.Receiver.current" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The current delivery for this link.</p> |
| <p>Each link maintains a sequence of deliveries in the order |
| they were created, along with a pointer to the <em>current</em> |
| delivery. All send/recv operations on a link take place |
| on the <em>current</em> delivery. If a link has no current delivery, |
| the current delivery is automatically initialized to the |
| next delivery created on the link. Once initialized, the |
| current delivery remains the same until it is changed through |
| use of <a class="reference internal" href="#proton.Receiver.advance" title="proton.Receiver.advance"><code class="xref py py-meth docutils literal notranslate"><span class="pre">advance()</span></code></a> or until it is settled via |
| <a class="reference internal" href="#proton.Delivery.settle" title="proton.Delivery.settle"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Delivery.settle()</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.delivery"> |
| <code class="sig-name descname">delivery</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">tag</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.Receiver.delivery" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Create a delivery. Every delivery object within a |
| link must be supplied with a unique tag. Links |
| maintain a sequence of delivery object in the order that |
| they are created.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>tag</strong> (<code class="docutils literal notranslate"><span class="pre">bytes</span></code>) – Delivery tag unique for this link.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.detach"> |
| <code class="sig-name descname">detach</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Receiver.detach" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Detach this link.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.drain"> |
| <code class="sig-name descname">drain</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">n</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Receiver.drain"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Receiver.drain" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Grant credit for incoming deliveries on this receiver, and |
| set drain mode to true.</p> |
| <p>Use <a class="reference internal" href="#proton.Receiver.drain_mode" title="proton.Receiver.drain_mode"><code class="xref py py-attr docutils literal notranslate"><span class="pre">drain_mode</span></code></a> to set the drain mode explicitly.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>n</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – The amount by which to increment the link credit</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.drain_mode"> |
| <em class="property">property </em><code class="sig-name descname">drain_mode</code><a class="headerlink" href="#proton.Receiver.drain_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The drain mode on this link.</p> |
| <p>If a link is in drain mode (<code class="docutils literal notranslate"><span class="pre">True</span></code>), then the sending |
| endpoint of a link must immediately use up all available |
| credit on the link. If this is not possible, the excess |
| credit must be returned by invoking <a class="reference internal" href="#proton.Receiver.drained" title="proton.Receiver.drained"><code class="xref py py-meth docutils literal notranslate"><span class="pre">drained()</span></code></a>. Only |
| the receiving endpoint can set the drain mode.</p> |
| <p>When <code class="docutils literal notranslate"><span class="pre">False</span></code>, this link is not in drain mode.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.drained"> |
| <code class="sig-name descname">drained</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Receiver.drained" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Drain excess credit for this link.</p> |
| <p>When a link is in drain mode (see <a class="reference internal" href="#proton.Receiver.drain_mode" title="proton.Receiver.drain_mode"><code class="xref py py-attr docutils literal notranslate"><span class="pre">drain_mode</span></code></a>), the |
| sender must use all excess credit immediately, and release |
| any excess credit back to the receiver if there are no |
| deliveries available to send.</p> |
| <p>When invoked on a sending link that is in drain mode, this |
| operation will release all excess credit back to the receiver |
| and return the number of credits released back to the sender. |
| If the link is not in drain mode, this operation is a noop.</p> |
| <p>When invoked on a receiving link, this operation will return |
| and reset the number of credits the sender has released back |
| to the receiver.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The number of credits drained.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.draining"> |
| <code class="sig-name descname">draining</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Receiver.draining"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Receiver.draining" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Check if a link is currently draining. A link is defined |
| to be draining when drain mode is set to <code class="docutils literal notranslate"><span class="pre">True</span></code>, and the |
| sender still has excess credit.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if the link is currently draining, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.flow"> |
| <code class="sig-name descname">flow</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">n</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Receiver.flow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Receiver.flow" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Increases the credit issued to the remote sender by the specified number of messages.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>n</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – The credit to be issued to the remote sender.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.free"> |
| <code class="sig-name descname">free</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Receiver.free" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Free this link object. When a link object is freed, |
| all <a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a> objects associated with the session (<strong><– CHECK THIS</strong>) |
| are also freed. Freeing a link will settle any unsettled |
| deliveries on the link.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.handler"> |
| <em class="property">property </em><code class="sig-name descname">handler</code><a class="headerlink" href="#proton.Receiver.handler" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Handler for events.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Getter</dt> |
| <dd class="field-odd"><p>Get the event handler, or return <code class="docutils literal notranslate"><span class="pre">None</span></code> if no handler has been set.</p> |
| </dd> |
| <dt class="field-even">Setter</dt> |
| <dd class="field-even"><p>Set the event handler.</p> |
| </dd> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">Handler</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.is_receiver"> |
| <em class="property">property </em><code class="sig-name descname">is_receiver</code><a class="headerlink" href="#proton.Receiver.is_receiver" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if this link is a receiver, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.is_sender"> |
| <em class="property">property </em><code class="sig-name descname">is_sender</code><a class="headerlink" href="#proton.Receiver.is_sender" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if this link is a sender, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.max_message_size"> |
| <em class="property">property </em><code class="sig-name descname">max_message_size</code><a class="headerlink" href="#proton.Receiver.max_message_size" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The maximum message size for this link. A zero value means the |
| size is unlimited.</p> |
| <div class="admonition warning"> |
| <p class="admonition-title">Warning</p> |
| <p><strong>Unsettled API</strong></p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">long</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.name"> |
| <em class="property">property </em><code class="sig-name descname">name</code><a class="headerlink" href="#proton.Receiver.name" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The name of the link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.next"> |
| <code class="sig-name descname">next</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mask</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.Receiver.next" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Retrieve the next link that matches the given state mask.</p> |
| <p>When used with <a class="reference internal" href="#proton.Connection.link_head" title="proton.Connection.link_head"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Connection.link_head()</span></code></a>, the application |
| can access all links on the connection that match the given |
| state. See <a class="reference internal" href="#proton.Connection.link_head" title="proton.Connection.link_head"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Connection.link_head()</span></code></a> for a description of |
| match behavior.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>mask</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – State mask to match</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>The next link that matches the given state mask, or |
| <code class="docutils literal notranslate"><span class="pre">None</span></code> if no link matches.</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.open"> |
| <code class="sig-name descname">open</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Receiver.open" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Opens the link.</p> |
| <p>In more detail, this moves the local state of the link to the |
| <a class="reference internal" href="#proton.Receiver.LOCAL_ACTIVE" title="proton.Receiver.LOCAL_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_ACTIVE</span></code></a> state and triggers an attach frame to be |
| sent to the peer. A link is fully active once both peers have |
| attached it.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.properties"> |
| <em class="property">property </em><code class="sig-name descname">properties</code><a class="headerlink" href="#proton.Receiver.properties" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Link properties as a dictionary of key/values. The AMQP 1.0 |
| specification restricts this dictionary to have keys that are only |
| <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> types. It is possible to use the special <code class="docutils literal notranslate"><span class="pre">dict</span></code> |
| subclass <a class="reference internal" href="#proton.PropertyDict" title="proton.PropertyDict"><code class="xref py py-class docutils literal notranslate"><span class="pre">PropertyDict</span></code></a> which will by default enforce this |
| restrictions on construction. In addition, if strings type are used, |
| this will silently convert them into symbols.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">dict</span></code> containing <code class="xref py py-class docutils literal notranslate"><span class="pre">symbol`</span></code> keys.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.queued"> |
| <em class="property">property </em><code class="sig-name descname">queued</code><a class="headerlink" href="#proton.Receiver.queued" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The number of queued deliveries for a link.</p> |
| <p>Links may queue deliveries for a number of reasons, for example |
| there may be insufficient credit to send them to the receiver (see |
| <a class="reference internal" href="#proton.Receiver.credit" title="proton.Receiver.credit"><code class="xref py py-meth docutils literal notranslate"><span class="pre">credit()</span></code></a>), or they simply may not have yet had a chance to |
| be written to the wire. This operation will return the number of |
| queued deliveries on a link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.rcv_settle_mode"> |
| <em class="property">property </em><code class="sig-name descname">rcv_settle_mode</code><a class="headerlink" href="#proton.Receiver.rcv_settle_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local receiver settle mode for this link. One of |
| <a class="reference internal" href="#proton.Receiver.RCV_FIRST" title="proton.Receiver.RCV_FIRST"><code class="xref py py-const docutils literal notranslate"><span class="pre">RCV_FIRST</span></code></a> or <a class="reference internal" href="#proton.Receiver.RCV_SECOND" title="proton.Receiver.RCV_SECOND"><code class="xref py py-const docutils literal notranslate"><span class="pre">RCV_SECOND</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.recv"> |
| <code class="sig-name descname">recv</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">limit</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Receiver.recv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Receiver.recv" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Receive message data for the current delivery on this receiver.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>The link API can be used to stream large messages across |
| the network, so just because there is no data to read does not |
| imply the message is complete. To ensure the entirety of the |
| message data has been read, either invoke <a class="reference internal" href="#proton.Receiver.recv" title="proton.Receiver.recv"><code class="xref py py-meth docutils literal notranslate"><span class="pre">recv()</span></code></a> until |
| <code class="docutils literal notranslate"><span class="pre">None</span></code> is returned.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>limit</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – the max data size to receive of this message</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>The received message data, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if the message |
| has been completely received.</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">binary</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><ul class="simple"> |
| <li><p><a class="reference internal" href="#proton.Timeout" title="proton.Timeout"><code class="xref py py-class docutils literal notranslate"><span class="pre">Timeout</span></code></a> if timed out</p></li> |
| <li><p><a class="reference internal" href="#proton.Interrupt" title="proton.Interrupt"><code class="xref py py-class docutils literal notranslate"><span class="pre">Interrupt</span></code></a> if interrupted</p></li> |
| <li><p><a class="reference internal" href="#proton.LinkException" title="proton.LinkException"><code class="xref py py-class docutils literal notranslate"><span class="pre">LinkException</span></code></a> for all other exceptions</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.remote_condition"> |
| <em class="property">property </em><code class="sig-name descname">remote_condition</code><a class="headerlink" href="#proton.Receiver.remote_condition" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote condition associated with the connection endpoint. |
| See <a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a> for more information.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.remote_max_message_size"> |
| <em class="property">property </em><code class="sig-name descname">remote_max_message_size</code><a class="headerlink" href="#proton.Receiver.remote_max_message_size" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the remote view of the maximum message size for this link.</p> |
| <div class="admonition warning"> |
| <p class="admonition-title">Warning</p> |
| <p><strong>Unsettled API</strong></p> |
| </div> |
| <p>A zero value means the size is unlimited.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">long</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.remote_properties"> |
| <em class="property">property </em><code class="sig-name descname">remote_properties</code><a class="headerlink" href="#proton.Receiver.remote_properties" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The properties specified by the remote peer for this link.</p> |
| <p>This operation will return a <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object that |
| is valid until the link object is freed. This <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> |
| object will be empty until the remote link is opened as |
| indicated by the <a class="reference internal" href="#proton.Receiver.REMOTE_ACTIVE" title="proton.Receiver.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> flag.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.remote_rcv_settle_mode"> |
| <em class="property">property </em><code class="sig-name descname">remote_rcv_settle_mode</code><a class="headerlink" href="#proton.Receiver.remote_rcv_settle_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote receiver settle mode for this link. One of |
| <a class="reference internal" href="#proton.Receiver.RCV_FIRST" title="proton.Receiver.RCV_FIRST"><code class="xref py py-const docutils literal notranslate"><span class="pre">RCV_FIRST</span></code></a> or <a class="reference internal" href="#proton.Receiver.RCV_SECOND" title="proton.Receiver.RCV_SECOND"><code class="xref py py-const docutils literal notranslate"><span class="pre">RCV_SECOND</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.remote_snd_settle_mode"> |
| <em class="property">property </em><code class="sig-name descname">remote_snd_settle_mode</code><a class="headerlink" href="#proton.Receiver.remote_snd_settle_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote sender settle mode for this link. One of |
| <a class="reference internal" href="#proton.Receiver.SND_UNSETTLED" title="proton.Receiver.SND_UNSETTLED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_UNSETTLED</span></code></a>, <a class="reference internal" href="#proton.Receiver.SND_SETTLED" title="proton.Receiver.SND_SETTLED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_SETTLED</span></code></a> or |
| <a class="reference internal" href="#proton.Receiver.SND_MIXED" title="proton.Receiver.SND_MIXED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_MIXED</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.remote_source"> |
| <em class="property">property </em><code class="sig-name descname">remote_source</code><a class="headerlink" href="#proton.Receiver.remote_source" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The source of the link as described by the remote peer. The |
| returned object is valid until the link is freed. The remote |
| <a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a> object will be empty until the link is |
| remotely opened as indicated by the <a class="reference internal" href="#proton.Receiver.REMOTE_ACTIVE" title="proton.Receiver.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> |
| flag.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.remote_target"> |
| <em class="property">property </em><code class="sig-name descname">remote_target</code><a class="headerlink" href="#proton.Receiver.remote_target" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The target of the link as described by the remote peer. The |
| returned object is valid until the link is freed. The remote |
| <a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a> object will be empty until the link is |
| remotely opened as indicated by the <a class="reference internal" href="#proton.Receiver.REMOTE_ACTIVE" title="proton.Receiver.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> |
| flag.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.session"> |
| <em class="property">property </em><code class="sig-name descname">session</code><a class="headerlink" href="#proton.Receiver.session" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The parent session for this link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.snd_settle_mode"> |
| <em class="property">property </em><code class="sig-name descname">snd_settle_mode</code><a class="headerlink" href="#proton.Receiver.snd_settle_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local sender settle mode for this link. One of |
| <a class="reference internal" href="#proton.Receiver.SND_UNSETTLED" title="proton.Receiver.SND_UNSETTLED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_UNSETTLED</span></code></a>, <a class="reference internal" href="#proton.Receiver.SND_SETTLED" title="proton.Receiver.SND_SETTLED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_SETTLED</span></code></a> or |
| <a class="reference internal" href="#proton.Receiver.SND_MIXED" title="proton.Receiver.SND_MIXED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_MIXED</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.source"> |
| <em class="property">property </em><code class="sig-name descname">source</code><a class="headerlink" href="#proton.Receiver.source" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The source of the link as described by the local peer. The |
| returned object is valid until the link is freed.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.state"> |
| <em class="property">property </em><code class="sig-name descname">state</code><a class="headerlink" href="#proton.Receiver.state" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The state of the link as a bit field. The state has a local |
| and a remote component. Each of these can be in one of three |
| states: <code class="docutils literal notranslate"><span class="pre">UNINIT</span></code>, <code class="docutils literal notranslate"><span class="pre">ACTIVE</span></code> or <code class="docutils literal notranslate"><span class="pre">CLOSED</span></code>. These can be |
| tested by masking against <a class="reference internal" href="#proton.Receiver.LOCAL_UNINIT" title="proton.Receiver.LOCAL_UNINIT"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_UNINIT</span></code></a>, |
| <a class="reference internal" href="#proton.Receiver.LOCAL_ACTIVE" title="proton.Receiver.LOCAL_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_ACTIVE</span></code></a>, <a class="reference internal" href="#proton.Receiver.LOCAL_CLOSED" title="proton.Receiver.LOCAL_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_CLOSED</span></code></a>, |
| <a class="reference internal" href="#proton.Receiver.REMOTE_UNINIT" title="proton.Receiver.REMOTE_UNINIT"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_UNINIT</span></code></a>, <a class="reference internal" href="#proton.Receiver.REMOTE_ACTIVE" title="proton.Receiver.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> and |
| <a class="reference internal" href="#proton.Receiver.REMOTE_CLOSED" title="proton.Receiver.REMOTE_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_CLOSED</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.target"> |
| <em class="property">property </em><code class="sig-name descname">target</code><a class="headerlink" href="#proton.Receiver.target" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The target of the link as described by the local peer. The |
| returned object is valid until the link is freed.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.transport"> |
| <em class="property">property </em><code class="sig-name descname">transport</code><a class="headerlink" href="#proton.Receiver.transport" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The transport bound to the connection on which this link was attached.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Transport" title="proton.Transport"><code class="xref py py-class docutils literal notranslate"><span class="pre">Transport</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Receiver.unsettled"> |
| <em class="property">property </em><code class="sig-name descname">unsettled</code><a class="headerlink" href="#proton.Receiver.unsettled" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The number of unsettled deliveries for this link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.SASL"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">SASL</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">transport</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SASL"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SASL" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._wrapper.Wrapper</span></code></p> |
| <p>The SASL layer is responsible for establishing an authenticated |
| and/or encrypted tunnel over which AMQP frames are passed between |
| peers. The peer acting as the SASL Client must provide |
| authentication credentials. The peer acting as the SASL Server must |
| provide authentication against the received credentials.</p> |
| <dl class="py attribute"> |
| <dt id="proton.SASL.AUTH"> |
| <code class="sig-name descname">AUTH</code><em class="property"> = 1</em><a class="headerlink" href="#proton.SASL.AUTH" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SASL.OK"> |
| <code class="sig-name descname">OK</code><em class="property"> = 0</em><a class="headerlink" href="#proton.SASL.OK" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SASL.PERM"> |
| <code class="sig-name descname">PERM</code><em class="property"> = 3</em><a class="headerlink" href="#proton.SASL.PERM" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SASL.SYS"> |
| <code class="sig-name descname">SYS</code><em class="property"> = 2</em><a class="headerlink" href="#proton.SASL.SYS" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SASL.TEMP"> |
| <code class="sig-name descname">TEMP</code><em class="property"> = 4</em><a class="headerlink" href="#proton.SASL.TEMP" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SASL.allow_insecure_mechs"> |
| <em class="property">property </em><code class="sig-name descname">allow_insecure_mechs</code><a class="headerlink" href="#proton.SASL.allow_insecure_mechs" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Allow unencrypted cleartext passwords (PLAIN mech)</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SASL.allowed_mechs"> |
| <code class="sig-name descname">allowed_mechs</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mechs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SASL.allowed_mechs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SASL.allowed_mechs" title="Permalink to this definition">¶</a></dt> |
| <dd><p>SASL mechanisms that are to be considered for authentication.</p> |
| <p>This can be used on either the client or the server to restrict |
| the SASL mechanisms that may be used to the mechanisms on the list.</p> |
| <p><strong>NOTE:</strong> By default the <code class="docutils literal notranslate"><span class="pre">GSSAPI</span></code> and <code class="docutils literal notranslate"><span class="pre">GSS-SPNEGO</span></code> mechanisms |
| are not enabled for clients. This is because these mechanisms have |
| the problematic behaviour of ‘capturing’ the client whenever they |
| are installed so that they will be used by the client if offered by |
| the server even if the client can’t successfully authenticate this |
| way. This can lead to some very hard to debug failures.</p> |
| <p><strong>NOTE:</strong> The <code class="docutils literal notranslate"><span class="pre">GSSAPI</span></code> or <code class="docutils literal notranslate"><span class="pre">GSS-SPNEGO</span></code> mechanisms need to be |
| explicitly enabled if they are required (together with any other |
| required mechanisms).</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>mechs</strong> (<em>string</em>) – A list of mechanisms that are allowed for authentication, |
| either a string containing a space-separated list of mechs |
| <code class="docutils literal notranslate"><span class="pre">"mech1</span> <span class="pre">mech2</span> <span class="pre">..."</span></code>, or a Python list of strings |
| <code class="docutils literal notranslate"><span class="pre">["mech1",</span> <span class="pre">"mech2",</span> <span class="pre">...]</span></code>.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SASL.config_name"> |
| <code class="sig-name descname">config_name</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SASL.config_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SASL.config_name" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Set the SASL configuration name. This is used to construct the SASL |
| configuration filename. In the current implementation <code class="docutils literal notranslate"><span class="pre">".conf"</span></code> is |
| added to the name and the file is looked for in the configuration |
| directory.</p> |
| <p>If not set it will default to <code class="docutils literal notranslate"><span class="pre">"proton-server"</span></code> for a sasl server |
| and <code class="docutils literal notranslate"><span class="pre">"proton-client"</span></code> for a client.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>name</strong> (<em>string</em>) – The configuration name.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SASL.config_path"> |
| <code class="sig-name descname">config_path</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">path</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SASL.config_path"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SASL.config_path" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Set the SASL configuration path. This is used to tell SASL where |
| to look for the configuration file. In the current implementation |
| it can be a colon separated list of directories.</p> |
| <p>The environment variable <code class="docutils literal notranslate"><span class="pre">PN_SASL_CONFIG_PATH</span></code> can also be used |
| to set this path, but if both methods are used then this |
| <a class="reference internal" href="#proton.SASL.config_path" title="proton.SASL.config_path"><code class="xref py py-meth docutils literal notranslate"><span class="pre">config_path()</span></code></a> will take precedence.</p> |
| <p>If not set, the underlying implementation default will be used.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>path</strong> (<em>string</em>) – The configuration path, may contain colon-separated list |
| if more than one path is specified.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SASL.done"> |
| <code class="sig-name descname">done</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">outcome</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SASL.done"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SASL.done" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Set the outcome of SASL negotiation. Used by the server to set the |
| result of the negotiation process.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SASL.extended"> |
| <em class="property">static </em><code class="sig-name descname">extended</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SASL.extended"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SASL.extended" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Check for support of extended SASL negotiation.</p> |
| <p>All implementations of Proton support <code class="docutils literal notranslate"><span class="pre">ANONYMOUS</span></code> and <code class="docutils literal notranslate"><span class="pre">EXTERNAL</span></code> on both |
| client and server sides and <code class="docutils literal notranslate"><span class="pre">PLAIN</span></code> on the client side.</p> |
| <p>Extended SASL implementations use an external library (Cyrus SASL) |
| to support other mechanisms beyond these basic ones.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if we support extended SASL negotiation, <code class="docutils literal notranslate"><span class="pre">False</span></code> if |
| we only support basic negotiation.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SASL.mech"> |
| <em class="property">property </em><code class="sig-name descname">mech</code><a class="headerlink" href="#proton.SASL.mech" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return the selected SASL mechanism.</p> |
| <p>The returned value is only reliable after the <code class="docutils literal notranslate"><span class="pre">PN_TRANSPORT_AUTHENTICATED</span></code> |
| event has been received.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p>The authentication mechanism selected by the SASL layer.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SASL.outcome"> |
| <em class="property">property </em><code class="sig-name descname">outcome</code><a class="headerlink" href="#proton.SASL.outcome" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Retrieve the outcome of SASL negotiation.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><ul class="simple"> |
| <li><p><code class="docutils literal notranslate"><span class="pre">None</span></code> if no negotiation has taken place.</p></li> |
| <li><p>Otherwise the outcome of the negotiation.</p></li> |
| </ul> |
| </p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SASL.user"> |
| <em class="property">property </em><code class="sig-name descname">user</code><a class="headerlink" href="#proton.SASL.user" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Retrieve the authenticated user. This is usually used at the the |
| server end to find the name of the authenticated user.</p> |
| <p>If <a class="reference internal" href="#proton.SASL.outcome" title="proton.SASL.outcome"><code class="xref py py-meth docutils literal notranslate"><span class="pre">outcome()</span></code></a> returns a value other than <a class="reference internal" href="#proton.SASL.OK" title="proton.SASL.OK"><code class="xref py py-const docutils literal notranslate"><span class="pre">OK</span></code></a>, then |
| there will be no user to return. The returned value is only reliable |
| after the <code class="docutils literal notranslate"><span class="pre">PN_TRANSPORT_AUTHENTICATED</span></code> event has been received.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><ul class="simple"> |
| <li><p>If the SASL layer was not negotiated then <code class="docutils literal notranslate"><span class="pre">0</span></code> is returned.</p></li> |
| <li><p>If the <code class="docutils literal notranslate"><span class="pre">ANONYMOUS</span></code> mechanism is used then the user will be |
| <code class="docutils literal notranslate"><span class="pre">"anonymous"</span></code>.</p></li> |
| <li><p>Otherwise a string containing the user is |
| returned.</p></li> |
| </ul> |
| </p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Sender"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Sender</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">impl</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Sender"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Sender" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._endpoints.Link</span></code></p> |
| <p>A link over which messages are sent.</p> |
| <dl class="py attribute"> |
| <dt id="proton.Sender.LOCAL_ACTIVE"> |
| <code class="sig-name descname">LOCAL_ACTIVE</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Sender.LOCAL_ACTIVE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Sender.LOCAL_CLOSED"> |
| <code class="sig-name descname">LOCAL_CLOSED</code><em class="property"> = 4</em><a class="headerlink" href="#proton.Sender.LOCAL_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Sender.LOCAL_UNINIT"> |
| <code class="sig-name descname">LOCAL_UNINIT</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Sender.LOCAL_UNINIT" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Sender.RCV_FIRST"> |
| <code class="sig-name descname">RCV_FIRST</code><em class="property"> = 0</em><a class="headerlink" href="#proton.Sender.RCV_FIRST" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Sender.RCV_SECOND"> |
| <code class="sig-name descname">RCV_SECOND</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Sender.RCV_SECOND" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Sender.REMOTE_ACTIVE"> |
| <code class="sig-name descname">REMOTE_ACTIVE</code><em class="property"> = 16</em><a class="headerlink" href="#proton.Sender.REMOTE_ACTIVE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Sender.REMOTE_CLOSED"> |
| <code class="sig-name descname">REMOTE_CLOSED</code><em class="property"> = 32</em><a class="headerlink" href="#proton.Sender.REMOTE_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Sender.REMOTE_UNINIT"> |
| <code class="sig-name descname">REMOTE_UNINIT</code><em class="property"> = 8</em><a class="headerlink" href="#proton.Sender.REMOTE_UNINIT" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Sender.SND_MIXED"> |
| <code class="sig-name descname">SND_MIXED</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Sender.SND_MIXED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Sender.SND_SETTLED"> |
| <code class="sig-name descname">SND_SETTLED</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Sender.SND_SETTLED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Sender.SND_UNSETTLED"> |
| <code class="sig-name descname">SND_UNSETTLED</code><em class="property"> = 0</em><a class="headerlink" href="#proton.Sender.SND_UNSETTLED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.advance"> |
| <code class="sig-name descname">advance</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Sender.advance" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Advance the current delivery of this link to the next delivery.</p> |
| <p>For sending links this operation is used to finish sending message |
| data for the current outgoing delivery and move on to the next |
| outgoing delivery (if any).</p> |
| <p>For receiving links, this operation is used to finish accessing |
| message data from the current incoming delivery and move on to the |
| next incoming delivery (if any).</p> |
| <p>Each link maintains a sequence of deliveries in the order they were |
| created, along with a pointer to the <em>current</em> delivery. The |
| <a class="reference internal" href="#proton.Sender.advance" title="proton.Sender.advance"><code class="xref py py-meth docutils literal notranslate"><span class="pre">advance()</span></code></a> operation will modify the <em>current</em> delivery on the |
| link to point to the next delivery in the sequence. If there is no |
| next delivery in the sequence, the current delivery will be set to |
| <code class="docutils literal notranslate"><span class="pre">NULL</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if the value of the current delivery changed (even |
| if it was set to <code class="docutils literal notranslate"><span class="pre">NULL</span></code>, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.available"> |
| <em class="property">property </em><code class="sig-name descname">available</code><a class="headerlink" href="#proton.Sender.available" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The available deliveries hint for this link.</p> |
| <p>The available count for a link provides a hint as to the number of |
| deliveries that might be able to be sent if sufficient credit were |
| issued by the receiving link endpoint. See <a class="reference internal" href="#proton.Sender.offered" title="proton.Sender.offered"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Sender.offered()</span></code></a> for |
| more details.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.close"> |
| <code class="sig-name descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Sender.close" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Closes the link.</p> |
| <p>In more detail, this moves the local state of the link to the |
| <a class="reference internal" href="#proton.Sender.LOCAL_CLOSED" title="proton.Sender.LOCAL_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_CLOSED</span></code></a> state and triggers an detach frame (with |
| the closed flag set) to be sent to the peer. A link is fully |
| closed once both peers have detached it.</p> |
| <p>This may be called without calling <a class="reference internal" href="#proton.Sender.open" title="proton.Sender.open"><code class="xref py py-meth docutils literal notranslate"><span class="pre">open()</span></code></a>, in this case it |
| is equivalent to calling <a class="reference internal" href="#proton.Sender.open" title="proton.Sender.open"><code class="xref py py-meth docutils literal notranslate"><span class="pre">open()</span></code></a> followed by <a class="reference internal" href="#proton.Sender.close" title="proton.Sender.close"><code class="xref py py-meth docutils literal notranslate"><span class="pre">close()</span></code></a>.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.connection"> |
| <em class="property">property </em><code class="sig-name descname">connection</code><a class="headerlink" href="#proton.Sender.connection" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The connection on which this link was attached.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.credit"> |
| <em class="property">property </em><code class="sig-name descname">credit</code><a class="headerlink" href="#proton.Sender.credit" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The amount of outstanding credit on this link.</p> |
| <p>Links use a credit based flow control scheme. Every receiver |
| maintains a credit balance that corresponds to the number of |
| deliveries that the receiver can accept at any given moment. As |
| more capacity becomes available at the receiver (see |
| <a class="reference internal" href="#proton.Receiver.flow" title="proton.Receiver.flow"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Receiver.flow()</span></code></a>), it adds credit to this balance and |
| communicates the new balance to the sender. Whenever a delivery |
| is sent/received, the credit balance maintained by the link is |
| decremented by one. Once the credit balance at the sender reaches |
| zero, the sender must pause sending until more credit is obtained |
| from the receiver.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>A sending link may still be used to send deliveries even |
| if <a class="reference internal" href="#proton.Sender.credit" title="proton.Sender.credit"><code class="xref py py-attr docutils literal notranslate"><span class="pre">credit</span></code></a> reaches zero, however those deliveries will end |
| up being buffered by the link until enough credit is obtained from |
| the receiver to send them over the wire. In this case the balance |
| reported by <a class="reference internal" href="#proton.Sender.credit" title="proton.Sender.credit"><code class="xref py py-attr docutils literal notranslate"><span class="pre">credit</span></code></a> will go negative.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.current"> |
| <em class="property">property </em><code class="sig-name descname">current</code><a class="headerlink" href="#proton.Sender.current" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The current delivery for this link.</p> |
| <p>Each link maintains a sequence of deliveries in the order |
| they were created, along with a pointer to the <em>current</em> |
| delivery. All send/recv operations on a link take place |
| on the <em>current</em> delivery. If a link has no current delivery, |
| the current delivery is automatically initialized to the |
| next delivery created on the link. Once initialized, the |
| current delivery remains the same until it is changed through |
| use of <a class="reference internal" href="#proton.Sender.advance" title="proton.Sender.advance"><code class="xref py py-meth docutils literal notranslate"><span class="pre">advance()</span></code></a> or until it is settled via |
| <a class="reference internal" href="#proton.Delivery.settle" title="proton.Delivery.settle"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Delivery.settle()</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.delivery"> |
| <code class="sig-name descname">delivery</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">tag</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.Sender.delivery" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Create a delivery. Every delivery object within a |
| link must be supplied with a unique tag. Links |
| maintain a sequence of delivery object in the order that |
| they are created.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>tag</strong> (<code class="docutils literal notranslate"><span class="pre">bytes</span></code>) – Delivery tag unique for this link.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.delivery_tag"> |
| <code class="sig-name descname">delivery_tag</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Sender.delivery_tag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Sender.delivery_tag" title="Permalink to this definition">¶</a></dt> |
| <dd><p><strong>HELP!</strong> I have no idea what is going on with this! |
| <a class="reference internal" href="#proton.Link.next" title="proton.Link.next"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Link.next()</span></code></a> returns a Link, not a Delivery.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.detach"> |
| <code class="sig-name descname">detach</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Sender.detach" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Detach this link.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.drain_mode"> |
| <em class="property">property </em><code class="sig-name descname">drain_mode</code><a class="headerlink" href="#proton.Sender.drain_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The drain mode on this link.</p> |
| <p>If a link is in drain mode (<code class="docutils literal notranslate"><span class="pre">True</span></code>), then the sending |
| endpoint of a link must immediately use up all available |
| credit on the link. If this is not possible, the excess |
| credit must be returned by invoking <a class="reference internal" href="#proton.Sender.drained" title="proton.Sender.drained"><code class="xref py py-meth docutils literal notranslate"><span class="pre">drained()</span></code></a>. Only |
| the receiving endpoint can set the drain mode.</p> |
| <p>When <code class="docutils literal notranslate"><span class="pre">False</span></code>, this link is not in drain mode.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.drained"> |
| <code class="sig-name descname">drained</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Sender.drained" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Drain excess credit for this link.</p> |
| <p>When a link is in drain mode (see <a class="reference internal" href="#proton.Sender.drain_mode" title="proton.Sender.drain_mode"><code class="xref py py-attr docutils literal notranslate"><span class="pre">drain_mode</span></code></a>), the |
| sender must use all excess credit immediately, and release |
| any excess credit back to the receiver if there are no |
| deliveries available to send.</p> |
| <p>When invoked on a sending link that is in drain mode, this |
| operation will release all excess credit back to the receiver |
| and return the number of credits released back to the sender. |
| If the link is not in drain mode, this operation is a noop.</p> |
| <p>When invoked on a receiving link, this operation will return |
| and reset the number of credits the sender has released back |
| to the receiver.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The number of credits drained.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.free"> |
| <code class="sig-name descname">free</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Sender.free" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Free this link object. When a link object is freed, |
| all <a class="reference internal" href="#proton.Delivery" title="proton.Delivery"><code class="xref py py-class docutils literal notranslate"><span class="pre">Delivery</span></code></a> objects associated with the session (<strong><– CHECK THIS</strong>) |
| are also freed. Freeing a link will settle any unsettled |
| deliveries on the link.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.handler"> |
| <em class="property">property </em><code class="sig-name descname">handler</code><a class="headerlink" href="#proton.Sender.handler" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Handler for events.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Getter</dt> |
| <dd class="field-odd"><p>Get the event handler, or return <code class="docutils literal notranslate"><span class="pre">None</span></code> if no handler has been set.</p> |
| </dd> |
| <dt class="field-even">Setter</dt> |
| <dd class="field-even"><p>Set the event handler.</p> |
| </dd> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">Handler</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.is_receiver"> |
| <em class="property">property </em><code class="sig-name descname">is_receiver</code><a class="headerlink" href="#proton.Sender.is_receiver" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if this link is a receiver, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.is_sender"> |
| <em class="property">property </em><code class="sig-name descname">is_sender</code><a class="headerlink" href="#proton.Sender.is_sender" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if this link is a sender, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.max_message_size"> |
| <em class="property">property </em><code class="sig-name descname">max_message_size</code><a class="headerlink" href="#proton.Sender.max_message_size" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The maximum message size for this link. A zero value means the |
| size is unlimited.</p> |
| <div class="admonition warning"> |
| <p class="admonition-title">Warning</p> |
| <p><strong>Unsettled API</strong></p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">long</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.name"> |
| <em class="property">property </em><code class="sig-name descname">name</code><a class="headerlink" href="#proton.Sender.name" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The name of the link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.next"> |
| <code class="sig-name descname">next</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mask</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.Sender.next" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Retrieve the next link that matches the given state mask.</p> |
| <p>When used with <a class="reference internal" href="#proton.Connection.link_head" title="proton.Connection.link_head"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Connection.link_head()</span></code></a>, the application |
| can access all links on the connection that match the given |
| state. See <a class="reference internal" href="#proton.Connection.link_head" title="proton.Connection.link_head"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Connection.link_head()</span></code></a> for a description of |
| match behavior.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>mask</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – State mask to match</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>The next link that matches the given state mask, or |
| <code class="docutils literal notranslate"><span class="pre">None</span></code> if no link matches.</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Link" title="proton.Link"><code class="xref py py-class docutils literal notranslate"><span class="pre">Link</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.offered"> |
| <code class="sig-name descname">offered</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">n</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Sender.offered"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Sender.offered" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Signal the availability of deliveries for this Sender.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>n</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – Credit the number of deliveries potentially |
| available for transfer.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.open"> |
| <code class="sig-name descname">open</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Sender.open" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Opens the link.</p> |
| <p>In more detail, this moves the local state of the link to the |
| <a class="reference internal" href="#proton.Sender.LOCAL_ACTIVE" title="proton.Sender.LOCAL_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_ACTIVE</span></code></a> state and triggers an attach frame to be |
| sent to the peer. A link is fully active once both peers have |
| attached it.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.properties"> |
| <em class="property">property </em><code class="sig-name descname">properties</code><a class="headerlink" href="#proton.Sender.properties" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Link properties as a dictionary of key/values. The AMQP 1.0 |
| specification restricts this dictionary to have keys that are only |
| <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> types. It is possible to use the special <code class="docutils literal notranslate"><span class="pre">dict</span></code> |
| subclass <a class="reference internal" href="#proton.PropertyDict" title="proton.PropertyDict"><code class="xref py py-class docutils literal notranslate"><span class="pre">PropertyDict</span></code></a> which will by default enforce this |
| restrictions on construction. In addition, if strings type are used, |
| this will silently convert them into symbols.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">dict</span></code> containing <code class="xref py py-class docutils literal notranslate"><span class="pre">symbol`</span></code> keys.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.queued"> |
| <em class="property">property </em><code class="sig-name descname">queued</code><a class="headerlink" href="#proton.Sender.queued" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The number of queued deliveries for a link.</p> |
| <p>Links may queue deliveries for a number of reasons, for example |
| there may be insufficient credit to send them to the receiver (see |
| <a class="reference internal" href="#proton.Sender.credit" title="proton.Sender.credit"><code class="xref py py-meth docutils literal notranslate"><span class="pre">credit()</span></code></a>), or they simply may not have yet had a chance to |
| be written to the wire. This operation will return the number of |
| queued deliveries on a link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.rcv_settle_mode"> |
| <em class="property">property </em><code class="sig-name descname">rcv_settle_mode</code><a class="headerlink" href="#proton.Sender.rcv_settle_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local receiver settle mode for this link. One of |
| <a class="reference internal" href="#proton.Sender.RCV_FIRST" title="proton.Sender.RCV_FIRST"><code class="xref py py-const docutils literal notranslate"><span class="pre">RCV_FIRST</span></code></a> or <a class="reference internal" href="#proton.Sender.RCV_SECOND" title="proton.Sender.RCV_SECOND"><code class="xref py py-const docutils literal notranslate"><span class="pre">RCV_SECOND</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.remote_condition"> |
| <em class="property">property </em><code class="sig-name descname">remote_condition</code><a class="headerlink" href="#proton.Sender.remote_condition" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote condition associated with the connection endpoint. |
| See <a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a> for more information.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.remote_max_message_size"> |
| <em class="property">property </em><code class="sig-name descname">remote_max_message_size</code><a class="headerlink" href="#proton.Sender.remote_max_message_size" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the remote view of the maximum message size for this link.</p> |
| <div class="admonition warning"> |
| <p class="admonition-title">Warning</p> |
| <p><strong>Unsettled API</strong></p> |
| </div> |
| <p>A zero value means the size is unlimited.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">long</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.remote_properties"> |
| <em class="property">property </em><code class="sig-name descname">remote_properties</code><a class="headerlink" href="#proton.Sender.remote_properties" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The properties specified by the remote peer for this link.</p> |
| <p>This operation will return a <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> object that |
| is valid until the link object is freed. This <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> |
| object will be empty until the remote link is opened as |
| indicated by the <a class="reference internal" href="#proton.Sender.REMOTE_ACTIVE" title="proton.Sender.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> flag.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.remote_rcv_settle_mode"> |
| <em class="property">property </em><code class="sig-name descname">remote_rcv_settle_mode</code><a class="headerlink" href="#proton.Sender.remote_rcv_settle_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote receiver settle mode for this link. One of |
| <a class="reference internal" href="#proton.Sender.RCV_FIRST" title="proton.Sender.RCV_FIRST"><code class="xref py py-const docutils literal notranslate"><span class="pre">RCV_FIRST</span></code></a> or <a class="reference internal" href="#proton.Sender.RCV_SECOND" title="proton.Sender.RCV_SECOND"><code class="xref py py-const docutils literal notranslate"><span class="pre">RCV_SECOND</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.remote_snd_settle_mode"> |
| <em class="property">property </em><code class="sig-name descname">remote_snd_settle_mode</code><a class="headerlink" href="#proton.Sender.remote_snd_settle_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote sender settle mode for this link. One of |
| <a class="reference internal" href="#proton.Sender.SND_UNSETTLED" title="proton.Sender.SND_UNSETTLED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_UNSETTLED</span></code></a>, <a class="reference internal" href="#proton.Sender.SND_SETTLED" title="proton.Sender.SND_SETTLED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_SETTLED</span></code></a> or |
| <a class="reference internal" href="#proton.Sender.SND_MIXED" title="proton.Sender.SND_MIXED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_MIXED</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.remote_source"> |
| <em class="property">property </em><code class="sig-name descname">remote_source</code><a class="headerlink" href="#proton.Sender.remote_source" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The source of the link as described by the remote peer. The |
| returned object is valid until the link is freed. The remote |
| <a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a> object will be empty until the link is |
| remotely opened as indicated by the <a class="reference internal" href="#proton.Sender.REMOTE_ACTIVE" title="proton.Sender.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> |
| flag.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.remote_target"> |
| <em class="property">property </em><code class="sig-name descname">remote_target</code><a class="headerlink" href="#proton.Sender.remote_target" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The target of the link as described by the remote peer. The |
| returned object is valid until the link is freed. The remote |
| <a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a> object will be empty until the link is |
| remotely opened as indicated by the <a class="reference internal" href="#proton.Sender.REMOTE_ACTIVE" title="proton.Sender.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> |
| flag.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.send"> |
| <code class="sig-name descname">send</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em>, <em class="sig-param"><span class="n">tag</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Sender.send"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Sender.send" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method to send objects as message content.</p> |
| <p>Send specified object over this sender; the object is expected to |
| have a <code class="docutils literal notranslate"><span class="pre">send()</span></code> method on it that takes the sender and an optional |
| tag as arguments.</p> |
| <p>Where the object is a <a class="reference internal" href="#proton.Message" title="proton.Message"><code class="xref py py-class docutils literal notranslate"><span class="pre">Message</span></code></a>, this will send the message over |
| this link, creating a new delivery for the purpose.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.session"> |
| <em class="property">property </em><code class="sig-name descname">session</code><a class="headerlink" href="#proton.Sender.session" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The parent session for this link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.snd_settle_mode"> |
| <em class="property">property </em><code class="sig-name descname">snd_settle_mode</code><a class="headerlink" href="#proton.Sender.snd_settle_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The local sender settle mode for this link. One of |
| <a class="reference internal" href="#proton.Sender.SND_UNSETTLED" title="proton.Sender.SND_UNSETTLED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_UNSETTLED</span></code></a>, <a class="reference internal" href="#proton.Sender.SND_SETTLED" title="proton.Sender.SND_SETTLED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_SETTLED</span></code></a> or |
| <a class="reference internal" href="#proton.Sender.SND_MIXED" title="proton.Sender.SND_MIXED"><code class="xref py py-const docutils literal notranslate"><span class="pre">SND_MIXED</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.source"> |
| <em class="property">property </em><code class="sig-name descname">source</code><a class="headerlink" href="#proton.Sender.source" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The source of the link as described by the local peer. The |
| returned object is valid until the link is freed.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.state"> |
| <em class="property">property </em><code class="sig-name descname">state</code><a class="headerlink" href="#proton.Sender.state" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The state of the link as a bit field. The state has a local |
| and a remote component. Each of these can be in one of three |
| states: <code class="docutils literal notranslate"><span class="pre">UNINIT</span></code>, <code class="docutils literal notranslate"><span class="pre">ACTIVE</span></code> or <code class="docutils literal notranslate"><span class="pre">CLOSED</span></code>. These can be |
| tested by masking against <a class="reference internal" href="#proton.Sender.LOCAL_UNINIT" title="proton.Sender.LOCAL_UNINIT"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_UNINIT</span></code></a>, |
| <a class="reference internal" href="#proton.Sender.LOCAL_ACTIVE" title="proton.Sender.LOCAL_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_ACTIVE</span></code></a>, <a class="reference internal" href="#proton.Sender.LOCAL_CLOSED" title="proton.Sender.LOCAL_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_CLOSED</span></code></a>, |
| <a class="reference internal" href="#proton.Sender.REMOTE_UNINIT" title="proton.Sender.REMOTE_UNINIT"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_UNINIT</span></code></a>, <a class="reference internal" href="#proton.Sender.REMOTE_ACTIVE" title="proton.Sender.REMOTE_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_ACTIVE</span></code></a> and |
| <a class="reference internal" href="#proton.Sender.REMOTE_CLOSED" title="proton.Sender.REMOTE_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">REMOTE_CLOSED</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.stream"> |
| <code class="sig-name descname">stream</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Sender.stream"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Sender.stream" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Send specified data as part of the current delivery.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>data</strong> (<code class="docutils literal notranslate"><span class="pre">binary</span></code>) – Data to send</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.target"> |
| <em class="property">property </em><code class="sig-name descname">target</code><a class="headerlink" href="#proton.Sender.target" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The target of the link as described by the local peer. The |
| returned object is valid until the link is freed.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.transport"> |
| <em class="property">property </em><code class="sig-name descname">transport</code><a class="headerlink" href="#proton.Sender.transport" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The transport bound to the connection on which this link was attached.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Transport" title="proton.Transport"><code class="xref py py-class docutils literal notranslate"><span class="pre">Transport</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Sender.unsettled"> |
| <em class="property">property </em><code class="sig-name descname">unsettled</code><a class="headerlink" href="#proton.Sender.unsettled" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The number of unsettled deliveries for this link.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Session"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Session</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">impl</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Session"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Session" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._wrapper.Wrapper</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._endpoints.Endpoint</span></code></p> |
| <p>A container of links</p> |
| <dl class="py attribute"> |
| <dt id="proton.Session.LOCAL_ACTIVE"> |
| <code class="sig-name descname">LOCAL_ACTIVE</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Session.LOCAL_ACTIVE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Session.LOCAL_CLOSED"> |
| <code class="sig-name descname">LOCAL_CLOSED</code><em class="property"> = 4</em><a class="headerlink" href="#proton.Session.LOCAL_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Session.LOCAL_UNINIT"> |
| <code class="sig-name descname">LOCAL_UNINIT</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Session.LOCAL_UNINIT" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Session.REMOTE_ACTIVE"> |
| <code class="sig-name descname">REMOTE_ACTIVE</code><em class="property"> = 16</em><a class="headerlink" href="#proton.Session.REMOTE_ACTIVE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Session.REMOTE_CLOSED"> |
| <code class="sig-name descname">REMOTE_CLOSED</code><em class="property"> = 32</em><a class="headerlink" href="#proton.Session.REMOTE_CLOSED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Session.REMOTE_UNINIT"> |
| <code class="sig-name descname">REMOTE_UNINIT</code><em class="property"> = 8</em><a class="headerlink" href="#proton.Session.REMOTE_UNINIT" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.close"> |
| <code class="sig-name descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Session.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Session.close" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Close a session.</p> |
| <p>Once this operation has completed, the <a class="reference internal" href="#proton.Session.LOCAL_CLOSED" title="proton.Session.LOCAL_CLOSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_CLOSED</span></code></a> state flag |
| will be set. This may be called without calling |
| <a class="reference internal" href="#proton.Session.open" title="proton.Session.open"><code class="xref py py-meth docutils literal notranslate"><span class="pre">open()</span></code></a>, in this case it is equivalent to calling |
| <a class="reference internal" href="#proton.Session.open" title="proton.Session.open"><code class="xref py py-meth docutils literal notranslate"><span class="pre">open()</span></code></a> followed by <a class="reference internal" href="#proton.Session.close" title="proton.Session.close"><code class="xref py py-meth docutils literal notranslate"><span class="pre">close()</span></code></a>.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.connection"> |
| <em class="property">property </em><code class="sig-name descname">connection</code><a class="headerlink" href="#proton.Session.connection" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The parent connection for this session.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.free"> |
| <code class="sig-name descname">free</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Session.free"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Session.free" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Free this session. When a session is freed it will no |
| longer be retained by the connection once any internal |
| references to the session are no longer needed. Freeing |
| a session will free all links on that session and settle |
| any deliveries on those links.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.handler"> |
| <em class="property">property </em><code class="sig-name descname">handler</code><a class="headerlink" href="#proton.Session.handler" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Handler for events.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Getter</dt> |
| <dd class="field-odd"><p>Get the event handler, or return <code class="docutils literal notranslate"><span class="pre">None</span></code> if no handler has been set.</p> |
| </dd> |
| <dt class="field-even">Setter</dt> |
| <dd class="field-even"><p>Set the event handler.</p> |
| </dd> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">Handler</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.incoming_bytes"> |
| <em class="property">property </em><code class="sig-name descname">incoming_bytes</code><a class="headerlink" href="#proton.Session.incoming_bytes" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The number of incoming bytes currently buffered.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code> (bytes)</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.incoming_capacity"> |
| <em class="property">property </em><code class="sig-name descname">incoming_capacity</code><a class="headerlink" href="#proton.Session.incoming_capacity" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The incoming capacity of this session in bytes. The incoming capacity |
| of a session determines how much incoming message data the session |
| can buffer.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>If set, this value must be greater than or equal to the negotiated |
| frame size of the transport. The window is computed as a whole number of |
| frames when dividing remaining capacity at a given time by the connection |
| max frame size. As such, capacity and max frame size should be chosen so |
| as to ensure the frame window isn’t unduly small and limiting performance.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code> (bytes)</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.next"> |
| <code class="sig-name descname">next</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mask</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Session.next"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Session.next" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Retrieve the next session for this connection that matches the |
| specified state mask.</p> |
| <p>When used with <a class="reference internal" href="#proton.Connection.session_head" title="proton.Connection.session_head"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Connection.session_head()</span></code></a>, application can |
| access all sessions on the connection that match the given state. |
| See <a class="reference internal" href="#proton.Connection.session_head" title="proton.Connection.session_head"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Connection.session_head()</span></code></a> for description of match |
| behavior.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>mask</strong> – Mask to match.</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>The next session owned by this connection that matches the |
| mask, else <code class="docutils literal notranslate"><span class="pre">None</span></code> if no sessions match.</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Session" title="proton.Session"><code class="xref py py-class docutils literal notranslate"><span class="pre">Session</span></code></a> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.open"> |
| <code class="sig-name descname">open</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Session.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Session.open" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Open a session. Once this operation has completed, the |
| <a class="reference internal" href="#proton.Session.LOCAL_ACTIVE" title="proton.Session.LOCAL_ACTIVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">LOCAL_ACTIVE</span></code></a> state flag will be set.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.outgoing_bytes"> |
| <em class="property">property </em><code class="sig-name descname">outgoing_bytes</code><a class="headerlink" href="#proton.Session.outgoing_bytes" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The number of outgoing bytes currently buffered.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code> (bytes)</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.outgoing_window"> |
| <em class="property">property </em><code class="sig-name descname">outgoing_window</code><a class="headerlink" href="#proton.Session.outgoing_window" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The outgoing window for this session.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.receiver"> |
| <code class="sig-name descname">receiver</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Session.receiver"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Session.receiver" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Create a new <a class="reference internal" href="#proton.Receiver" title="proton.Receiver"><code class="xref py py-class docutils literal notranslate"><span class="pre">Receiver</span></code></a> on this session.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>name</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – Name of receiver</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>New Receiver object</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Receiver" title="proton.Receiver"><code class="xref py py-class docutils literal notranslate"><span class="pre">Receiver</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.remote_condition"> |
| <em class="property">property </em><code class="sig-name descname">remote_condition</code><a class="headerlink" href="#proton.Session.remote_condition" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The remote condition associated with the connection endpoint. |
| See <a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a> for more information.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.sender"> |
| <code class="sig-name descname">sender</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Session.sender"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Session.sender" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Create a new <a class="reference internal" href="#proton.Sender" title="proton.Sender"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sender</span></code></a> on this session.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>name</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – Name of sender</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>New Sender object</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Sender" title="proton.Sender"><code class="xref py py-class docutils literal notranslate"><span class="pre">Sender</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.state"> |
| <em class="property">property </em><code class="sig-name descname">state</code><a class="headerlink" href="#proton.Session.state" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The endpoint state flags for this session. See <a class="reference internal" href="#proton.Endpoint" title="proton.Endpoint"><code class="xref py py-class docutils literal notranslate"><span class="pre">Endpoint</span></code></a> for |
| details of the flags.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Session.transport"> |
| <em class="property">property </em><code class="sig-name descname">transport</code><a class="headerlink" href="#proton.Session.transport" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The transport bound to the parent connection for this session.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Transport" title="proton.Transport"><code class="xref py py-class docutils literal notranslate"><span class="pre">Transport</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.SessionException"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">SessionException</code><a class="reference internal" href="_modules/proton/_exceptions.html#SessionException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SessionException" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._exceptions.ProtonException</span></code></p> |
| <p>An exception class raised when exceptions or errors related to a |
| session arise.</p> |
| <dl class="py method"> |
| <dt id="proton.SessionException.with_traceback"> |
| <code class="sig-name descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.SessionException.with_traceback" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Exception.with_traceback(tb) – |
| set self.__traceback__ to tb and return self.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.SSL"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">SSL</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">transport</span></em>, <em class="sig-param"><span class="n">domain</span></em>, <em class="sig-param"><span class="n">session_details</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> |
| <p>An SSL session associated with a transport. A transport must have |
| an SSL object in order to “speak” SSL over its connection.</p> |
| <dl class="py attribute"> |
| <dt id="proton.SSL.CERT_CITY_OR_LOCALITY"> |
| <code class="sig-name descname">CERT_CITY_OR_LOCALITY</code><em class="property"> = 2</em><a class="headerlink" href="#proton.SSL.CERT_CITY_OR_LOCALITY" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Certificate city or place name, not abbreviated</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSL.CERT_COMMON_NAME"> |
| <code class="sig-name descname">CERT_COMMON_NAME</code><em class="property"> = 5</em><a class="headerlink" href="#proton.SSL.CERT_COMMON_NAME" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Certificate common name or URL</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSL.CERT_COUNTRY_NAME"> |
| <code class="sig-name descname">CERT_COUNTRY_NAME</code><em class="property"> = 0</em><a class="headerlink" href="#proton.SSL.CERT_COUNTRY_NAME" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Certificate country name 2-char ISO code</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSL.CERT_ORGANIZATION_NAME"> |
| <code class="sig-name descname">CERT_ORGANIZATION_NAME</code><em class="property"> = 3</em><a class="headerlink" href="#proton.SSL.CERT_ORGANIZATION_NAME" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Certificate organization name</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSL.CERT_ORGANIZATION_UNIT"> |
| <code class="sig-name descname">CERT_ORGANIZATION_UNIT</code><em class="property"> = 4</em><a class="headerlink" href="#proton.SSL.CERT_ORGANIZATION_UNIT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Certificate organization unit or division within organization</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSL.CERT_STATE_OR_PROVINCE"> |
| <code class="sig-name descname">CERT_STATE_OR_PROVINCE</code><em class="property"> = 1</em><a class="headerlink" href="#proton.SSL.CERT_STATE_OR_PROVINCE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Certificate state or province, not abbreviated</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSL.MD5"> |
| <code class="sig-name descname">MD5</code><em class="property"> = 3</em><a class="headerlink" href="#proton.SSL.MD5" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Produces hash that is 16 bytes long using MD5</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSL.RESUME_NEW"> |
| <code class="sig-name descname">RESUME_NEW</code><em class="property"> = 1</em><a class="headerlink" href="#proton.SSL.RESUME_NEW" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Session renegotiated - not resumed.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSL.RESUME_REUSED"> |
| <code class="sig-name descname">RESUME_REUSED</code><em class="property"> = 2</em><a class="headerlink" href="#proton.SSL.RESUME_REUSED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Session resumed from previous session.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSL.RESUME_UNKNOWN"> |
| <code class="sig-name descname">RESUME_UNKNOWN</code><em class="property"> = 0</em><a class="headerlink" href="#proton.SSL.RESUME_UNKNOWN" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Session resume state unknown/not supported.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSL.SHA1"> |
| <code class="sig-name descname">SHA1</code><em class="property"> = 0</em><a class="headerlink" href="#proton.SSL.SHA1" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Produces hash that is 20 bytes long using SHA-1</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSL.SHA256"> |
| <code class="sig-name descname">SHA256</code><em class="property"> = 1</em><a class="headerlink" href="#proton.SSL.SHA256" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Produces hash that is 32 bytes long using SHA-256</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSL.SHA512"> |
| <code class="sig-name descname">SHA512</code><em class="property"> = 2</em><a class="headerlink" href="#proton.SSL.SHA512" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Produces hash that is 64 bytes long using SHA-512</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.cipher_name"> |
| <code class="sig-name descname">cipher_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.cipher_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.cipher_name" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the name of the Cipher that is currently in use.</p> |
| <p>Gets a text description of the cipher that is currently active, or |
| returns <code class="docutils literal notranslate"><span class="pre">None</span></code> if SSL is not active (no cipher).</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>The cipher in use may change over time due to renegotiation |
| or other changes to the SSL state.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The cypher name, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if no cipher in use.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.get_cert_common_name"> |
| <code class="sig-name descname">get_cert_common_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.get_cert_common_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.get_cert_common_name" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method to get a string that contains the <a class="reference internal" href="#proton.SSL.CERT_COMMON_NAME" title="proton.SSL.CERT_COMMON_NAME"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_COMMON_NAME</span></code></a> |
| sub field of the subject field in the ssl certificate.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>A string containing the <a class="reference internal" href="#proton.SSL.CERT_COMMON_NAME" title="proton.SSL.CERT_COMMON_NAME"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_COMMON_NAME</span></code></a> sub field.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.get_cert_country"> |
| <code class="sig-name descname">get_cert_country</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.get_cert_country"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.get_cert_country" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method to get a string that contains the <a class="reference internal" href="#proton.SSL.CERT_COUNTRY_NAME" title="proton.SSL.CERT_COUNTRY_NAME"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_COUNTRY_NAME</span></code></a> |
| sub field of the subject field in the ssl certificate.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>A string containing the <a class="reference internal" href="#proton.SSL.CERT_COUNTRY_NAME" title="proton.SSL.CERT_COUNTRY_NAME"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_COUNTRY_NAME</span></code></a> sub field.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.get_cert_fingerprint"> |
| <code class="sig-name descname">get_cert_fingerprint</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">fingerprint_length</span></em>, <em class="sig-param"><span class="n">digest_name</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.get_cert_fingerprint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.get_cert_fingerprint" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the fingerprint of the certificate. The certificate fingerprint |
| (as displayed in the Fingerprints section when looking at a certificate |
| with say the Firefox browser) is the hexadecimal hash of the entire |
| certificate. The fingerprint is not part of the certificate, rather |
| it is computed from the certificate and can be used to uniquely identify |
| a certificate.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>fingerprint_length</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – Must be <span class="math notranslate nohighlight">\(>= 33\)</span> for md5, <span class="math notranslate nohighlight">\(>= 41\)</span> |
| for sha1, <span class="math notranslate nohighlight">\(>= 65\)</span> for sha256 and <span class="math notranslate nohighlight">\(>= 129\)</span> |
| for sha512.</p></li> |
| <li><p><strong>digest_name</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – The hash algorithm to use. Must be one of <a class="reference internal" href="#proton.SSL.SHA1" title="proton.SSL.SHA1"><code class="xref py py-const docutils literal notranslate"><span class="pre">SHA1</span></code></a>, |
| <a class="reference internal" href="#proton.SSL.SHA256" title="proton.SSL.SHA256"><code class="xref py py-const docutils literal notranslate"><span class="pre">SHA256</span></code></a>, <a class="reference internal" href="#proton.SSL.SHA512" title="proton.SSL.SHA512"><code class="xref py py-const docutils literal notranslate"><span class="pre">SHA512</span></code></a>, <a class="reference internal" href="#proton.SSL.MD5" title="proton.SSL.MD5"><code class="xref py py-const docutils literal notranslate"><span class="pre">MD5</span></code></a>.</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>Hex fingerprint in a string, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if an error occurred.</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.get_cert_fingerprint_md5"> |
| <code class="sig-name descname">get_cert_fingerprint_md5</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.get_cert_fingerprint_md5"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.get_cert_fingerprint_md5" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method to get the <a class="reference internal" href="#proton.SSL.MD5" title="proton.SSL.MD5"><code class="xref py py-const docutils literal notranslate"><span class="pre">MD5</span></code></a> fingerprint of the |
| certificate.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>Hex fingerprint in a string, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if an error occurred.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.get_cert_fingerprint_sha1"> |
| <code class="sig-name descname">get_cert_fingerprint_sha1</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.get_cert_fingerprint_sha1"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.get_cert_fingerprint_sha1" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method to get the <a class="reference internal" href="#proton.SSL.SHA1" title="proton.SSL.SHA1"><code class="xref py py-const docutils literal notranslate"><span class="pre">SHA1</span></code></a> fingerprint of the |
| certificate.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>Hex fingerprint in a string, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if an error occurred.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.get_cert_fingerprint_sha256"> |
| <code class="sig-name descname">get_cert_fingerprint_sha256</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.get_cert_fingerprint_sha256"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.get_cert_fingerprint_sha256" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method to get the <a class="reference internal" href="#proton.SSL.SHA256" title="proton.SSL.SHA256"><code class="xref py py-const docutils literal notranslate"><span class="pre">SHA256</span></code></a> fingerprint of the |
| certificate.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>Hex fingerprint in a string, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if an error occurred.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.get_cert_fingerprint_sha512"> |
| <code class="sig-name descname">get_cert_fingerprint_sha512</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.get_cert_fingerprint_sha512"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.get_cert_fingerprint_sha512" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method to get the <a class="reference internal" href="#proton.SSL.SHA512" title="proton.SSL.SHA512"><code class="xref py py-const docutils literal notranslate"><span class="pre">SHA512</span></code></a> fingerprint of the |
| certificate.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>Hex fingerprint in a string, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if an error occurred.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.get_cert_locality_or_city"> |
| <code class="sig-name descname">get_cert_locality_or_city</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.get_cert_locality_or_city"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.get_cert_locality_or_city" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method to get a string that contains the <a class="reference internal" href="#proton.SSL.CERT_CITY_OR_LOCALITY" title="proton.SSL.CERT_CITY_OR_LOCALITY"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_CITY_OR_LOCALITY</span></code></a> |
| sub field of the subject field in the ssl certificate.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>A string containing the <a class="reference internal" href="#proton.SSL.CERT_CITY_OR_LOCALITY" title="proton.SSL.CERT_CITY_OR_LOCALITY"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_CITY_OR_LOCALITY</span></code></a> sub field.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.get_cert_organization"> |
| <code class="sig-name descname">get_cert_organization</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.get_cert_organization"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.get_cert_organization" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method to get a string that contains the <a class="reference internal" href="#proton.SSL.CERT_ORGANIZATION_NAME" title="proton.SSL.CERT_ORGANIZATION_NAME"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_ORGANIZATION_NAME</span></code></a> |
| sub field of the subject field in the ssl certificate.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>A string containing the <a class="reference internal" href="#proton.SSL.CERT_ORGANIZATION_NAME" title="proton.SSL.CERT_ORGANIZATION_NAME"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_ORGANIZATION_NAME</span></code></a> sub field.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.get_cert_organization_unit"> |
| <code class="sig-name descname">get_cert_organization_unit</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.get_cert_organization_unit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.get_cert_organization_unit" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method to get a string that contains the <a class="reference internal" href="#proton.SSL.CERT_ORGANIZATION_UNIT" title="proton.SSL.CERT_ORGANIZATION_UNIT"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_ORGANIZATION_UNIT</span></code></a> |
| sub field of the subject field in the ssl certificate.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>A string containing the <a class="reference internal" href="#proton.SSL.CERT_ORGANIZATION_UNIT" title="proton.SSL.CERT_ORGANIZATION_UNIT"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_ORGANIZATION_UNIT</span></code></a> sub field.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.get_cert_state_or_province"> |
| <code class="sig-name descname">get_cert_state_or_province</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.get_cert_state_or_province"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.get_cert_state_or_province" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A convenience method to get a string that contains the <a class="reference internal" href="#proton.SSL.CERT_STATE_OR_PROVINCE" title="proton.SSL.CERT_STATE_OR_PROVINCE"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_STATE_OR_PROVINCE</span></code></a> |
| sub field of the subject field in the ssl certificate.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>A string containing the <a class="reference internal" href="#proton.SSL.CERT_STATE_OR_PROVINCE" title="proton.SSL.CERT_STATE_OR_PROVINCE"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_STATE_OR_PROVINCE</span></code></a> sub field.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.get_cert_subject"> |
| <code class="sig-name descname">get_cert_subject</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.get_cert_subject"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.get_cert_subject" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the subject from the peer’s certificate.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>A string containing the full subject.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.get_cert_subject_subfield"> |
| <code class="sig-name descname">get_cert_subject_subfield</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">subfield_name</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.get_cert_subject_subfield"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.get_cert_subject_subfield" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a string that contains the value of the sub field of |
| the subject field in the ssl certificate. The subject field |
| usually contains the following values:</p> |
| <blockquote> |
| <div><ul class="simple"> |
| <li><p><a class="reference internal" href="#proton.SSL.CERT_COUNTRY_NAME" title="proton.SSL.CERT_COUNTRY_NAME"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_COUNTRY_NAME</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.SSL.CERT_STATE_OR_PROVINCE" title="proton.SSL.CERT_STATE_OR_PROVINCE"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_STATE_OR_PROVINCE</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.SSL.CERT_CITY_OR_LOCALITY" title="proton.SSL.CERT_CITY_OR_LOCALITY"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_CITY_OR_LOCALITY</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.SSL.CERT_ORGANIZATION_NAME" title="proton.SSL.CERT_ORGANIZATION_NAME"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_ORGANIZATION_NAME</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.SSL.CERT_ORGANIZATION_UNIT" title="proton.SSL.CERT_ORGANIZATION_UNIT"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_ORGANIZATION_UNIT</span></code></a></p></li> |
| <li><p><a class="reference internal" href="#proton.SSL.CERT_COMMON_NAME" title="proton.SSL.CERT_COMMON_NAME"><code class="xref py py-const docutils literal notranslate"><span class="pre">CERT_COMMON_NAME</span></code></a></p></li> |
| </ul> |
| </div></blockquote> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>subfield_name</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – The enumeration representing the required |
| sub field listed above</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A string which contains the requested sub field value which |
| is valid until the ssl object is destroyed.</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.peer_hostname"> |
| <em class="property">property </em><code class="sig-name descname">peer_hostname</code><a class="headerlink" href="#proton.SSL.peer_hostname" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Manage the expected name of the remote peer.</p> |
| <p>The hostname is used for two purposes:</p> |
| <blockquote> |
| <div><ol class="arabic simple"> |
| <li><p>when set on an SSL client, it is sent to the server during the |
| handshake (if Server Name Indication is supported)</p></li> |
| <li><p>it is used to check against the identifying name provided in the |
| peer’s certificate. If the supplied name does not exactly match a |
| SubjectAltName (type DNS name), or the CommonName entry in the |
| peer’s certificate, the peer is considered unauthenticated |
| (potential imposter), and the SSL connection is aborted.</p></li> |
| </ol> |
| </div></blockquote> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>Verification of the hostname is only done if |
| <a class="reference internal" href="#proton.SSLDomain.VERIFY_PEER_NAME" title="proton.SSLDomain.VERIFY_PEER_NAME"><code class="xref py py-const docutils literal notranslate"><span class="pre">SSLDomain.VERIFY_PEER_NAME</span></code></a> is set using |
| <a class="reference internal" href="#proton.SSLDomain.set_peer_authentication" title="proton.SSLDomain.set_peer_authentication"><code class="xref py py-meth docutils literal notranslate"><span class="pre">SSLDomain.set_peer_authentication()</span></code></a>.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.present"> |
| <em class="property">static </em><code class="sig-name descname">present</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.present"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.present" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Tests for an SSL implementation being present.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if we support SSL, <code class="docutils literal notranslate"><span class="pre">False</span></code> if not.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.protocol_name"> |
| <code class="sig-name descname">protocol_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.protocol_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.protocol_name" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the name of the SSL protocol that is currently in use.</p> |
| <p>Gets a text description of the SSL protocol that is currently active, |
| or returns <code class="docutils literal notranslate"><span class="pre">None</span></code> if SSL is not active.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>The protocol may change over time due to renegotiation.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The protocol name if SSL is active, or <code class="docutils literal notranslate"><span class="pre">None</span></code> if SSL connection |
| is not ready or active.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.remote_subject"> |
| <em class="property">property </em><code class="sig-name descname">remote_subject</code><a class="headerlink" href="#proton.SSL.remote_subject" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The subject from the peers certificate.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSL.resume_status"> |
| <code class="sig-name descname">resume_status</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSL.resume_status"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSL.resume_status" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Check whether the state has been resumed.</p> |
| <p>Used for client session resume. When called on an active session, |
| indicates whether the state has been resumed from a previous session.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>This is a best-effort service - there is no guarantee that |
| the remote server will accept the resumed parameters. The remote |
| server may choose to ignore these parameters, and request a |
| re-negotiation instead.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>Status code indicating whether or not the session has been |
| resumed. One of: |
| * <a class="reference internal" href="#proton.SSL.RESUME_UNKNOWN" title="proton.SSL.RESUME_UNKNOWN"><code class="xref py py-const docutils literal notranslate"><span class="pre">RESUME_UNKNOWN</span></code></a> |
| * <a class="reference internal" href="#proton.SSL.RESUME_NEW" title="proton.SSL.RESUME_NEW"><code class="xref py py-const docutils literal notranslate"><span class="pre">RESUME_NEW</span></code></a> |
| * <a class="reference internal" href="#proton.SSL.RESUME_REUSED" title="proton.SSL.RESUME_REUSED"><code class="xref py py-const docutils literal notranslate"><span class="pre">RESUME_REUSED</span></code></a></p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.SSLDomain"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">SSLDomain</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mode</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSLDomain"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSLDomain" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> |
| <p>An SSL configuration domain, used to hold the SSL configuration |
| for one or more SSL sessions.</p> |
| <dl class="py attribute"> |
| <dt id="proton.SSLDomain.ANONYMOUS_PEER"> |
| <code class="sig-name descname">ANONYMOUS_PEER</code><em class="property"> = 2</em><a class="headerlink" href="#proton.SSLDomain.ANONYMOUS_PEER" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Do not require a certificate nor cipher authorization.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSLDomain.MODE_CLIENT"> |
| <code class="sig-name descname">MODE_CLIENT</code><em class="property"> = 1</em><a class="headerlink" href="#proton.SSLDomain.MODE_CLIENT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Local connection endpoint is an SSL client.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSLDomain.MODE_SERVER"> |
| <code class="sig-name descname">MODE_SERVER</code><em class="property"> = 2</em><a class="headerlink" href="#proton.SSLDomain.MODE_SERVER" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Local connection endpoint is an SSL server.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSLDomain.VERIFY_PEER"> |
| <code class="sig-name descname">VERIFY_PEER</code><em class="property"> = 1</em><a class="headerlink" href="#proton.SSLDomain.VERIFY_PEER" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Require peer to provide a valid identifying certificate.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.SSLDomain.VERIFY_PEER_NAME"> |
| <code class="sig-name descname">VERIFY_PEER_NAME</code><em class="property"> = 3</em><a class="headerlink" href="#proton.SSLDomain.VERIFY_PEER_NAME" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Require valid certificate and matching name.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSLDomain.allow_unsecured_client"> |
| <code class="sig-name descname">allow_unsecured_client</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSLDomain.allow_unsecured_client"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSLDomain.allow_unsecured_client" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Permit a server to accept connection requests from non-SSL clients.</p> |
| <p>This configures the server to “sniff” the incoming client data stream, |
| and dynamically determine whether SSL/TLS is being used. This option |
| is disabled by default: only clients using SSL/TLS are accepted.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Raise</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.SSLException" title="proton.SSLException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">SSLException</span></code></a> if there is any Proton error</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSLDomain.set_credentials"> |
| <code class="sig-name descname">set_credentials</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cert_file</span></em>, <em class="sig-param"><span class="n">key_file</span></em>, <em class="sig-param"><span class="n">password</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSLDomain.set_credentials"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSLDomain.set_credentials" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Set the certificate that identifies the local node to the remote.</p> |
| <p>This certificate establishes the identity for the local node for all <a class="reference internal" href="#proton.SSL" title="proton.SSL"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSL</span></code></a> sessions |
| created from this domain. It will be sent to the remote if the remote needs to verify |
| the identity of this node. This may be used for both SSL servers and SSL clients (if |
| client authentication is required by the server).</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>This setting effects only those <a class="reference internal" href="#proton.SSL" title="proton.SSL"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSL</span></code></a> objects created after this call |
| returns. <a class="reference internal" href="#proton.SSL" title="proton.SSL"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSL</span></code></a> objects created before invoking this method will use the domain’s |
| previous setting.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>cert_file</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – Specifier for the file/database containing the identifying |
| certificate. For Openssl users, this is a PEM file. For Windows SChannel |
| users, this is the PKCS#12 file or system store.</p></li> |
| <li><p><strong>key_file</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – An optional key to access the identifying certificate. For |
| Openssl users, this is an optional PEM file containing the private key |
| used to sign the certificate. For Windows SChannel users, this is the |
| friendly name of the self-identifying certificate if there are multiple |
| certificates in the store.</p></li> |
| <li><p><strong>password</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code>) – The password used to sign the key, else <code class="docutils literal notranslate"><span class="pre">None</span></code> if key is not |
| protected.</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>0 on success</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.SSLException" title="proton.SSLException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">SSLException</span></code></a> if there is any Proton error</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSLDomain.set_peer_authentication"> |
| <code class="sig-name descname">set_peer_authentication</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">verify_mode</span></em>, <em class="sig-param"><span class="n">trusted_CAs</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSLDomain.set_peer_authentication"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSLDomain.set_peer_authentication" title="Permalink to this definition">¶</a></dt> |
| <dd><p>This method controls how the peer’s certificate is validated, if at all. By default, |
| neither servers nor clients attempt to verify their peers (PN_SSL_ANONYMOUS_PEER). |
| Once certificates and trusted CAs are configured, peer verification can be enabled.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>In order to verify a peer, a trusted CA must be configured. See |
| <a class="reference internal" href="#proton.SSLDomain.set_trusted_ca_db" title="proton.SSLDomain.set_trusted_ca_db"><code class="xref py py-meth docutils literal notranslate"><span class="pre">set_trusted_ca_db()</span></code></a>.</p> |
| </div> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>Servers must provide their own certificate when verifying a peer. See |
| <a class="reference internal" href="#proton.SSLDomain.set_credentials" title="proton.SSLDomain.set_credentials"><code class="xref py py-meth docutils literal notranslate"><span class="pre">set_credentials()</span></code></a>.</p> |
| </div> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>This setting effects only those <a class="reference internal" href="#proton.SSL" title="proton.SSL"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSL</span></code></a> objects created after this call |
| returns. <a class="reference internal" href="#proton.SSL" title="proton.SSL"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSL</span></code></a> objects created before invoking this method will use the domain’s |
| previous setting.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>verify_mode</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – The level of validation to apply to the peer, one of <a class="reference internal" href="#proton.SSLDomain.VERIFY_PEER" title="proton.SSLDomain.VERIFY_PEER"><code class="xref py py-const docutils literal notranslate"><span class="pre">VERIFY_PEER</span></code></a>, |
| <a class="reference internal" href="#proton.SSLDomain.VERIFY_PEER_NAME" title="proton.SSLDomain.VERIFY_PEER_NAME"><code class="xref py py-const docutils literal notranslate"><span class="pre">VERIFY_PEER_NAME</span></code></a>, <a class="reference internal" href="#proton.SSLDomain.ANONYMOUS_PEER" title="proton.SSLDomain.ANONYMOUS_PEER"><code class="xref py py-const docutils literal notranslate"><span class="pre">ANONYMOUS_PEER</span></code></a>,</p></li> |
| <li><p><strong>trusted_CAs</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – Path to a database of trusted CAs that the server will advertise.</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>0 on success</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.SSLException" title="proton.SSLException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">SSLException</span></code></a> if there is any Proton error</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SSLDomain.set_trusted_ca_db"> |
| <code class="sig-name descname">set_trusted_ca_db</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">certificate_db</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSLDomain.set_trusted_ca_db"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSLDomain.set_trusted_ca_db" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Configure the set of trusted CA certificates used by this domain to verify peers.</p> |
| <p>If the local SSL client/server needs to verify the identity of the remote, it must |
| validate the signature of the remote’s certificate. This function sets the database of |
| trusted CAs that will be used to verify the signature of the remote’s certificate.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>This setting effects only those <a class="reference internal" href="#proton.SSL" title="proton.SSL"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSL</span></code></a> objects created after this call |
| returns. <a class="reference internal" href="#proton.SSL" title="proton.SSL"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSL</span></code></a> objects created before invoking this method will use the domain’s |
| previous setting.</p> |
| </div> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>By default the list of trusted CA certificates will be set to the system default. |
| What this is is depends on the OS and the SSL implementation used: For OpenSSL the default |
| will depend on how the OS is set up. When using the Windows SChannel implementation the default |
| will be the users default trusted certificate store.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>certificate_db</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – Database of trusted CAs, used to authenticate the peer.</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>0 on success</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.SSLException" title="proton.SSLException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">SSLException</span></code></a> if there is any Proton error</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.SSLSessionDetails"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">SSLSessionDetails</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">session_id</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSLSessionDetails"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSLSessionDetails" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> |
| <p>Unique identifier for the SSL session. Used to resume previous |
| session on a new SSL connection.</p> |
| <dl class="py method"> |
| <dt id="proton.SSLSessionDetails.get_session_id"> |
| <code class="sig-name descname">get_session_id</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#SSLSessionDetails.get_session_id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSLSessionDetails.get_session_id" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the unique identifier for this SSL session</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>Session identifier</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.SSLUnavailable"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">SSLUnavailable</code><a class="reference internal" href="_modules/proton/_exceptions.html#SSLUnavailable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSLUnavailable" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._exceptions.SSLException</span></code></p> |
| <p>An exception class raised when exceptions or errors related to SSL |
| availability arise. These typically include problems finding the SSL |
| libraries.</p> |
| <dl class="py method"> |
| <dt id="proton.SSLUnavailable.with_traceback"> |
| <code class="sig-name descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.SSLUnavailable.with_traceback" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Exception.with_traceback(tb) – |
| set self.__traceback__ to tb and return self.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.SSLException"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">SSLException</code><a class="reference internal" href="_modules/proton/_exceptions.html#SSLException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SSLException" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._exceptions.TransportException</span></code></p> |
| <p>An exception class raised when exceptions or errors related to SSL usage |
| arise. These typically include problems with initializing or configuring |
| SSL.</p> |
| <dl class="py method"> |
| <dt id="proton.SSLException.with_traceback"> |
| <code class="sig-name descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.SSLException.with_traceback" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Exception.with_traceback(tb) – |
| set self.__traceback__ to tb and return self.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.SymbolList"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">SymbolList</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">t</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">raise_on_error</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#SymbolList"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SymbolList" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code></p> |
| <p>A list that can only hold <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> elements. However, if any string elements |
| are present, they will be converted to symbols.</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="n">SymbolList</span><span class="p">([</span><span class="s1">'one'</span><span class="p">,</span> <span class="n">symbol</span><span class="p">(</span><span class="s1">'two'</span><span class="p">),</span> <span class="s1">'three'</span><span class="p">])</span> |
| <span class="gp">>>> </span><span class="n">b</span> <span class="o">=</span> <span class="n">SymbolList</span><span class="p">([</span><span class="n">symbol</span><span class="p">(</span><span class="s1">'one'</span><span class="p">),</span> <span class="s1">'two'</span><span class="p">,</span> <span class="n">symbol</span><span class="p">(</span><span class="s1">'three'</span><span class="p">)])</span> |
| <span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">SymbolList</span><span class="p">(</span><span class="n">a</span><span class="p">)</span> |
| <span class="gp">>>> </span><span class="n">a</span> <span class="o">==</span> <span class="n">b</span> <span class="o">==</span> <span class="n">c</span> |
| <span class="go">True</span> |
| </pre></div> |
| </div> |
| <p>By default, using any key other than a symbol or string will result in a <code class="docutils literal notranslate"><span class="pre">TypeError</span></code>:</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">SymbolList</span><span class="p">([</span><span class="s1">'one'</span><span class="p">,</span> <span class="n">symbol</span><span class="p">(</span><span class="s1">'two'</span><span class="p">),</span> <span class="mi">3</span><span class="p">])</span> |
| <span class="go"> ...</span> |
| <span class="go">TypeError: Non-symbol type <class 'int'>: 3</span> |
| </pre></div> |
| </div> |
| <p>but by setting <code class="docutils literal notranslate"><span class="pre">raise_on_error=False</span></code>, non-symbol and non-string keys will be ignored:</p> |
| <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">SymbolList</span><span class="p">([</span><span class="s1">'one'</span><span class="p">,</span> <span class="n">symbol</span><span class="p">(</span><span class="s1">'two'</span><span class="p">),</span> <span class="mi">3</span><span class="p">],</span> <span class="n">raise_on_error</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> |
| <span class="go">SymbolList([symbol(u'one'), symbol(u'two'), 3])</span> |
| </pre></div> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>t</strong> (<code class="docutils literal notranslate"><span class="pre">list</span></code>) – Initialization for list</p></li> |
| <li><p><strong>raise_on_error</strong> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) – If <code class="docutils literal notranslate"><span class="pre">True</span></code>, will raise an <code class="docutils literal notranslate"><span class="pre">TypeError</span></code> if a non-string or non-symbol is |
| encountered in the initialization list, or in a subsequent operation which adds such |
| an element. If <code class="docutils literal notranslate"><span class="pre">False</span></code>, non-strings and non-symbols will be added to the list without |
| an error.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="py method"> |
| <dt id="proton.SymbolList.append"> |
| <code class="sig-name descname">append</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">v</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#SymbolList.append"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SymbolList.append" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Add a single value v to the end of the list</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SymbolList.clear"> |
| <code class="sig-name descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.SymbolList.clear" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Remove all items from list.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SymbolList.copy"> |
| <code class="sig-name descname">copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.SymbolList.copy" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return a shallow copy of the list.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SymbolList.count"> |
| <code class="sig-name descname">count</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em>, <em class="sig-param"><span class="o">/</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.SymbolList.count" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return number of occurrences of value.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SymbolList.extend"> |
| <code class="sig-name descname">extend</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">t</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#SymbolList.extend"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SymbolList.extend" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Add all elements of an iterable t to the end of the list</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SymbolList.index"> |
| <code class="sig-name descname">index</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em>, <em class="sig-param"><span class="n">start</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">stop</span><span class="o">=</span><span class="default_value">9223372036854775807</span></em>, <em class="sig-param"><span class="o">/</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.SymbolList.index" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return first index of value.</p> |
| <p>Raises ValueError if the value is not present.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SymbolList.insert"> |
| <code class="sig-name descname">insert</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">i</span></em>, <em class="sig-param"><span class="n">v</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#SymbolList.insert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.SymbolList.insert" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Insert a value v at index i</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SymbolList.pop"> |
| <code class="sig-name descname">pop</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">index</span><span class="o">=</span><span class="default_value">- 1</span></em>, <em class="sig-param"><span class="o">/</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.SymbolList.pop" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Remove and return item at index (default last).</p> |
| <p>Raises IndexError if list is empty or index is out of range.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SymbolList.remove"> |
| <code class="sig-name descname">remove</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em>, <em class="sig-param"><span class="o">/</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.SymbolList.remove" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Remove first occurrence of value.</p> |
| <p>Raises ValueError if the value is not present.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SymbolList.reverse"> |
| <code class="sig-name descname">reverse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.SymbolList.reverse" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Reverse <em>IN PLACE</em>.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.SymbolList.sort"> |
| <code class="sig-name descname">sort</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span></em>, <em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">reverse</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#proton.SymbolList.sort" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sort the list in ascending order and return None.</p> |
| <p>The sort is in-place (i.e. the list itself is modified) and stable (i.e. the |
| order of two equal elements is maintained).</p> |
| <p>If a key function is given, apply it once to each list item and sort them, |
| ascending or descending, according to their function values.</p> |
| <p>The reverse flag can be set to sort in descending order.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Terminus"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Terminus</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">impl</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Terminus"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Terminus" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> |
| <p>A source or target for messages.</p> |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.CONFIGURATION"> |
| <code class="sig-name descname">CONFIGURATION</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Terminus.CONFIGURATION" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A terminus with durably held configuration, but not delivery state.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.COORDINATOR"> |
| <code class="sig-name descname">COORDINATOR</code><em class="property"> = 3</em><a class="headerlink" href="#proton.Terminus.COORDINATOR" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A special target identifying a transaction coordinator.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.DELIVERIES"> |
| <code class="sig-name descname">DELIVERIES</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Terminus.DELIVERIES" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A terminus with both durably held configuration and durably held delivery state.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.DIST_MODE_COPY"> |
| <code class="sig-name descname">DIST_MODE_COPY</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Terminus.DIST_MODE_COPY" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The receiver gets all messages.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.DIST_MODE_MOVE"> |
| <code class="sig-name descname">DIST_MODE_MOVE</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Terminus.DIST_MODE_MOVE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The receiver competes for messages.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.DIST_MODE_UNSPECIFIED"> |
| <code class="sig-name descname">DIST_MODE_UNSPECIFIED</code><em class="property"> = 0</em><a class="headerlink" href="#proton.Terminus.DIST_MODE_UNSPECIFIED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The behavior is defined by the node.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.EXPIRE_NEVER"> |
| <code class="sig-name descname">EXPIRE_NEVER</code><em class="property"> = 3</em><a class="headerlink" href="#proton.Terminus.EXPIRE_NEVER" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The terminus is never considered orphaned</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.EXPIRE_WITH_CONNECTION"> |
| <code class="sig-name descname">EXPIRE_WITH_CONNECTION</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Terminus.EXPIRE_WITH_CONNECTION" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The terminus is orphaned when the parent connection is closed</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.EXPIRE_WITH_LINK"> |
| <code class="sig-name descname">EXPIRE_WITH_LINK</code><em class="property"> = 0</em><a class="headerlink" href="#proton.Terminus.EXPIRE_WITH_LINK" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The terminus is orphaned when the parent link is closed.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.EXPIRE_WITH_SESSION"> |
| <code class="sig-name descname">EXPIRE_WITH_SESSION</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Terminus.EXPIRE_WITH_SESSION" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The terminus is orphaned when the parent session is closed</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.NONDURABLE"> |
| <code class="sig-name descname">NONDURABLE</code><em class="property"> = 0</em><a class="headerlink" href="#proton.Terminus.NONDURABLE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A non durable terminus.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.SOURCE"> |
| <code class="sig-name descname">SOURCE</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Terminus.SOURCE" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A source of messages.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.TARGET"> |
| <code class="sig-name descname">TARGET</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Terminus.TARGET" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A target for messages.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Terminus.UNSPECIFIED"> |
| <code class="sig-name descname">UNSPECIFIED</code><em class="property"> = 0</em><a class="headerlink" href="#proton.Terminus.UNSPECIFIED" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A nonexistent terminus, may used as a source or target.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Terminus.address"> |
| <em class="property">property </em><code class="sig-name descname">address</code><a class="headerlink" href="#proton.Terminus.address" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The terminus address.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Terminus.capabilities"> |
| <em class="property">property </em><code class="sig-name descname">capabilities</code><a class="headerlink" href="#proton.Terminus.capabilities" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Capabilities of the source or target.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> containing an array of <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a>.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Terminus.copy"> |
| <code class="sig-name descname">copy</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">src</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_endpoints.html#Terminus.copy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Terminus.copy" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Copy another terminus object.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>src</strong> (<a class="reference internal" href="#proton.Terminus" title="proton.Terminus"><code class="xref py py-class docutils literal notranslate"><span class="pre">Terminus</span></code></a>) – The terminus to be copied from</p> |
| </dd> |
| <dt class="field-even">Raises</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.LinkException" title="proton.LinkException"><code class="xref py py-class docutils literal notranslate"><span class="pre">LinkException</span></code></a> if there is an error</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Terminus.distribution_mode"> |
| <em class="property">property </em><code class="sig-name descname">distribution_mode</code><a class="headerlink" href="#proton.Terminus.distribution_mode" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The terminus distribution mode, must be one of <a class="reference internal" href="#proton.Terminus.DIST_MODE_UNSPECIFIED" title="proton.Terminus.DIST_MODE_UNSPECIFIED"><code class="xref py py-const docutils literal notranslate"><span class="pre">DIST_MODE_UNSPECIFIED</span></code></a>, |
| <a class="reference internal" href="#proton.Terminus.DIST_MODE_COPY" title="proton.Terminus.DIST_MODE_COPY"><code class="xref py py-const docutils literal notranslate"><span class="pre">DIST_MODE_COPY</span></code></a> or <a class="reference internal" href="#proton.Terminus.DIST_MODE_MOVE" title="proton.Terminus.DIST_MODE_MOVE"><code class="xref py py-const docutils literal notranslate"><span class="pre">DIST_MODE_MOVE</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Terminus.durability"> |
| <em class="property">property </em><code class="sig-name descname">durability</code><a class="headerlink" href="#proton.Terminus.durability" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The terminus durability mode, must be one of <a class="reference internal" href="#proton.Terminus.NONDURABLE" title="proton.Terminus.NONDURABLE"><code class="xref py py-const docutils literal notranslate"><span class="pre">NONDURABLE</span></code></a>, |
| <a class="reference internal" href="#proton.Terminus.CONFIGURATION" title="proton.Terminus.CONFIGURATION"><code class="xref py py-const docutils literal notranslate"><span class="pre">CONFIGURATION</span></code></a> or <a class="reference internal" href="#proton.Terminus.DELIVERIES" title="proton.Terminus.DELIVERIES"><code class="xref py py-const docutils literal notranslate"><span class="pre">DELIVERIES</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Terminus.dynamic"> |
| <em class="property">property </em><code class="sig-name descname">dynamic</code><a class="headerlink" href="#proton.Terminus.dynamic" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The dynamic flag for this terminus object. This indicates if this |
| terminus was dynamically created.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Terminus.expiry_policy"> |
| <em class="property">property </em><code class="sig-name descname">expiry_policy</code><a class="headerlink" href="#proton.Terminus.expiry_policy" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The terminus expiry policy, must be one of <a class="reference internal" href="#proton.Terminus.EXPIRE_WITH_LINK" title="proton.Terminus.EXPIRE_WITH_LINK"><code class="xref py py-const docutils literal notranslate"><span class="pre">EXPIRE_WITH_LINK</span></code></a>, |
| <a class="reference internal" href="#proton.Terminus.EXPIRE_WITH_SESSION" title="proton.Terminus.EXPIRE_WITH_SESSION"><code class="xref py py-const docutils literal notranslate"><span class="pre">EXPIRE_WITH_SESSION</span></code></a>, <a class="reference internal" href="#proton.Terminus.EXPIRE_WITH_CONNECTION" title="proton.Terminus.EXPIRE_WITH_CONNECTION"><code class="xref py py-const docutils literal notranslate"><span class="pre">EXPIRE_WITH_CONNECTION</span></code></a> or |
| <a class="reference internal" href="#proton.Terminus.EXPIRE_NEVER" title="proton.Terminus.EXPIRE_NEVER"><code class="xref py py-const docutils literal notranslate"><span class="pre">EXPIRE_NEVER</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Terminus.filter"> |
| <em class="property">property </em><code class="sig-name descname">filter</code><a class="headerlink" href="#proton.Terminus.filter" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A filter on a source allows the set of messages transfered over |
| the link to be restricted. The symbol-keyed map represents a’ |
| filter set.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> containing a map with <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> keys.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Terminus.outcomes"> |
| <em class="property">property </em><code class="sig-name descname">outcomes</code><a class="headerlink" href="#proton.Terminus.outcomes" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Outcomes of the source or target.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> containing an array of <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a>.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Terminus.properties"> |
| <em class="property">property </em><code class="sig-name descname">properties</code><a class="headerlink" href="#proton.Terminus.properties" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Properties of a dynamic source or target.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> containing a map with <a class="reference internal" href="#proton.symbol" title="proton.symbol"><code class="xref py py-class docutils literal notranslate"><span class="pre">symbol</span></code></a> keys.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Terminus.timeout"> |
| <em class="property">property </em><code class="sig-name descname">timeout</code><a class="headerlink" href="#proton.Terminus.timeout" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The terminus timeout in seconds.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Terminus.type"> |
| <em class="property">property </em><code class="sig-name descname">type</code><a class="headerlink" href="#proton.Terminus.type" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The terminus type, must be one of <a class="reference internal" href="#proton.Terminus.UNSPECIFIED" title="proton.Terminus.UNSPECIFIED"><code class="xref py py-const docutils literal notranslate"><span class="pre">UNSPECIFIED</span></code></a>, |
| <a class="reference internal" href="#proton.Terminus.SOURCE" title="proton.Terminus.SOURCE"><code class="xref py py-const docutils literal notranslate"><span class="pre">SOURCE</span></code></a>, <a class="reference internal" href="#proton.Terminus.TARGET" title="proton.Terminus.TARGET"><code class="xref py py-const docutils literal notranslate"><span class="pre">TARGET</span></code></a> or <a class="reference internal" href="#proton.Terminus.COORDINATOR" title="proton.Terminus.COORDINATOR"><code class="xref py py-const docutils literal notranslate"><span class="pre">COORDINATOR</span></code></a></p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Timeout"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Timeout</code><a class="reference internal" href="_modules/proton/_exceptions.html#Timeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Timeout" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._exceptions.ProtonException</span></code></p> |
| <p>A timeout exception indicates that a blocking operation has timed |
| out.</p> |
| <dl class="py method"> |
| <dt id="proton.Timeout.with_traceback"> |
| <code class="sig-name descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Timeout.with_traceback" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Exception.with_traceback(tb) – |
| set self.__traceback__ to tb and return self.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Interrupt"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Interrupt</code><a class="reference internal" href="_modules/proton/_exceptions.html#Interrupt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Interrupt" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._exceptions.ProtonException</span></code></p> |
| <p>An interrupt exception indicates that a blocking operation was interrupted.</p> |
| <dl class="py method"> |
| <dt id="proton.Interrupt.with_traceback"> |
| <code class="sig-name descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.Interrupt.with_traceback" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Exception.with_traceback(tb) – |
| set self.__traceback__ to tb and return self.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Transport"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Transport</code><span class="sig-paren">(</span><em class="sig-param">mode=None</em>, <em class="sig-param">_impl=<function pn_transport></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._wrapper.Wrapper</span></code></p> |
| <p>A network channel supporting an AMQP connection.</p> |
| <dl class="py attribute"> |
| <dt id="proton.Transport.CLIENT"> |
| <code class="sig-name descname">CLIENT</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Transport.CLIENT" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Transport mode is as a client.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Transport.SERVER"> |
| <code class="sig-name descname">SERVER</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Transport.SERVER" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Transport mode is as a server.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Transport.TRACE_DRV"> |
| <code class="sig-name descname">TRACE_DRV</code><em class="property"> = 4</em><a class="headerlink" href="#proton.Transport.TRACE_DRV" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Log driver-related events.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Transport.TRACE_FRM"> |
| <code class="sig-name descname">TRACE_FRM</code><em class="property"> = 2</em><a class="headerlink" href="#proton.Transport.TRACE_FRM" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Log protocol frames going in and out of the transport.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Transport.TRACE_OFF"> |
| <code class="sig-name descname">TRACE_OFF</code><em class="property"> = 0</em><a class="headerlink" href="#proton.Transport.TRACE_OFF" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Turn logging off entirely.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Transport.TRACE_RAW"> |
| <code class="sig-name descname">TRACE_RAW</code><em class="property"> = 1</em><a class="headerlink" href="#proton.Transport.TRACE_RAW" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Log raw binary data going in and out of the transport.</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.authenticated"> |
| <em class="property">property </em><code class="sig-name descname">authenticated</code><a class="headerlink" href="#proton.Transport.authenticated" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Indicate whether the transport connection is authenticated.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>This property may not be stable until the <a class="reference internal" href="#proton.Event.CONNECTION_REMOTE_OPEN" title="proton.Event.CONNECTION_REMOTE_OPEN"><code class="xref py py-const docutils literal notranslate"><span class="pre">Event.CONNECTION_REMOTE_OPEN</span></code></a> |
| event is received.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.bind"> |
| <code class="sig-name descname">bind</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">connection</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.bind"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.bind" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Assign a connection to the transport.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>connection</strong> (<a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a>) – Connection to which to bind.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.TransportException" title="proton.TransportException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">TransportException</span></code></a> if there is any Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.bind_nothrow"> |
| <code class="sig-name descname">bind_nothrow</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">connection</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.bind_nothrow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.bind_nothrow" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Assign a connection to the transport. Any failure is |
| ignored rather than thrown.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>connection</strong> (<a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a>) – Connection to which to bind.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.capacity"> |
| <code class="sig-name descname">capacity</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.capacity"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.capacity" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the amount of free space for input following the transport’s |
| tail pointer.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>Available space for input in bytes.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| <dt class="field-odd">Raise</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.TransportException" title="proton.TransportException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">TransportException</span></code></a> if there is any Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.channel_max"> |
| <em class="property">property </em><code class="sig-name descname">channel_max</code><a class="headerlink" href="#proton.Transport.channel_max" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The maximum channel number that may be used on this transport.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>This is the maximum channel number allowed, giving a |
| valid channel number range of <code class="docutils literal notranslate"><span class="pre">[0</span> <span class="pre">..</span> <span class="pre">channel_max]</span></code>. Therefore the |
| maximum number of simultaneously active channels will be |
| channel_max plus 1.</p> |
| </div> |
| <p>You can set this more than once to raise and lower |
| the limit your application imposes on max channels for this |
| transport. However, smaller limits may be imposed by Proton, |
| or by the remote peer.</p> |
| <p>After the <code class="docutils literal notranslate"><span class="pre">OPEN</span></code> frame has been sent to the remote peer, |
| further calls to this function will have no effect.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.SessionException" title="proton.SessionException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">SessionException</span></code></a> if the <code class="docutils literal notranslate"><span class="pre">OPEN</span></code> frame has already |
| been sent.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.close_head"> |
| <code class="sig-name descname">close_head</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.close_head"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.close_head" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Indicate that the output has closed.</p> |
| <p>This tells the transport that no more output will be popped.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Raise</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.TransportException" title="proton.TransportException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">TransportException</span></code></a> if there is any Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.close_tail"> |
| <code class="sig-name descname">close_tail</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.close_tail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.close_tail" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Indicate that the input has reached End Of Stream (EOS).</p> |
| <p>This tells the transport that no more input will be forthcoming.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Raise</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.TransportException" title="proton.TransportException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">TransportException</span></code></a> if there is any Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.closed"> |
| <em class="property">property </em><code class="sig-name descname">closed</code><a class="headerlink" href="#proton.Transport.closed" title="Permalink to this definition">¶</a></dt> |
| <dd><p><code class="docutils literal notranslate"><span class="pre">True</span></code> iff both the transport head and transport tail are closed |
| using <a class="reference internal" href="#proton.Transport.close_head" title="proton.Transport.close_head"><code class="xref py py-meth docutils literal notranslate"><span class="pre">close_head()</span></code></a> and <a class="reference internal" href="#proton.Transport.close_tail" title="proton.Transport.close_tail"><code class="xref py py-meth docutils literal notranslate"><span class="pre">close_tail()</span></code></a> respectively.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.condition"> |
| <em class="property">property </em><code class="sig-name descname">condition</code><a class="headerlink" href="#proton.Transport.condition" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get additional information about the condition of the transport.</p> |
| <p>When a <a class="reference internal" href="#proton.Event.TRANSPORT_ERROR" title="proton.Event.TRANSPORT_ERROR"><code class="xref py py-const docutils literal notranslate"><span class="pre">Event.TRANSPORT_ERROR</span></code></a> event occurs, this operation |
| can be used to access the details of the error condition.</p> |
| <p>See <a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a> for more information.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Condition" title="proton.Condition"><code class="xref py py-class docutils literal notranslate"><span class="pre">Condition</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.connection"> |
| <em class="property">property </em><code class="sig-name descname">connection</code><a class="headerlink" href="#proton.Transport.connection" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The connection bound to this transport.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Connection" title="proton.Connection"><code class="xref py py-class docutils literal notranslate"><span class="pre">Connection</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.encrypted"> |
| <em class="property">property </em><code class="sig-name descname">encrypted</code><a class="headerlink" href="#proton.Transport.encrypted" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Indicate whether the transport connection is encrypted.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>This property may not be stable until the <a class="reference internal" href="#proton.Event.CONNECTION_REMOTE_OPEN" title="proton.Event.CONNECTION_REMOTE_OPEN"><code class="xref py py-const docutils literal notranslate"><span class="pre">Event.CONNECTION_REMOTE_OPEN</span></code></a> |
| event is received.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bool</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.frames_input"> |
| <em class="property">property </em><code class="sig-name descname">frames_input</code><a class="headerlink" href="#proton.Transport.frames_input" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the number of frames input by a transport.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.frames_output"> |
| <em class="property">property </em><code class="sig-name descname">frames_output</code><a class="headerlink" href="#proton.Transport.frames_output" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the number of frames output by a transport.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.idle_timeout"> |
| <em class="property">property </em><code class="sig-name descname">idle_timeout</code><a class="headerlink" href="#proton.Transport.idle_timeout" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The idle timeout of the connection in seconds. A zero idle |
| timeout means heartbeats are disabled.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">float</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.log"> |
| <code class="sig-name descname">log</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">message</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.log" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Log a message using a transport’s logging mechanism.</p> |
| <p>This can be useful in a debugging context as the log message will |
| be prefixed with the transport’s identifier.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>message</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – The message to be logged.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.max_frame_size"> |
| <em class="property">property </em><code class="sig-name descname">max_frame_size</code><a class="headerlink" href="#proton.Transport.max_frame_size" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The maximum size for transport frames (in bytes).</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.peek"> |
| <code class="sig-name descname">peek</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">size</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.peek"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.peek" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns <code class="docutils literal notranslate"><span class="pre">size</span></code> bytes from the head of the transport.</p> |
| <p>It is an error to call this with a value of <code class="docutils literal notranslate"><span class="pre">size</span></code> that |
| is greater than the value reported by <a class="reference internal" href="#proton.Transport.pending" title="proton.Transport.pending"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pending()</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>size</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – Number of bytes to return.</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">size</span></code> bytes from the head of the transport, or <code class="docutils literal notranslate"><span class="pre">None</span></code> |
| if none are available.</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">bytes</span></code></p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.TransportException" title="proton.TransportException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">TransportException</span></code></a> if there is any Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.pending"> |
| <code class="sig-name descname">pending</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.pending"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.pending" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the number of pending output bytes following the transport’s |
| head pointer.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>The number of pending output bytes.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| <dt class="field-odd">Raise</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.TransportException" title="proton.TransportException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">TransportException</span></code></a> if there is any Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.pop"> |
| <code class="sig-name descname">pop</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">size</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.pop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.pop" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Removes <code class="docutils literal notranslate"><span class="pre">size</span></code> bytes of output from the pending output queue |
| following the transport’s head pointer.</p> |
| <p>Calls to this function may alter the transport’s head pointer as |
| well as the number of pending bytes reported by |
| <a class="reference internal" href="#proton.Transport.pending" title="proton.Transport.pending"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pending()</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>size</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – Number of bytes to return.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.push"> |
| <code class="sig-name descname">push</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">binary</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.push"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.push" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Pushes the supplied bytes into the tail of the transport. |
| Only some of the bytes will be copied if there is insufficient |
| capacity available. Use <a class="reference internal" href="#proton.Transport.capacity" title="proton.Transport.capacity"><code class="xref py py-meth docutils literal notranslate"><span class="pre">capacity()</span></code></a> to determine how much |
| capacity the transport has.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>binary</strong> (<code class="docutils literal notranslate"><span class="pre">bytes</span></code>) – Data to be pushed onto the transport tail.</p> |
| </dd> |
| <dt class="field-even">Raise</dt> |
| <dd class="field-even"><ul class="simple"> |
| <li><p><a class="reference internal" href="#proton.TransportException" title="proton.TransportException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">TransportException</span></code></a> if there is any Proton error.</p></li> |
| <li><p><code class="docutils literal notranslate"><span class="pre">OverflowError</span></code> if the size of the data exceeds the |
| transport capacity.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.remote_channel_max"> |
| <em class="property">property </em><code class="sig-name descname">remote_channel_max</code><a class="headerlink" href="#proton.Transport.remote_channel_max" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The maximum allowed channel number of a transport’s remote peer.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.remote_idle_timeout"> |
| <em class="property">property </em><code class="sig-name descname">remote_idle_timeout</code><a class="headerlink" href="#proton.Transport.remote_idle_timeout" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the idle timeout for a transport’s remote peer in |
| seconds. A zero idle timeout means heartbeats are disabled.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">float</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.remote_max_frame_size"> |
| <em class="property">property </em><code class="sig-name descname">remote_max_frame_size</code><a class="headerlink" href="#proton.Transport.remote_max_frame_size" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The maximum frame size of a transport’s remote peer (in bytes).</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">int</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.require_auth"> |
| <code class="sig-name descname">require_auth</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">bool</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.require_auth"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.require_auth" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Set whether a non-authenticated transport connection is allowed.</p> |
| <p>There are several ways within the AMQP protocol suite to get |
| unauthenticated connections:</p> |
| <blockquote> |
| <div><ul class="simple"> |
| <li><p>Use no SASL layer (with either no TLS or TLS without client certificates)</p></li> |
| <li><p>Use a SASL layer but the ANONYMOUS mechanism</p></li> |
| </ul> |
| </div></blockquote> |
| <p>The default if this option is not set is to allow unauthenticated connections.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>bool</strong> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) – <code class="docutils literal notranslate"><span class="pre">True</span></code> when authenticated connections are required.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.require_encryption"> |
| <code class="sig-name descname">require_encryption</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">bool</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.require_encryption"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.require_encryption" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Set whether a non encrypted transport connection is allowed</p> |
| <p>There are several ways within the AMQP protocol suite to get encrypted connections:</p> |
| <blockquote> |
| <div><ul class="simple"> |
| <li><p>Use TLS</p></li> |
| <li><p>Use a SASL with a mechanism that supports security layers</p></li> |
| </ul> |
| </div></blockquote> |
| <p>The default if this option is not set is to allow unencrypted connections.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>bool</strong> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) – <code class="docutils literal notranslate"><span class="pre">True</span></code> if encryption is required on this transport, <code class="docutils literal notranslate"><span class="pre">False</span></code> otherwise.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.sasl"> |
| <code class="sig-name descname">sasl</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.sasl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.sasl" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the <a class="reference internal" href="#proton.SASL" title="proton.SASL"><code class="xref py py-class docutils literal notranslate"><span class="pre">SASL</span></code></a> object associated with this transport.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>SASL object associated with this transport.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference internal" href="#proton.SASL" title="proton.SASL"><code class="xref py py-class docutils literal notranslate"><span class="pre">SASL</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.ssl"> |
| <code class="sig-name descname">ssl</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">domain</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">session_details</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.ssl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.ssl" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the <a class="reference internal" href="#proton.SSL" title="proton.SSL"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSL</span></code></a> session associated with this transport. If |
| not set, then a new session will be created using <code class="docutils literal notranslate"><span class="pre">domain</span></code> and |
| <code class="docutils literal notranslate"><span class="pre">session_details</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>domain</strong> (<a class="reference internal" href="#proton.SSLDomain" title="proton.SSLDomain"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLDomain</span></code></a>) – An SSL domain configuration object</p></li> |
| <li><p><strong>session_details</strong> (<a class="reference internal" href="#proton.SSLSessionDetails" title="proton.SSLSessionDetails"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSLSessionDetails</span></code></a>) – A unique identifier for the SSL session.</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>SSL session associated with this transport.</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.SSL" title="proton.SSL"><code class="xref py py-class docutils literal notranslate"><span class="pre">SSL</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.tick"> |
| <code class="sig-name descname">tick</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">now</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.tick"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.tick" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Process any pending transport timer events (like heartbeat generation).</p> |
| <p>This method should be called after all pending input has been |
| processed by the transport and before generating output. It returns |
| the deadline for the next pending timer event, if any are present.</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>This function does nothing until the first data is read |
| from or written to the transport.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>now</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>) – seconds since epoch.</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>If non-zero, then the monotonic expiration time of the next |
| pending timer event for the transport. The caller must invoke |
| <a class="reference internal" href="#proton.Transport.tick" title="proton.Transport.tick"><code class="xref py py-meth docutils literal notranslate"><span class="pre">tick()</span></code></a> again at least once at or before this deadline |
| occurs. If <code class="docutils literal notranslate"><span class="pre">0.0</span></code>, then there are no pending events.</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">float</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.trace"> |
| <code class="sig-name descname">trace</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">n</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.trace"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.trace" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Update a transports trace flags.</p> |
| <p>The trace flags for a transport control what sort of information is |
| logged. The value may be <a class="reference internal" href="#proton.Transport.TRACE_OFF" title="proton.Transport.TRACE_OFF"><code class="xref py py-const docutils literal notranslate"><span class="pre">TRACE_OFF</span></code></a> or any combination of |
| <a class="reference internal" href="#proton.Transport.TRACE_DRV" title="proton.Transport.TRACE_DRV"><code class="xref py py-const docutils literal notranslate"><span class="pre">TRACE_DRV</span></code></a>, <a class="reference internal" href="#proton.Transport.TRACE_FRM" title="proton.Transport.TRACE_FRM"><code class="xref py py-const docutils literal notranslate"><span class="pre">TRACE_FRM</span></code></a>, <a class="reference internal" href="#proton.Transport.TRACE_RAW" title="proton.Transport.TRACE_RAW"><code class="xref py py-const docutils literal notranslate"><span class="pre">TRACE_RAW</span></code></a> using |
| a bitwise or operation.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>n</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – Trace flags</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.tracer"> |
| <em class="property">property </em><code class="sig-name descname">tracer</code><a class="headerlink" href="#proton.Transport.tracer" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A callback for trace logging. The callback is passed the transport |
| and log message. For no tracer callback, value is <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p>Tracer callback function</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.unbind"> |
| <code class="sig-name descname">unbind</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_transport.html#Transport.unbind"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Transport.unbind" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Unbinds a transport from its AMQP connection.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Raise</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.TransportException" title="proton.TransportException"><code class="xref py py-exc docutils literal notranslate"><span class="pre">TransportException</span></code></a> if there is any Proton error.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Transport.user"> |
| <em class="property">property </em><code class="sig-name descname">user</code><a class="headerlink" href="#proton.Transport.user" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The authenticated user.</p> |
| <p>On the client it will return whatever user was passed in to the |
| <a class="reference internal" href="#proton.Connection.user" title="proton.Connection.user"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Connection.user</span></code></a> attribute of the bound connection.</p> |
| <p>The returned value is only reliable after the <code class="docutils literal notranslate"><span class="pre">PN_TRANSPORT_AUTHENTICATED</span></code> |
| event has been received.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.TransportException"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">TransportException</code><a class="reference internal" href="_modules/proton/_exceptions.html#TransportException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.TransportException" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">proton._exceptions.ProtonException</span></code></p> |
| <p>An exception class raised when exceptions or errors related to the AMQP |
| transport arise.</p> |
| <dl class="py method"> |
| <dt id="proton.TransportException.with_traceback"> |
| <code class="sig-name descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#proton.TransportException.with_traceback" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Exception.with_traceback(tb) – |
| set self.__traceback__ to tb and return self.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Url"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Url</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">url</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">defaults</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_url.html#Url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Url" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> |
| <p><strong>DEPRECATED</strong> Simple URL parser/constructor.</p> |
| <div class="deprecated"> |
| <p><span class="versionmodified deprecated">Deprecated since version 0.27: </span>Use a <code class="docutils literal notranslate"><span class="pre">str</span></code> containing the URL instead.</p> |
| </div> |
| <p>Handles URLs of the form:</p> |
| <blockquote> |
| <div><p><code class="docutils literal notranslate"><span class="pre"><scheme>://<user>:<password>@<host>:<port>/<path></span></code></p> |
| </div></blockquote> |
| <p>All components can be <code class="docutils literal notranslate"><span class="pre">None</span></code> if not specified in the URL string.</p> |
| <p>The port can be specified as a service name, e.g. ‘amqp’ in the |
| URL string but <a class="reference internal" href="#proton.Url.Port" title="proton.Url.Port"><code class="xref py py-class docutils literal notranslate"><span class="pre">Url.Port</span></code></a> always gives the integer value.</p> |
| <div class="admonition warning"> |
| <p class="admonition-title">Warning</p> |
| <p>The placement of user and password in URLs is not |
| recommended. It can result in credentials leaking out in program |
| logs. Use connection configuration attributes instead.</p> |
| </div> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Variables</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>scheme</strong> – Url scheme e.g. ‘amqp’ or ‘amqps’</p></li> |
| <li><p><strong>username</strong> – Username</p></li> |
| <li><p><strong>password</strong> – Password</p></li> |
| <li><p><strong>host</strong> – Host name, ipv6 literal or ipv4 dotted quad.</p></li> |
| <li><p><strong>port</strong> – Integer port.</p></li> |
| <li><p><strong>host_port</strong> – Returns host:port</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Parameters</dt> |
| <dd class="field-even"><ul class="simple"> |
| <li><p><strong>url</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – URL string to parse.</p></li> |
| <li><p><strong>defaults</strong> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) – If <code class="docutils literal notranslate"><span class="pre">True</span></code>, fill in missing default values in the URL. |
| If <code class="docutils literal notranslate"><span class="pre">False</span></code>, you can fill them in later by calling self.defaults()</p></li> |
| <li><p><strong>kwargs</strong> – scheme, user, password, host, port, path. |
| If specified, replaces corresponding part in url string.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="py attribute"> |
| <dt id="proton.Url.AMQP"> |
| <code class="sig-name descname">AMQP</code><em class="property"> = 'amqp'</em><a class="headerlink" href="#proton.Url.AMQP" title="Permalink to this definition">¶</a></dt> |
| <dd><p>URL scheme for the AMQP protocol.</p> |
| </dd></dl> |
| |
| <dl class="py attribute"> |
| <dt id="proton.Url.AMQPS"> |
| <code class="sig-name descname">AMQPS</code><em class="property"> = 'amqps'</em><a class="headerlink" href="#proton.Url.AMQPS" title="Permalink to this definition">¶</a></dt> |
| <dd><p>URL scheme for the AMQP protocol secured with SSL.</p> |
| </dd></dl> |
| |
| <dl class="py class"> |
| <dt id="proton.Url.Port"> |
| <em class="property">class </em><code class="sig-name descname">Port</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_url.html#Url.Port"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Url.Port" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p> |
| <p>An integer port number that can be constructed from a service name string</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Url.defaults"> |
| <code class="sig-name descname">defaults</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_url.html#Url.defaults"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Url.defaults" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Fill in missing values (scheme, host or port) with defaults |
| :return: self</p> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Url.host"> |
| <em class="property">property </em><code class="sig-name descname">host</code><a class="headerlink" href="#proton.Url.host" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The host segment of a URL</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Url.path"> |
| <em class="property">property </em><code class="sig-name descname">path</code><a class="headerlink" href="#proton.Url.path" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The path segment of a URL</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">str</span></code></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="py method"> |
| <dt id="proton.Url.port"> |
| <em class="property">property </em><code class="sig-name descname">port</code><a class="headerlink" href="#proton.Url.port" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The port number segment of a URL.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#proton.Url.Port" title="proton.Url.Port"><code class="xref py py-class docutils literal notranslate"><span class="pre">Url.Port</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.Array"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">Array</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">descriptor</span></em>, <em class="sig-param"><span class="n">type</span></em>, <em class="sig-param"><span class="o">*</span><span class="n">elements</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#Array"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.Array" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p> |
| <p>An AMQP array, a sequence of AMQP values of a single type.</p> |
| <p>This class provides a convenient way to handle AMQP arrays when used with |
| convenience methods <a class="reference internal" href="#proton.Data.get_py_array" title="proton.Data.get_py_array"><code class="xref py py-func docutils literal notranslate"><span class="pre">Data.get_py_array()</span></code></a> and <a class="reference internal" href="#proton.Data.put_py_array" title="proton.Data.put_py_array"><code class="xref py py-func docutils literal notranslate"><span class="pre">Data.put_py_array()</span></code></a>.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Variables</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>descriptor</strong> – Optional descriptor if the array is to be described, otherwise <code class="docutils literal notranslate"><span class="pre">None</span></code></p></li> |
| <li><p><a class="reference internal" href="#proton.Data.type" title="proton.Data.type"><strong>type</strong></a> – Array element type, as an integer. The <a class="reference internal" href="#proton.Data" title="proton.Data"><code class="xref py py-class docutils literal notranslate"><span class="pre">Data</span></code></a> class has constants defined |
| for all the valid AMQP types. For example, for an array of double values, use |
| <a class="reference internal" href="#proton.Data.DOUBLE" title="proton.Data.DOUBLE"><code class="xref py py-const docutils literal notranslate"><span class="pre">Data.DOUBLE</span></code></a>, which has integer value 14.</p></li> |
| <li><p><strong>elements</strong> – A Python list of elements of the appropriate type.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.byte"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">byte</code><a class="reference internal" href="_modules/proton/_data.html#byte"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.byte" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p> |
| <p>The byte AMQP type.</p> |
| <p>An 8 bit signed integer in the range <span class="math notranslate nohighlight">\(-(2^7)\)</span> to <span class="math notranslate nohighlight">\(2^7 - 1\)</span> inclusive.</p> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.char"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">char</code><a class="reference internal" href="_modules/proton/_data.html#char"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.char" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></p> |
| <p>The char AMQP type.</p> |
| <p>A 32 bit UTF-32BE encoded Unicode character.</p> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.decimal32"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">decimal32</code><a class="reference internal" href="_modules/proton/_data.html#decimal32"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.decimal32" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p> |
| <p>The decimal32 AMQP type.</p> |
| <p>A 32 bit decimal floating point number (IEEE 754-2008 decimal32).</p> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.decimal64"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">decimal64</code><a class="reference internal" href="_modules/proton/_data.html#decimal64"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.decimal64" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p> |
| <p>The decimal64 AMQP type.</p> |
| <p>A 64 bit decimal floating point number (IEEE 754-2008 decimal64).</p> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.decimal128"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">decimal128</code><a class="reference internal" href="_modules/proton/_data.html#decimal128"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.decimal128" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">bytes</span></code></p> |
| <p>The decimal128 AMQP type.</p> |
| <p>A 128-bit decimal floating-point number (IEEE 754-2008 decimal128).</p> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.float32"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">float32</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="o">/</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#float32"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.float32" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code></p> |
| <p>The float AMQP type.</p> |
| <p>A 32 bit floating point number (IEEE 754-2008 binary32).</p> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.int32"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">int32</code><a class="reference internal" href="_modules/proton/_data.html#int32"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.int32" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p> |
| <p>The signed int AMQP type.</p> |
| <p>A 32 bit signed integer in the range <span class="math notranslate nohighlight">\(-(2^{31})\)</span> to <span class="math notranslate nohighlight">\(2^{31} - 1\)</span> inclusive.</p> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.short"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">short</code><a class="reference internal" href="_modules/proton/_data.html#short"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.short" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p> |
| <p>The short AMQP type.</p> |
| <p>A 16 bit signed integer in the range <span class="math notranslate nohighlight">\(-(2^{15})\)</span> to <span class="math notranslate nohighlight">\(2^{15} - 1\)</span> inclusive.</p> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.symbol"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">symbol</code><a class="reference internal" href="_modules/proton/_data.html#symbol"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.symbol" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></p> |
| <p>The symbol AMQP type.</p> |
| <p>Symbolic values from a constrained domain, represented by a sequence of ASCII characters.</p> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.timestamp"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">timestamp</code><a class="reference internal" href="_modules/proton/_data.html#timestamp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.timestamp" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p> |
| <p>The timestamp AMQP type.</p> |
| <p>An absolute point in time, represented by a signed 64 bit value measuring |
| milliseconds since the epoch. This value is encoded using the Unix <code class="docutils literal notranslate"><span class="pre">time_t</span></code> |
| [IEEE1003] encoding of UTC, but with a precision of milliseconds. For |
| example, <code class="docutils literal notranslate"><span class="pre">1311704463521</span></code> represents the moment <code class="docutils literal notranslate"><span class="pre">2011-07-26T18:21:03.521Z</span></code>.</p> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.ubyte"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">ubyte</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">i</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#ubyte"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.ubyte" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p> |
| <p>The unsigned byte AMQP type.</p> |
| <p>An 8 bit unsigned integer in the range <span class="math notranslate nohighlight">\(0\)</span> to <span class="math notranslate nohighlight">\(2^8 - 1\)</span> inclusive.</p> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.uint"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">uint</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">l</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#uint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.uint" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p> |
| <p>The unsigned int AMQP type.</p> |
| <p>A 32 bit unsigned integer in the range <span class="math notranslate nohighlight">\(0\)</span> to <span class="math notranslate nohighlight">\(2^{32} - 1\)</span> inclusive.</p> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.ulong"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">ulong</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">l</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#ulong"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.ulong" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p> |
| <p>The ulong AMQP type.</p> |
| <p>An unsigned 64 bit integer in the range <span class="math notranslate nohighlight">\(0\)</span> to <span class="math notranslate nohighlight">\(2^{64} - 1\)</span> inclusive.</p> |
| </dd></dl> |
| |
| <hr class="docutils" /> |
| <dl class="py class"> |
| <dt id="proton.ushort"> |
| <em class="property">class </em><code class="sig-prename descclassname">proton.</code><code class="sig-name descname">ushort</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">i</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/proton/_data.html#ushort"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#proton.ushort" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p> |
| <p>The unsigned short AMQP type.</p> |
| <p>A 16 bit unsigned integer in the range <span class="math notranslate nohighlight">\(0\)</span> to <span class="math notranslate nohighlight">\(2^{16} - 1\)</span> inclusive.</p> |
| </dd></dl> |
| |
| </div> |
| </div> |
| |
| |
| <div class="clearer"></div> |
| </div> |
| </div> |
| </div> |
| <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> |
| <div class="sphinxsidebarwrapper"> |
| <h3><a href="index.html">Table of Contents</a></h3> |
| <ul> |
| <li><a class="reference internal" href="#">Module <code class="docutils literal notranslate"><span class="pre">proton</span></code></a><ul> |
| <li><a class="reference internal" href="#module-summary">Module Summary</a><ul> |
| <li><a class="reference internal" href="#exceptions">Exceptions</a></li> |
| <li><a class="reference internal" href="#amqp-types">AMQP Types</a></li> |
| </ul> |
| </li> |
| <li><a class="reference internal" href="#module-detail">Module Detail</a></li> |
| </ul> |
| </li> |
| </ul> |
| |
| <h4>Previous topic</h4> |
| <p class="topless"><a href="index.html" |
| title="previous chapter">Qpid Proton Python API Documentation</a></p> |
| <h4>Next topic</h4> |
| <p class="topless"><a href="proton.handlers.html" |
| title="next chapter">Module <code class="docutils literal notranslate"><span class="pre">proton.handlers</span></code></a></p> |
| <div role="note" aria-label="source link"> |
| <h3>This Page</h3> |
| <ul class="this-page-menu"> |
| <li><a href="_sources/proton.rst.txt" |
| rel="nofollow">Show Source</a></li> |
| </ul> |
| </div> |
| <div id="searchbox" style="display: none" role="search"> |
| <h3 id="searchlabel">Quick search</h3> |
| <div class="searchformwrapper"> |
| <form class="search" action="search.html" method="get"> |
| <input type="text" name="q" aria-labelledby="searchlabel" /> |
| <input type="submit" value="Go" /> |
| </form> |
| </div> |
| </div> |
| <script>$('#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="proton.handlers.html" title="Module proton.handlers" |
| >next</a> |</li> |
| <li class="right" > |
| <a href="index.html" title="Qpid Proton Python API Documentation" |
| >previous</a> |</li> |
| <li class="nav-item nav-item-0"><a href="index.html">Qpid Proton Python API 0.32.0 documentation</a> »</li> |
| <li class="nav-item nav-item-this"><a href="">Module <code class="docutils literal notranslate"><span class="pre">proton</span></code></a></li> |
| </ul> |
| </div> |
| <div class="footer" role="contentinfo"> |
| © Copyright 2019, Apache Qpid Contributors. |
| Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1. |
| </div> |
| </body> |
| </html> |