qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1681800 [1/10] - in /qpid/site: docs/releases/qpid-proton-0.9.1/proton/python/examples/ input/releases/qpid-proton-0.9.1/proton/python/examples/
Date Tue, 26 May 2015 17:54:38 GMT
Author: gsim
Date: Tue May 26 17:54:36 2015
New Revision: 1681800

URL: http://svn.apache.org/r1681800
Log:
Added pygmentized examples and fixed up links

Added:
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/abstract_server.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/broker.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/client.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/client_http.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/db_common.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/db_ctrl.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/db_recv.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/db_send.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/direct_recv.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/direct_send.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/helloworld.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/helloworld_blocking.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/helloworld_direct.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/helloworld_direct_tornado.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/helloworld_tornado.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/proton_server.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/proton_tornado.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/queue_browser.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/recurring_timer.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/recurring_timer_tornado.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/selected_recv.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/server.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/server_direct.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/server_tx.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/simple_recv.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/simple_send.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/sync_client.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/tx_recv.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/tx_recv_interactive.py.html
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/tx_send.py.html
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/abstract_server.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/broker.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/client.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/client_http.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/db_common.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/db_ctrl.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/db_recv.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/db_send.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/direct_recv.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/direct_send.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/helloworld.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/helloworld_blocking.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/helloworld_direct.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/helloworld_direct_tornado.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/helloworld_tornado.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/proton_server.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/proton_tornado.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/queue_browser.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/recurring_timer.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/recurring_timer_tornado.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/selected_recv.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/server.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/server_direct.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/server_tx.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/simple_recv.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/simple_send.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/sync_client.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/tx_recv.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/tx_recv_interactive.py.html.in
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/tx_send.py.html.in
Modified:
    qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/index.html
    qpid/site/input/releases/qpid-proton-0.9.1/proton/python/examples/index.md

