| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title> |
| Class: Qpid::Proton::Handler::Adapter |
| |
| — Qpid Proton Ruby API |
| |
| </title> |
| |
| <link rel="stylesheet" href="../../../css/style.css" type="text/css" /> |
| |
| <link rel="stylesheet" href="../../../css/common.css" type="text/css" /> |
| |
| <script type="text/javascript"> |
| pathId = "Qpid::Proton::Handler::Adapter"; |
| relpath = '../../../'; |
| </script> |
| |
| |
| <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script> |
| |
| <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script> |
| |
| |
| </head> |
| <body> |
| <div class="nav_wrap"> |
| <iframe id="nav" src="../../../class_list.html?1"></iframe> |
| <div id="resizer"></div> |
| </div> |
| |
| <div id="main" tabindex="-1"> |
| <div id="header"> |
| <div id="menu"> |
| |
| <a href="../../../_index.html">Index (A)</a> » |
| <span class='title'><span class='object_link'><a href="../../../Qpid.html" title="Qpid (module)">Qpid</a></span></span> » <span class='title'><span class='object_link'><a href="../../Proton.html" title="Qpid::Proton (module)">Proton</a></span></span> » <span class='title'><span class='object_link'><a href="../Handler.html" title="Qpid::Proton::Handler (module)">Handler</a></span></span> |
| » |
| <span class="title">Adapter</span> |
| |
| </div> |
| |
| <div id="search"> |
| |
| <a class="full_list_link" id="class_list_link" |
| href="../../../class_list.html"> |
| |
| <svg width="24" height="24"> |
| <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> |
| <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> |
| <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> |
| </svg> |
| </a> |
| |
| </div> |
| <div class="clear"></div> |
| </div> |
| |
| <div id="content"><h1>Class: Qpid::Proton::Handler::Adapter |
| |
| |
| |
| </h1> |
| <div class="box_info"> |
| |
| <dl> |
| <dt>Inherits:</dt> |
| <dd> |
| <span class="inheritName">Object</span> |
| |
| <ul class="fullTree"> |
| <li>Object</li> |
| |
| <li class="next">Qpid::Proton::Handler::Adapter</li> |
| |
| </ul> |
| <a href="#" class="inheritanceTree">show all</a> |
| |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <dl> |
| <dt>Defined in:</dt> |
| <dd>lib/handler/adapter.rb</dd> |
| </dl> |
| |
| </div> |
| |
| <h2>Overview</h2><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Base adapter for raw proton events</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><div id="subclasses"> |
| <h2>Direct Known Subclasses</h2> |
| <p class="children"><span class='object_link'><a href="MessagingAdapter.html" title="Qpid::Proton::Handler::MessagingAdapter (class)">MessagingAdapter</a></span>, <span class='object_link'><a href="ReactorMessagingAdapter.html" title="Qpid::Proton::Handler::ReactorMessagingAdapter (class)">ReactorMessagingAdapter</a></span></p> |
| </div> |
| |
| |
| |
| |
| |
| |
| |
| |
| <h2> |
| Class Method Summary |
| <small><a href="#" class="summary_toggle">collapse</a></small> |
| </h2> |
| |
| <ul class="summary"> |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#adapt-class_method" title="adapt (class method)">.<strong>adapt</strong>(handler) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Create and return an adapter for handler, or return h if it does not need adapting.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#adapter-class_method" title="adapter (class method)">.<strong>adapter</strong>(handler) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Adapter class if requested by handler, else default to MessagingHandler.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| </ul> |
| |
| <h2> |
| Instance Method Summary |
| <small><a href="#" class="summary_toggle">collapse</a></small> |
| </h2> |
| |
| <ul class="summary"> |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#forward-instance_method" title="#forward (instance method)">#<strong>forward</strong>(method, *args) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'></div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(h) ⇒ Adapter </a> |
| |
| |
| |
| </span> |
| |
| |
| <span class="note title constructor">constructor</span> |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>A new instance of Adapter.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#proton_adapter_class-instance_method" title="#proton_adapter_class (instance method)">#<strong>proton_adapter_class</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Adapters don't need adapting.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| </ul> |
| |
| |
| <div id="constructor_details" class="method_details_list"> |
| <h2>Constructor Details</h2> |
| |
| <div class="method_details first"> |
| <h3 class="signature first" id="initialize-instance_method"> |
| |
| #<strong>initialize</strong>(h) ⇒ <tt><span class='object_link'><a href="" title="Qpid::Proton::Handler::Adapter (class)">Adapter</a></span></tt> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns a new instance of Adapter.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 55</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/handler/adapter.rb', line 55</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_h'>h</span><span class='rparen'>)</span> <span class='ivar'>@handler</span> <span class='op'>=</span> <span class='id identifier rubyid_h'>h</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| |
| <div id="class_method_details" class="method_details_list"> |
| <h2>Class Method Details</h2> |
| |
| |
| <div class="method_details first"> |
| <h3 class="signature first" id="adapt-class_method"> |
| |
| .<strong>adapt</strong>(handler) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Create and return an adapter for handler, or return h if it does not need adapting.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 58 |
| 59 |
| 60 |
| 61 |
| 62 |
| 63 |
| 64</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/handler/adapter.rb', line 58</span> |
| |
| <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_adapt'>adapt</span><span class='lparen'>(</span><span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span> |
| <span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_handler'>handler</span> |
| <span class='id identifier rubyid_a'>a</span> <span class='op'>=</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_h'>h</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_a'>a</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='const'><span class='object_link'><a href="ArrayHandler.html" title="Qpid::Proton::Handler::ArrayHandler (class)">ArrayHandler</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ArrayHandler.html#initialize-instance_method" title="Qpid::Proton::Handler::ArrayHandler#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_ac'>ac</span> <span class='op'>=</span> <span class='id identifier rubyid_adapter'>adapter</span><span class='lparen'>(</span><span class='id identifier rubyid_h'>h</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_ac'>ac</span> <span class='op'>?</span> <span class='id identifier rubyid_ac'>ac</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_h'>h</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_h'>h</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="adapter-class_method"> |
| |
| .<strong>adapter</strong>(handler) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Adapter class if requested by handler, else default to MessagingHandler</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 67 |
| 68 |
| 69</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/handler/adapter.rb', line 67</span> |
| |
| <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_adapter'>adapter</span><span class='lparen'>(</span><span class='id identifier rubyid_handler'>handler</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:proton_adapter_class</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_proton_adapter_class'>proton_adapter_class</span> <span class='op'>:</span> <span class='const'><span class='object_link'><a href="MessagingAdapter.html" title="Qpid::Proton::Handler::MessagingAdapter (class)">MessagingAdapter</a></span></span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| <div id="instance_method_details" class="method_details_list"> |
| <h2>Instance Method Details</h2> |
| |
| |
| <div class="method_details first"> |
| <h3 class="signature first" id="forward-instance_method"> |
| |
| #<strong>forward</strong>(method, *args) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 73 |
| 74 |
| 75</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/handler/adapter.rb', line 73</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_forward'>forward</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> |
| <span class='lparen'>(</span><span class='ivar'>@handler</span><span class='period'>.</span><span class='id identifier rubyid___send__'>__send__</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@handler</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span> <span class='id identifier rubyid_method'>method</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="proton_adapter_class-instance_method"> |
| |
| #<strong>proton_adapter_class</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Adapters don't need adapting</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 71</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/handler/adapter.rb', line 71</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_proton_adapter_class'>proton_adapter_class</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='kw'>nil</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div id="footer"> |
| Generated on Wed Nov 11 12:57:53 2020 by |
| <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> |
| 0.9.24 (ruby-2.7.2). |
| </div> |
| |
| </div> |
| </body> |
| </html> |