Added: qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/abstract_server.py.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/abstract_server.py.html?rev=1681800&view=auto
==============================================================================
--- qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/abstract_server.py.html (added)
+++ qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/abstract_server.py.html Tue May 26 17:54:36 2015
@@ -0,0 +1,168 @@
+<!DOCTYPE html>
+<!--
+ -
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements.  See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership.  The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied.  See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>abstract_server.py.html - Apache Qpid&#8482;</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <!-- Allow `go get` to use import paths of the form qpid.apache.org/<project>/<path> -->
+    <meta name="go-import" content="qpid.apache.org/proton git https://git-wip-us.apache.org/repos/asf/qpid-proton.git">
+    <link rel="stylesheet" href="/site.css" type="text/css" async="async"/>
+    <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/>
+    <script type="text/javascript">var _deferredFunctions = [];</script>
+    <script type="text/javascript" src="/deferred.js" defer="defer"></script>
+    <!--[if lte IE 8]>
+      <link rel="stylesheet" href="/ie.css" type="text/css"/>
+      <script type="text/javascript" src="/html5shiv.js"></script>
+    <![endif]-->
+  </head>
+  <body>
+    <div id="-content">
+      <div id="-top" class="panel">
+        <a id="-menu-link"><img width="16" height="16" src="data:image/png;base64," alt="Menu"/></a>
+
+        <a id="-search-link"><img width="22" height="16" src="data:image/png;base64," alt="Search"/></a>
+
+        <ul id="-global-navigation">
+          <li><a id="-logotype" href="/index.html">Apache Qpid<sup>&#8482;</sup></a></li>
+          <li><a href="/download.html">Download</a></li>
+          <li><a href="/documentation.html">Documentation</a></li>
+          <li><a href="/components/index.html">Components</a></li>
+          <li><a href="/discussion.html">Discussion</a></li>
+        </ul>
+      </div>
+
+      <div id="-menu" class="panel" style="display: none;">
+        <section>
+          <h3>Project</h3>
+
+          <ul>
+            <li><a href="/overview.html">Overview</a></li>
+            <li><a href="/components/index.html">Components</a></li>
+            <li><a href="/releases/index.html">Releases</a></li>
+          </ul>
+        </section>
+
+        <section>
+          <h3>Messaging APIs</h3>
+
+          <ul>
+            <li><a href="/proton/index.html">Qpid Proton</a></li>
+            <li><a href="/components/jms/index.html">Qpid JMS</a></li>
+            <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li>
+          </ul>
+        </section>
+
+        <section>
+          <h3>Servers and tools</h3>
+
+          <ul>
+            <li><a href="/components/java-broker/index.html">Java broker</a></li>
+            <li><a href="/components/cpp-broker/index.html">C++ broker</a></li>
+            <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li>
+          </ul>
+        </section>
+
+        <section>
+          <h3>Resources</h3>
+
+          <ul>
+            <li><a href="/dashboard.html">Dashboard</a></li>
+            <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li>
+            <li><a href="/resources.html">More resources</a></li>
+          </ul>
+        </section>
+      </div>
+
+      <div id="-search" class="panel" style="display: none;">
+        <form action="http://www.google.com/search" method="get">
+          <input type="hidden" name="sitesearch" value="qpid.apache.org"/>
+          <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/>
+          <button type="submit">Search</button>
+          <p><a href="/search.html">More ways to search</a></p>
+        </form>
+      </div>
+
+      <div id="-middle" class="panel">
+        <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-proton-0.9.1/index.html">Qpid Proton 0.9.1</a></li><li><a href="/releases/qpid-proton-0.9.1/proton/python/examples/index.html">Python AMQP Examples</a></li><li>abstract_server.py.html</li></ul>
+        <div class="highlight"><pre><span class="c">#!/usr/bin/env python</span>
+<span class="c">#</span>
+<span class="c"># Licensed to the Apache Software Foundation (ASF) under one</span>
+<span class="c"># or more contributor license agreements.  See the NOTICE file</span>
+<span class="c"># distributed with this work for additional information</span>
+<span class="c"># regarding copyright ownership.  The ASF licenses this file</span>
+<span class="c"># to you under the Apache License, Version 2.0 (the</span>
+<span class="c"># &quot;License&quot;); you may not use this file except in compliance</span>
+<span class="c"># with the License.  You may obtain a copy of the License at</span>
+<span class="c">#</span>
+<span class="c">#   http://www.apache.org/licenses/LICENSE-2.0</span>
+<span class="c">#</span>
+<span class="c"># Unless required by applicable law or agreed to in writing,</span>
+<span class="c"># software distributed under the License is distributed on an</span>
+<span class="c"># &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
+<span class="c"># KIND, either express or implied.  See the License for the</span>
+<span class="c"># specific language governing permissions and limitations</span>
+<span class="c"># under the License.</span>
+<span class="c">#</span>
+
+<span class="kn">from</span> <span class="nn">proton_server</span> <span class="kn">import</span> <span class="n">Server</span>
+
+<span class="k">class</span> <span class="nc">Application</span><span class="p">(</span><span class="n">Server</span><span class="p">):</span>
+    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">host</span><span class="p">,</span> <span class="n">address</span><span class="p">):</span>
+        <span class="nb">super</span><span class="p">(</span><span class="n">Application</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="n">host</span><span class="p">,</span> <span class="n">address</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">on_request</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">reply_to</span><span class="p">):</span>
+        <span class="n">response</span> <span class="o">=</span> <span class="n">request</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="n">reply_to</span><span class="p">)</span>
+        <span class="k">print</span> <span class="s">&quot;Request from: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">reply_to</span>
+
+<span class="k">try</span><span class="p">:</span>
+    <span class="n">Application</span><span class="p">(</span><span class="s">&quot;localhost:5672&quot;</span><span class="p">,</span> <span class="s">&quot;examples&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
+<span class="k">except</span> <span class="ne">KeyboardInterrupt</span><span class="p">:</span> <span class="k">pass</span>
+</pre></div>
+
+
+        <hr/>
+
+        <ul id="-apache-navigation">
+          <li><a href="http://www.apache.org/">Apache</a></li>
+          <li><a href="http://www.apache.org/licenses/">License</a></li>
+          <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+          <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li>
+          <li><a href="http://www.apache.org/security/">Security</a></li>
+          <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="data:image/png;base64," alt="Apache"/></a></li>
+        </ul>
+
+        <p id="-legal">
+          Apache Qpid, Messaging built on AMQP; Copyright &#169; 2013
+          The Apache Software Foundation; Licensed under
+          the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
+          License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton,
+          Proton, Apache, the Apache feather logo, and the Apache Qpid
+          project logo are trademarks of The Apache Software
+          Foundation; All other marks mentioned may be trademarks or
+          registered trademarks of their respective owners
+        </p>
+      </div>
+    </div>
+  </body>
+</html>

Added: qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/broker.py.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/broker.py.html?rev=1681800&view=auto
==============================================================================
--- qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/broker.py.html (added)
+++ qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/broker.py.html Tue May 26 17:54:36 2015
@@ -0,0 +1,258 @@
+<!DOCTYPE html>
+<!--
+ -
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements.  See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership.  The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied.  See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>broker.py.html - Apache Qpid&#8482;</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <!-- Allow `go get` to use import paths of the form qpid.apache.org/<project>/<path> -->
+    <meta name="go-import" content="qpid.apache.org/proton git https://git-wip-us.apache.org/repos/asf/qpid-proton.git">
+    <link rel="stylesheet" href="/site.css" type="text/css" async="async"/>
+    <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/>
+    <script type="text/javascript">var _deferredFunctions = [];</script>
+    <script type="text/javascript" src="/deferred.js" defer="defer"></script>
+    <!--[if lte IE 8]>
+      <link rel="stylesheet" href="/ie.css" type="text/css"/>
+      <script type="text/javascript" src="/html5shiv.js"></script>
+    <![endif]-->
+  </head>
+  <body>
+    <div id="-content">
+      <div id="-top" class="panel">
+        <a id="-menu-link"><img width="16" height="16" src="data:image/png;base64," alt="Menu"/></a>
+
+        <a id="-search-link"><img width="22" height="16" src="data:image/png;base64," alt="Search"/></a>
+
+        <ul id="-global-navigation">
+          <li><a id="-logotype" href="/index.html">Apache Qpid<sup>&#8482;</sup></a></li>
+          <li><a href="/download.html">Download</a></li>
+          <li><a href="/documentation.html">Documentation</a></li>
+          <li><a href="/components/index.html">Components</a></li>
+          <li><a href="/discussion.html">Discussion</a></li>
+        </ul>
+      </div>
+
+      <div id="-menu" class="panel" style="display: none;">
+        <section>
+          <h3>Project</h3>
+
+          <ul>
+            <li><a href="/overview.html">Overview</a></li>
+            <li><a href="/components/index.html">Components</a></li>
+            <li><a href="/releases/index.html">Releases</a></li>
+          </ul>
+        </section>
+
+        <section>
+          <h3>Messaging APIs</h3>
+
+          <ul>
+            <li><a href="/proton/index.html">Qpid Proton</a></li>
+            <li><a href="/components/jms/index.html">Qpid JMS</a></li>
+            <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li>
+          </ul>
+        </section>
+
+        <section>
+          <h3>Servers and tools</h3>
+
+          <ul>
+            <li><a href="/components/java-broker/index.html">Java broker</a></li>
+            <li><a href="/components/cpp-broker/index.html">C++ broker</a></li>
+            <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li>
+          </ul>
+        </section>
+
+        <section>
+          <h3>Resources</h3>
+
+          <ul>
+            <li><a href="/dashboard.html">Dashboard</a></li>
+            <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li>
+            <li><a href="/resources.html">More resources</a></li>
+          </ul>
+        </section>
+      </div>
+
+      <div id="-search" class="panel" style="display: none;">
+        <form action="http://www.google.com/search" method="get">
+          <input type="hidden" name="sitesearch" value="qpid.apache.org"/>
+          <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/>
+          <button type="submit">Search</button>
+          <p><a href="/search.html">More ways to search</a></p>
+        </form>
+      </div>
+
+      <div id="-middle" class="panel">
+        <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-proton-0.9.1/index.html">Qpid Proton 0.9.1</a></li><li><a href="/releases/qpid-proton-0.9.1/proton/python/examples/index.html">Python AMQP Examples</a></li><li>broker.py.html</li></ul>
+        <div class="highlight"><pre><span class="c">#!/usr/bin/env python</span>
+<span class="c">#</span>
+<span class="c"># Licensed to the Apache Software Foundation (ASF) under one</span>
+<span class="c"># or more contributor license agreements.  See the NOTICE file</span>
+<span class="c"># distributed with this work for additional information</span>
+<span class="c"># regarding copyright ownership.  The ASF licenses this file</span>
+<span class="c"># to you under the Apache License, Version 2.0 (the</span>
+<span class="c"># &quot;License&quot;); you may not use this file except in compliance</span>
+<span class="c"># with the License.  You may obtain a copy of the License at</span>
+<span class="c">#</span>
+<span class="c">#   http://www.apache.org/licenses/LICENSE-2.0</span>
+<span class="c">#</span>
+<span class="c"># Unless required by applicable law or agreed to in writing,</span>
+<span class="c"># software distributed under the License is distributed on an</span>
+<span class="c"># &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
+<span class="c"># KIND, either express or implied.  See the License for the</span>
+<span class="c"># specific language governing permissions and limitations</span>
+<span class="c"># under the License.</span>
+<span class="c">#</span>
+
+<span class="kn">import</span> <span class="nn">collections</span><span class="o">,</span> <span class="nn">optparse</span>
+<span class="kn">from</span> <span class="nn">proton</span> <span class="kn">import</span> <span class="n">Endpoint</span><span class="p">,</span> <span class="n">generate_uuid</span>
+<span class="kn">from</span> <span class="nn">proton.handlers</span> <span class="kn">import</span> <span class="n">MessagingHandler</span>
+<span class="kn">from</span> <span class="nn">proton.reactor</span> <span class="kn">import</span> <span class="n">Container</span>
+
+<span class="k">class</span> <span class="nc">Queue</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
+    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dynamic</span><span class="o">=</span><span class="bp">False</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">dynamic</span> <span class="o">=</span> <span class="n">dynamic</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">queue</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">deque</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">consumers</span> <span class="o">=</span> <span class="p">[]</span>
+
+    <span class="k">def</span> <span class="nf">subscribe</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">consumer</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">consumers</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">consumer</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">unsubscribe</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">consumer</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">consumer</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">consumers</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">consumers</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="n">consumer</span><span class="p">)</span>
+        <span class="k">return</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">consumers</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">and</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">dynamic</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">queue</span><span class="o">.</span><span class="n">count</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">publish</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">message</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">queue</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">message</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">dispatch</span><span class="p">()</span>
+
+    <span class="k">def</span> <span class="nf">dispatch</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">consumer</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">consumer</span><span class="p">:</span>
+            <span class="n">c</span> <span class="o">=</span> <span class="p">[</span><span class="n">consumer</span><span class="p">]</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">c</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">consumers</span>
+        <span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">_deliver_to</span><span class="p">(</span><span class="n">c</span><span class="p">):</span> <span class="k">pass</span>
+
+    <span class="k">def</span> <span class="nf">_deliver_to</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">consumers</span><span class="p">):</span>
+        <span class="k">try</span><span class="p">:</span>
+            <span class="n">result</span> <span class="o">=</span> <span class="bp">False</span>
+            <span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">consumers</span><span class="p">:</span>
+                <span class="k">if</span> <span class="n">c</span><span class="o">.</span><span class="n">credit</span><span class="p">:</span>
+                    <span class="n">c</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">queue</span><span class="o">.</span><span class="n">popleft</span><span class="p">())</span>
+                    <span class="n">result</span> <span class="o">=</span> <span class="bp">True</span>
+            <span class="k">return</span> <span class="n">result</span>
+        <span class="k">except</span> <span class="ne">IndexError</span><span class="p">:</span> <span class="c"># no more messages</span>
+            <span class="k">return</span> <span class="bp">False</span>
+
+<span class="k">class</span> <span class="nc">Broker</span><span class="p">(</span><span class="n">MessagingHandler</span><span class="p">):</span>
+    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">url</span><span class="p">):</span>
+        <span class="nb">super</span><span class="p">(</span><span class="n">Broker</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__init__</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">url</span> <span class="o">=</span> <span class="n">url</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">queues</span> <span class="o">=</span> <span class="p">{}</span>
+
+    <span class="k">def</span> <span class="nf">on_start</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">acceptor</span> <span class="o">=</span> <span class="n">event</span><span class="o">.</span><span class="n">container</span><span class="o">.</span><span class="n">listen</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">url</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">_queue</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">address</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">address</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">queues</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">queues</span><span class="p">[</span><span class="n">address</span><span class="p">]</span> <span class="o">=</span> <span class="n">Queue</span><span class="p">()</span>
+        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">queues</span><span class="p">[</span><span class="n">address</span><span class="p">]</span>
+
+    <span class="k">def</span> <span class="nf">on_link_opening</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">is_sender</span><span class="p">:</span>
+            <span class="k">if</span> <span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">remote_source</span><span class="o">.</span><span class="n">dynamic</span><span class="p">:</span>
+                <span class="n">address</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">generate_uuid</span><span class="p">())</span>
+                <span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">source</span><span class="o">.</span><span class="n">address</span> <span class="o">=</span> <span class="n">address</span>
+                <span class="n">q</span> <span class="o">=</span> <span class="n">Queue</span><span class="p">(</span><span class="bp">True</span><span class="p">)</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">queues</span><span class="p">[</span><span class="n">address</span><span class="p">]</span> <span class="o">=</span> <span class="n">q</span>
+                <span class="n">q</span><span class="o">.</span><span class="n">subscribe</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="p">)</span>
+            <span class="k">elif</span> <span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">remote_source</span><span class="o">.</span><span class="n">address</span><span class="p">:</span>
+                <span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">source</span><span class="o">.</span><span class="n">address</span> <span class="o">=</span> <span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">remote_source</span><span class="o">.</span><span class="n">address</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">_queue</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">source</span><span class="o">.</span><span class="n">address</span><span class="p">)</span><span class="o">.</span><span class="n">subscribe</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="p">)</span>
+        <span class="k">elif</span> <span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">remote_target</span><span class="o">.</span><span class="n">address</span><span class="p">:</span>
+            <span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">target</span><span class="o">.</span><span class="n">address</span> <span class="o">=</span> <span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">remote_target</span><span class="o">.</span><span class="n">address</span>
+
+    <span class="k">def</span> <span class="nf">_unsubscribe</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">link</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">link</span><span class="o">.</span><span class="n">source</span><span class="o">.</span><span class="n">address</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">queues</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">queues</span><span class="p">[</span><span class="n">link</span><span class="o">.</span><span class="n">source</span><span class="o">.</span><span class="n">address</span><span class="p">]</span><span class="o">.</span><span class="n">unsubscribe</span><span class="p">(</span><span class="n">link</span><span class="p">):</span>
+            <span class="k">del</span> <span class="bp">self</span><span class="o">.</span><span class="n">queues</span><span class="p">[</span><span class="n">link</span><span class="o">.</span><span class="n">source</span><span class="o">.</span><span class="n">address</span><span class="p">]</span>
+
+    <span class="k">def</span> <span class="nf">on_link_closing</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">is_sender</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_unsubscribe</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">on_connection_closing</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">remove_stale_consumers</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">connection</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">on_disconnected</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">remove_stale_consumers</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">connection</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">remove_stale_consumers</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">connection</span><span class="p">):</span>
+        <span class="n">l</span> <span class="o">=</span> <span class="n">connection</span><span class="o">.</span><span class="n">link_head</span><span class="p">(</span><span class="n">Endpoint</span><span class="o">.</span><span class="n">REMOTE_ACTIVE</span><span class="p">)</span>
+        <span class="k">while</span> <span class="n">l</span><span class="p">:</span>
+            <span class="k">if</span> <span class="n">l</span><span class="o">.</span><span class="n">is_sender</span><span class="p">:</span>
+                <span class="bp">self</span><span class="o">.</span><span class="n">_unsubscribe</span><span class="p">(</span><span class="n">l</span><span class="p">)</span>
+            <span class="n">l</span> <span class="o">=</span> <span class="n">l</span><span class="o">.</span><span class="n">next</span><span class="p">(</span><span class="n">Endpoint</span><span class="o">.</span><span class="n">REMOTE_ACTIVE</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">on_sendable</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_queue</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">source</span><span class="o">.</span><span class="n">address</span><span class="p">)</span><span class="o">.</span><span class="n">dispatch</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">on_message</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_queue</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">target</span><span class="o">.</span><span class="n">address</span><span class="p">)</span><span class="o">.</span><span class="n">publish</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">message</span><span class="p">)</span>
+
+<span class="n">parser</span> <span class="o">=</span> <span class="n">optparse</span><span class="o">.</span><span class="n">OptionParser</span><span class="p">(</span><span class="n">usage</span><span class="o">=</span><span class="s">&quot;usage: %prog [options]&quot;</span><span class="p">)</span>
+<span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&quot;-a&quot;</span><span class="p">,</span> <span class="s">&quot;--address&quot;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="s">&quot;localhost:5672&quot;</span><span class="p">,</span>
+                  <span class="n">help</span><span class="o">=</span><span class="s">&quot;address router listens on (default </span><span class="si">%d</span><span class="s">efault)&quot;</span><span class="p">)</span>
+<span class="n">opts</span><span class="p">,</span> <span class="n">args</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">parse_args</span><span class="p">()</span>
+
+<span class="k">try</span><span class="p">:</span>
+    <span class="n">Container</span><span class="p">(</span><span class="n">Broker</span><span class="p">(</span><span class="n">opts</span><span class="o">.</span><span class="n">address</span><span class="p">))</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
+<span class="k">except</span> <span class="ne">KeyboardInterrupt</span><span class="p">:</span> <span class="k">pass</span>
+</pre></div>
+
+
+        <hr/>
+
+        <ul id="-apache-navigation">
+          <li><a href="http://www.apache.org/">Apache</a></li>
+          <li><a href="http://www.apache.org/licenses/">License</a></li>
+          <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+          <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li>
+          <li><a href="http://www.apache.org/security/">Security</a></li>
+          <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="data:image/png;base64," alt="Apache"/></a></li>
+        </ul>
+
+        <p id="-legal">
+          Apache Qpid, Messaging built on AMQP; Copyright &#169; 2013
+          The Apache Software Foundation; Licensed under
+          the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
+          License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton,
+          Proton, Apache, the Apache feather logo, and the Apache Qpid
+          project logo are trademarks of The Apache Software
+          Foundation; All other marks mentioned may be trademarks or
+          registered trademarks of their respective owners
+        </p>
+      </div>
+    </div>
+  </body>
+</html>

Added: qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/client.py.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/client.py.html?rev=1681800&view=auto
==============================================================================
--- qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/client.py.html (added)
+++ qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/client.py.html Tue May 26 17:54:36 2015
@@ -0,0 +1,197 @@
+<!DOCTYPE html>
+<!--
+ -
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements.  See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership.  The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied.  See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>client.py.html - Apache Qpid&#8482;</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <!-- Allow `go get` to use import paths of the form qpid.apache.org/<project>/<path> -->
+    <meta name="go-import" content="qpid.apache.org/proton git https://git-wip-us.apache.org/repos/asf/qpid-proton.git">
+    <link rel="stylesheet" href="/site.css" type="text/css" async="async"/>
+    <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/>
+    <script type="text/javascript">var _deferredFunctions = [];</script>
+    <script type="text/javascript" src="/deferred.js" defer="defer"></script>
+    <!--[if lte IE 8]>
+      <link rel="stylesheet" href="/ie.css" type="text/css"/>
+      <script type="text/javascript" src="/html5shiv.js"></script>
+    <![endif]-->
+  </head>
+  <body>
+    <div id="-content">
+      <div id="-top" class="panel">
+        <a id="-menu-link"><img width="16" height="16" src="data:image/png;base64," alt="Menu"/></a>
+
+        <a id="-search-link"><img width="22" height="16" src="data:image/png;base64," alt="Search"/></a>
+
+        <ul id="-global-navigation">
+          <li><a id="-logotype" href="/index.html">Apache Qpid<sup>&#8482;</sup></a></li>
+          <li><a href="/download.html">Download</a></li>
+          <li><a href="/documentation.html">Documentation</a></li>
+          <li><a href="/components/index.html">Components</a></li>
+          <li><a href="/discussion.html">Discussion</a></li>
+        </ul>
+      </div>
+
+      <div id="-menu" class="panel" style="display: none;">
+        <section>
+          <h3>Project</h3>
+
+          <ul>
+            <li><a href="/overview.html">Overview</a></li>
+            <li><a href="/components/index.html">Components</a></li>
+            <li><a href="/releases/index.html">Releases</a></li>
+          </ul>
+        </section>
+
+        <section>
+          <h3>Messaging APIs</h3>
+
+          <ul>
+            <li><a href="/proton/index.html">Qpid Proton</a></li>
+            <li><a href="/components/jms/index.html">Qpid JMS</a></li>
+            <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li>
+          </ul>
+        </section>
+
+        <section>
+          <h3>Servers and tools</h3>
+
+          <ul>
+            <li><a href="/components/java-broker/index.html">Java broker</a></li>
+            <li><a href="/components/cpp-broker/index.html">C++ broker</a></li>
+            <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li>
+          </ul>
+        </section>
+
+        <section>
+          <h3>Resources</h3>
+
+          <ul>
+            <li><a href="/dashboard.html">Dashboard</a></li>
+            <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li>
+            <li><a href="/resources.html">More resources</a></li>
+          </ul>
+        </section>
+      </div>
+
+      <div id="-search" class="panel" style="display: none;">
+        <form action="http://www.google.com/search" method="get">
+          <input type="hidden" name="sitesearch" value="qpid.apache.org"/>
+          <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/>
+          <button type="submit">Search</button>
+          <p><a href="/search.html">More ways to search</a></p>
+        </form>
+      </div>
+
+      <div id="-middle" class="panel">
+        <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-proton-0.9.1/index.html">Qpid Proton 0.9.1</a></li><li><a href="/releases/qpid-proton-0.9.1/proton/python/examples/index.html">Python AMQP Examples</a></li><li>client.py.html</li></ul>
+        <div class="highlight"><pre><span class="c">#!/usr/bin/env python</span>
+<span class="c">#</span>
+<span class="c"># Licensed to the Apache Software Foundation (ASF) under one</span>
+<span class="c"># or more contributor license agreements.  See the NOTICE file</span>
+<span class="c"># distributed with this work for additional information</span>
+<span class="c"># regarding copyright ownership.  The ASF licenses this file</span>
+<span class="c"># to you under the Apache License, Version 2.0 (the</span>
+<span class="c"># &quot;License&quot;); you may not use this file except in compliance</span>
+<span class="c"># with the License.  You may obtain a copy of the License at</span>
+<span class="c">#</span>
+<span class="c">#   http://www.apache.org/licenses/LICENSE-2.0</span>
+<span class="c">#</span>
+<span class="c"># Unless required by applicable law or agreed to in writing,</span>
+<span class="c"># software distributed under the License is distributed on an</span>
+<span class="c"># &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
+<span class="c"># KIND, either express or implied.  See the License for the</span>
+<span class="c"># specific language governing permissions and limitations</span>
+<span class="c"># under the License.</span>
+<span class="c">#</span>
+
+<span class="kn">import</span> <span class="nn">optparse</span>
+<span class="kn">from</span> <span class="nn">proton</span> <span class="kn">import</span> <span class="n">Message</span>
+<span class="kn">from</span> <span class="nn">proton.handlers</span> <span class="kn">import</span> <span class="n">MessagingHandler</span>
+<span class="kn">from</span> <span class="nn">proton.reactor</span> <span class="kn">import</span> <span class="n">Container</span><span class="p">,</span> <span class="n">DynamicNodeProperties</span>
+
+<span class="k">class</span> <span class="nc">Client</span><span class="p">(</span><span class="n">MessagingHandler</span><span class="p">):</span>
+    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">url</span><span class="p">,</span> <span class="n">requests</span><span class="p">):</span>
+        <span class="nb">super</span><span class="p">(</span><span class="n">Client</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__init__</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">url</span> <span class="o">=</span> <span class="n">url</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">requests</span> <span class="o">=</span> <span class="n">requests</span>
+
+    <span class="k">def</span> <span class="nf">on_start</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">sender</span> <span class="o">=</span> <span class="n">event</span><span class="o">.</span><span class="n">container</span><span class="o">.</span><span class="n">create_sender</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">url</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">receiver</span> <span class="o">=</span> <span class="n">event</span><span class="o">.</span><span class="n">container</span><span class="o">.</span><span class="n">create_receiver</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">sender</span><span class="o">.</span><span class="n">connection</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="n">dynamic</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">next_request</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">receiver</span><span class="o">.</span><span class="n">remote_source</span><span class="o">.</span><span class="n">address</span><span class="p">:</span>
+            <span class="n">req</span> <span class="o">=</span> <span class="n">Message</span><span class="p">(</span><span class="n">reply_to</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">receiver</span><span class="o">.</span><span class="n">remote_source</span><span class="o">.</span><span class="n">address</span><span class="p">,</span> <span class="n">body</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">requests</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">sender</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">req</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">on_link_opened</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">event</span><span class="o">.</span><span class="n">receiver</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">receiver</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">next_request</span><span class="p">()</span>
+
+    <span class="k">def</span> <span class="nf">on_message</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="k">print</span> <span class="s">&quot;</span><span class="si">%s</span><span class="s"> =&gt; </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">requests</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="mi">0</span><span class="p">),</span> <span class="n">event</span><span class="o">.</span><span class="n">message</span><span class="o">.</span><span class="n">body</span><span class="p">)</span>
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">requests</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">next_request</span><span class="p">()</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="n">event</span><span class="o">.</span><span class="n">connection</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+
+<span class="n">REQUESTS</span><span class="o">=</span> <span class="p">[</span><span class="s">&quot;Twas brillig, and the slithy toves&quot;</span><span class="p">,</span>
+           <span class="s">&quot;Did gire and gymble in the wabe.&quot;</span><span class="p">,</span>
+           <span class="s">&quot;All mimsy were the borogroves,&quot;</span><span class="p">,</span>
+           <span class="s">&quot;And the mome raths outgrabe.&quot;</span><span class="p">]</span>
+
+<span class="n">parser</span> <span class="o">=</span> <span class="n">optparse</span><span class="o">.</span><span class="n">OptionParser</span><span class="p">(</span><span class="n">usage</span><span class="o">=</span><span class="s">&quot;usage: %prog [options]&quot;</span><span class="p">,</span>
+                               <span class="n">description</span><span class="o">=</span><span class="s">&quot;Send requests to the supplied address and print responses.&quot;</span><span class="p">)</span>
+<span class="n">parser</span><span class="o">.</span><span class="n">add_option</span><span class="p">(</span><span class="s">&quot;-a&quot;</span><span class="p">,</span> <span class="s">&quot;--address&quot;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="s">&quot;localhost:5672/examples&quot;</span><span class="p">,</span>
+                  <span class="n">help</span><span class="o">=</span><span class="s">&quot;address to which messages are sent (default </span><span class="si">%d</span><span class="s">efault)&quot;</span><span class="p">)</span>
+<span class="n">opts</span><span class="p">,</span> <span class="n">args</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">parse_args</span><span class="p">()</span>
+
+<span class="n">Container</span><span class="p">(</span><span class="n">Client</span><span class="p">(</span><span class="n">opts</span><span class="o">.</span><span class="n">address</span><span class="p">,</span> <span class="n">args</span> <span class="ow">or</span> <span class="n">REQUESTS</span><span class="p">))</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
+</pre></div>
+
+
+        <hr/>
+
+        <ul id="-apache-navigation">
+          <li><a href="http://www.apache.org/">Apache</a></li>
+          <li><a href="http://www.apache.org/licenses/">License</a></li>
+          <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+          <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li>
+          <li><a href="http://www.apache.org/security/">Security</a></li>
+          <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="data:image/png;base64," alt="Apache"/></a></li>
+        </ul>
+
+        <p id="-legal">
+          Apache Qpid, Messaging built on AMQP; Copyright &#169; 2013
+          The Apache Software Foundation; Licensed under
+          the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
+          License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton,
+          Proton, Apache, the Apache feather logo, and the Apache Qpid
+          project logo are trademarks of The Apache Software
+          Foundation; All other marks mentioned may be trademarks or
+          registered trademarks of their respective owners
+        </p>
+      </div>
+    </div>
+  </body>
+</html>

Added: qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/client_http.py.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/client_http.py.html?rev=1681800&view=auto
==============================================================================
--- qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/client_http.py.html (added)
+++ qpid/site/docs/releases/qpid-proton-0.9.1/proton/python/examples/client_http.py.html Tue May 26 17:54:36 2015
@@ -0,0 +1,247 @@
+<!DOCTYPE html>
+<!--
+ -
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements.  See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership.  The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied.  See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>client_http.py.html - Apache Qpid&#8482;</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <!-- Allow `go get` to use import paths of the form qpid.apache.org/<project>/<path> -->
+    <meta name="go-import" content="qpid.apache.org/proton git https://git-wip-us.apache.org/repos/asf/qpid-proton.git">
+    <link rel="stylesheet" href="/site.css" type="text/css" async="async"/>
+    <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/>
+    <script type="text/javascript">var _deferredFunctions = [];</script>
+    <script type="text/javascript" src="/deferred.js" defer="defer"></script>
+    <!--[if lte IE 8]>
+      <link rel="stylesheet" href="/ie.css" type="text/css"/>
+      <script type="text/javascript" src="/html5shiv.js"></script>
+    <![endif]-->
+  </head>
+  <body>
+    <div id="-content">
+      <div id="-top" class="panel">
+        <a id="-menu-link"><img width="16" height="16" src="data:image/png;base64," alt="Menu"/></a>
+
+        <a id="-search-link"><img width="22" height="16" src="data:image/png;base64," alt="Search"/></a>
+
+        <ul id="-global-navigation">
+          <li><a id="-logotype" href="/index.html">Apache Qpid<sup>&#8482;</sup></a></li>
+          <li><a href="/download.html">Download</a></li>
+          <li><a href="/documentation.html">Documentation</a></li>
+          <li><a href="/components/index.html">Components</a></li>
+          <li><a href="/discussion.html">Discussion</a></li>
+        </ul>
+      </div>
+
+      <div id="-menu" class="panel" style="display: none;">
+        <section>
+          <h3>Project</h3>
+
+          <ul>
+            <li><a href="/overview.html">Overview</a></li>
+            <li><a href="/components/index.html">Components</a></li>
+            <li><a href="/releases/index.html">Releases</a></li>
+          </ul>
+        </section>
+
+        <section>
+          <h3>Messaging APIs</h3>
+
+          <ul>
+            <li><a href="/proton/index.html">Qpid Proton</a></li>
+            <li><a href="/components/jms/index.html">Qpid JMS</a></li>
+            <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li>
+          </ul>
+        </section>
+
+        <section>
+          <h3>Servers and tools</h3>
+
+          <ul>
+            <li><a href="/components/java-broker/index.html">Java broker</a></li>
+            <li><a href="/components/cpp-broker/index.html">C++ broker</a></li>
+            <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li>
+          </ul>
+        </section>
+
+        <section>
+          <h3>Resources</h3>
+
+          <ul>
+            <li><a href="/dashboard.html">Dashboard</a></li>
+            <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li>
+            <li><a href="/resources.html">More resources</a></li>
+          </ul>
+        </section>
+      </div>
+
+      <div id="-search" class="panel" style="display: none;">
+        <form action="http://www.google.com/search" method="get">
+          <input type="hidden" name="sitesearch" value="qpid.apache.org"/>
+          <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/>
+          <button type="submit">Search</button>
+          <p><a href="/search.html">More ways to search</a></p>
+        </form>
+      </div>
+
+      <div id="-middle" class="panel">
+        <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-proton-0.9.1/index.html">Qpid Proton 0.9.1</a></li><li><a href="/releases/qpid-proton-0.9.1/proton/python/examples/index.html">Python AMQP Examples</a></li><li>client_http.py.html</li></ul>
+        <div class="highlight"><pre><span class="c">#!/usr/bin/env python</span>
+<span class="c">#</span>
+<span class="c"># Licensed to the Apache Software Foundation (ASF) under one</span>
+<span class="c"># or more contributor license agreements.  See the NOTICE file</span>
+<span class="c"># distributed with this work for additional information</span>
+<span class="c"># regarding copyright ownership.  The ASF licenses this file</span>
+<span class="c"># to you under the Apache License, Version 2.0 (the</span>
+<span class="c"># &quot;License&quot;); you may not use this file except in compliance</span>
+<span class="c"># with the License.  You may obtain a copy of the License at</span>
+<span class="c">#</span>
+<span class="c">#   http://www.apache.org/licenses/LICENSE-2.0</span>
+<span class="c">#</span>
+<span class="c"># Unless required by applicable law or agreed to in writing,</span>
+<span class="c"># software distributed under the License is distributed on an</span>
+<span class="c"># &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
+<span class="c"># KIND, either express or implied.  See the License for the</span>
+<span class="c"># specific language governing permissions and limitations</span>
+<span class="c"># under the License.</span>
+<span class="c">#</span>
+
+<span class="kn">import</span> <span class="nn">tornado.ioloop</span>
+<span class="kn">import</span> <span class="nn">tornado.web</span>
+<span class="kn">from</span> <span class="nn">proton</span> <span class="kn">import</span> <span class="n">Message</span>
+<span class="kn">from</span> <span class="nn">proton.handlers</span> <span class="kn">import</span> <span class="n">MessagingHandler</span>
+<span class="kn">from</span> <span class="nn">proton_tornado</span> <span class="kn">import</span> <span class="n">Container</span>
+
+<span class="k">class</span> <span class="nc">Client</span><span class="p">(</span><span class="n">MessagingHandler</span><span class="p">):</span>
+    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">host</span><span class="p">,</span> <span class="n">address</span><span class="p">):</span>
+        <span class="nb">super</span><span class="p">(</span><span class="n">Client</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">__init__</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">host</span> <span class="o">=</span> <span class="n">host</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">address</span> <span class="o">=</span> <span class="n">address</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">sent</span> <span class="o">=</span> <span class="p">[]</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">pending</span> <span class="o">=</span> <span class="p">[]</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">reply_address</span> <span class="o">=</span> <span class="bp">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">sender</span> <span class="o">=</span> <span class="bp">None</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">receiver</span> <span class="o">=</span> <span class="bp">None</span>
+
+    <span class="k">def</span> <span class="nf">on_start</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="n">conn</span> <span class="o">=</span> <span class="n">event</span><span class="o">.</span><span class="n">container</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">host</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">sender</span> <span class="o">=</span> <span class="n">event</span><span class="o">.</span><span class="n">container</span><span class="o">.</span><span class="n">create_sender</span><span class="p">(</span><span class="n">conn</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">address</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">receiver</span> <span class="o">=</span> <span class="n">event</span><span class="o">.</span><span class="n">container</span><span class="o">.</span><span class="n">create_receiver</span><span class="p">(</span><span class="n">conn</span><span class="p">,</span> <span class="bp">None</span><span class="p">,</span> <span class="n">dynamic</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">on_link_opened</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">event</span><span class="o">.</span><span class="n">receiver</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">receiver</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">reply_address</span> <span class="o">=</span> <span class="n">event</span><span class="o">.</span><span class="n">link</span><span class="o">.</span><span class="n">remote_source</span><span class="o">.</span><span class="n">address</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">do_request</span><span class="p">()</span>
+
+    <span class="k">def</span> <span class="nf">on_sendable</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">do_request</span><span class="p">()</span>
+
+    <span class="k">def</span> <span class="nf">on_message</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">sent</span><span class="p">:</span>
+            <span class="n">request</span><span class="p">,</span> <span class="n">handler</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sent</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
+            <span class="k">print</span> <span class="s">&quot;</span><span class="si">%s</span><span class="s"> =&gt; </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">request</span><span class="p">,</span> <span class="n">event</span><span class="o">.</span><span class="n">message</span><span class="o">.</span><span class="n">body</span><span class="p">)</span>
+            <span class="n">handler</span><span class="p">(</span><span class="n">event</span><span class="o">.</span><span class="n">message</span><span class="o">.</span><span class="n">body</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">do_request</span><span class="p">()</span>
+
+    <span class="k">def</span> <span class="nf">do_request</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">pending</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">reply_address</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">sender</span><span class="o">.</span><span class="n">credit</span><span class="p">:</span>
+            <span class="n">request</span><span class="p">,</span> <span class="n">handler</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">pending</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">sent</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">request</span><span class="p">,</span> <span class="n">handler</span><span class="p">))</span>
+            <span class="n">req</span> <span class="o">=</span> <span class="n">Message</span><span class="p">(</span><span class="n">reply_to</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">reply_address</span><span class="p">,</span> <span class="n">body</span><span class="o">=</span><span class="n">request</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">sender</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">req</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">request</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">body</span><span class="p">,</span> <span class="n">handler</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">pending</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">body</span><span class="p">,</span> <span class="n">handler</span><span class="p">))</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">do_request</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">container</span><span class="o">.</span><span class="n">touch</span><span class="p">()</span>
+
+<span class="k">class</span> <span class="nc">ExampleHandler</span><span class="p">(</span><span class="n">tornado</span><span class="o">.</span><span class="n">web</span><span class="o">.</span><span class="n">RequestHandler</span><span class="p">):</span>
+    <span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">client</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">client</span> <span class="o">=</span> <span class="n">client</span>
+
+    <span class="k">def</span> <span class="nf">get</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_write_open</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_write_form</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_write_close</span><span class="p">()</span>
+
+    <span class="nd">@tornado.web.asynchronous</span>
+    <span class="k">def</span> <span class="nf">post</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="n">client</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">get_body_argument</span><span class="p">(</span><span class="s">&quot;message&quot;</span><span class="p">),</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">on_response</span><span class="p">(</span><span class="n">x</span><span class="p">))</span>
+
+    <span class="k">def</span> <span class="nf">on_response</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">body</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">set_header</span><span class="p">(</span><span class="s">&quot;Content-Type&quot;</span><span class="p">,</span> <span class="s">&quot;text/html&quot;</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_write_open</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_write_form</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&quot;Response: &quot;</span> <span class="o">+</span> <span class="n">body</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_write_close</span><span class="p">()</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">finish</span><span class="p">()</span>
+
+    <span class="k">def</span> <span class="nf">_write_open</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&#39;&lt;html&gt;&lt;body&gt;&#39;</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">_write_close</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&#39;&lt;/body&gt;&lt;/html&gt;&#39;</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">_write_form</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s">&#39;&lt;form action=&quot;/client&quot; method=&quot;POST&quot;&gt;&#39;</span>
+                   <span class="s">&#39;Request: &lt;input type=&quot;text&quot; name=&quot;message&quot;&gt;&#39;</span>
+                   <span class="s">&#39;&lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&gt;&#39;</span>
+                   <span class="s">&#39;&lt;/form&gt;&#39;</span><span class="p">)</span>
+
+
+<span class="n">loop</span> <span class="o">=</span> <span class="n">tornado</span><span class="o">.</span><span class="n">ioloop</span><span class="o">.</span><span class="n">IOLoop</span><span class="o">.</span><span class="n">instance</span><span class="p">()</span>
+<span class="n">client</span> <span class="o">=</span> <span class="n">Client</span><span class="p">(</span><span class="s">&quot;localhost:5672&quot;</span><span class="p">,</span> <span class="s">&quot;examples&quot;</span><span class="p">)</span>
+<span class="n">client</span><span class="o">.</span><span class="n">container</span> <span class="o">=</span> <span class="n">Container</span><span class="p">(</span><span class="n">client</span><span class="p">,</span> <span class="n">loop</span><span class="o">=</span><span class="n">loop</span><span class="p">)</span>
+<span class="n">client</span><span class="o">.</span><span class="n">container</span><span class="o">.</span><span class="n">initialise</span><span class="p">()</span>
+<span class="n">app</span> <span class="o">=</span> <span class="n">tornado</span><span class="o">.</span><span class="n">web</span><span class="o">.</span><span class="n">Application</span><span class="p">([</span><span class="n">tornado</span><span class="o">.</span><span class="n">web</span><span class="o">.</span><span class="n">url</span><span class="p">(</span><span class="s">r&quot;/client&quot;</span><span class="p">,</span> <span class="n">ExampleHandler</span><span class="p">,</span> <span class="nb">dict</span><span class="p">(</span><span class="n">client</span><span class="o">=</span><span class="n">client</span><span class="p">))])</span>
+<span class="n">app</span><span class="o">.</span><span class="n">listen</span><span class="p">(</span><span class="mi">8888</span><span class="p">)</span>
+<span class="k">try</span><span class="p">:</span>
+    <span class="n">loop</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
+<span class="k">except</span> <span class="ne">KeyboardInterrupt</span><span class="p">:</span>
+    <span class="n">loop</span><span class="o">.</span><span class="n">stop</span><span class="p">()</span>
+</pre></div>
+
+
+        <hr/>
+
+        <ul id="-apache-navigation">
+          <li><a href="http://www.apache.org/">Apache</a></li>
+          <li><a href="http://www.apache.org/licenses/">License</a></li>
+          <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+          <li><a href="http://www.apache.org/foundation/thanks.html">Thanks!</a></li>
+          <li><a href="http://www.apache.org/security/">Security</a></li>
+          <li><a href="http://www.apache.org/"><img id="-apache-feather" width="48" height="14" src="data:image/png;base64," alt="Apache"/></a></li>
+        </ul>
+
+        <p id="-legal">
+          Apache Qpid, Messaging built on AMQP; Copyright &#169; 2013
+          The Apache Software Foundation; Licensed under
+          the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
+          License, Version 2.0</a>; Apache Qpid, Qpid, Qpid Proton,
+          Proton, Apache, the Apache feather logo, and the Apache Qpid
+          project logo are trademarks of The Apache Software
+          Foundation; All other marks mentioned may be trademarks or
+          registered trademarks of their respective owners
+        </p>
+      </div>
+    </div>
+  </body>
+</html>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message