blob: 9f5d325ec3eb04c3939de3322c5ed1f95f95ff19 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Class: Qpid::Proton::Handler::MessagingHandler
&mdash; 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::MessagingHandler";
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 (M)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../Qpid.html" title="Qpid (module)">Qpid</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Proton.html" title="Qpid::Proton (module)">Proton</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Handler.html" title="Qpid::Proton::Handler (module)">Handler</a></span></span>
&raquo;
<span class="title">MessagingHandler</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::MessagingHandler
<span class="deprecated note title">Deprecated</span>
</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::MessagingHandler</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/handler/messaging_handler.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<div class="note deprecated"><strong>Deprecated.</strong> <div class='inline'>
<p>use <span class='object_link'><a href="../MessagingHandler.html" title="Qpid::Proton::MessagingHandler (class)">MessagingHandler</a></span></p>
</div></div>
</div>
</div>
<div class="tags">
</div>
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#options-instance_method" title="#options (instance method)">#<strong>options</strong> &#x21d2; Hash </a>
</span>
<span class="note title readonly">readonly</span>
<span class="summary_desc"><div class='inline'>
<p>Handler options, see <span class='object_link'><a href="#initialize-instance_method" title="Qpid::Proton::Handler::MessagingHandler#initialize (method)">#initialize</a></span>.</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 deprecated">
<span class="summary_signature">
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(*args) &#x21d2; MessagingHandler </a>
</span>
<span class="note title constructor">constructor</span>
<span class="deprecated note title">deprecated</span>
<span class="summary_desc"><strong>Deprecated.</strong> <div class='inline'>
<p>use <tt>initialize(opts)</tt> overload</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">
<span class="overload">#<strong>initialize</strong>(opts) &#x21d2; <tt><span class='object_link'><a href="" title="Qpid::Proton::Handler::MessagingHandler (class)">MessagingHandler</a></span></tt> </span>
<span class="overload">#<strong>initialize</strong>(prefetch = 10, auto_accept = true, auto_settle = true, peer_close_is_error = false) &#x21d2; <tt><span class='object_link'><a href="" title="Qpid::Proton::Handler::MessagingHandler (class)">MessagingHandler</a></span></tt> </span>
</h3><div class="docstring">
<div class="discussion">
<div class="note deprecated"><strong>Deprecated.</strong> <div class='inline'>
<p>use <tt>initialize(opts)</tt> overload</p>
</div></div>
<p>Returns a new instance of MessagingHandler.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Overloads:</p>
<ul class="overload">
<li class="overload_item">
<span class="signature">#<strong>initialize</strong>(opts) &#x21d2; <tt><span class='object_link'><a href="" title="Qpid::Proton::Handler::MessagingHandler (class)">MessagingHandler</a></span></tt> </span>
<div class="docstring">
<div class="discussion">
<p>Create a <span class='object_link'><a href="" title="Qpid::Proton::Handler::MessagingHandler (class)">Qpid::Proton::Handler::MessagingHandler</a></span> with options <code>opts</code></p>
</div>
</div>
<div class="tags">
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
<ul class="option">
<li>
<span class="name">:prefetch</span>
<span class="type">(<tt>Integer</tt>)</span>
<span class="default">
&mdash; default:
<tt>10</tt>
</span>
&mdash; <div class='inline'>
<p>The number of messages to fetch in advance, 0 disables prefetch.</p>
</div>
</li>
<li>
<span class="name">:auto_accept</span>
<span class="type">(<tt>Boolean</tt>)</span>
<span class="default">
&mdash; default:
<tt>true</tt>
</span>
&mdash; <div class='inline'>
<p>If true, incoming messages are accepted automatically after <span class='object_link'>#on_message</span>. If false, the application can accept, reject or release the message by calling methods on <span class='object_link'><a href="../Delivery.html" title="Qpid::Proton::Delivery (class)">Delivery</a></span> when the message has been processed.</p>
</div>
</li>
<li>
<span class="name">:auto_settle</span>
<span class="type">(<tt>Boolean</tt>)</span>
<span class="default">
&mdash; default:
<tt>true</tt>
</span>
&mdash; <div class='inline'>
<p>If true, outgoing messages are settled automatically when the remote peer settles. If false, the application must call Delivery#settle explicitly.</p>
</div>
</li>
<li>
<span class="name">:auto_open</span>
<span class="type">(<tt>Boolean</tt>)</span>
<span class="default">
&mdash; default:
<tt>true</tt>
</span>
&mdash; <div class='inline'>
<p>If true, incoming connections are opened automatically. If false, the application must call <span class='object_link'><a href="../Connection.html#open-instance_method" title="Qpid::Proton::Connection#open (method)">Connection#open</a></span> to open incoming connections.</p>
</div>
</li>
<li>
<span class="name">:auto_close</span>
<span class="type">(<tt>Boolean</tt>)</span>
<span class="default">
&mdash; default:
<tt>true</tt>
</span>
&mdash; <div class='inline'>
<p>If true, respond to a remote close automatically with a local close. If false, the application must call <span class='object_link'><a href="../Connection.html#close-instance_method" title="Qpid::Proton::Connection#close (method)">Connection#close</a></span> to finish closing connections.</p>
</div>
</li>
<li>
<span class="name">:peer_close_is_error</span>
<span class="type">(<tt>Boolean</tt>)</span>
<span class="default">
&mdash; default:
<tt>false</tt>
</span>
&mdash; <div class='inline'>
<p>If true, and the remote peer closes the connection without an error condition, the set the local error condition <span class='object_link'><a href="../Condition.html" title="Qpid::Proton::Condition (class)">Condition</a></span>(“error”, “unexpected peer close”)</p>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
53
54
55
56
57
58
59
60
61
62
63
64</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/handler/messaging_handler.rb', line 53</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
<span class='id identifier rubyid_deprecated'>deprecated</span> <span class='const'><span class='object_link'><a href="" title="Qpid::Proton::Handler::MessagingHandler (class)">MessagingHandler</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="../../../Qpid.html" title="Qpid (module)">Qpid</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Proton.html" title="Qpid::Proton (module)">Proton</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../MessagingHandler.html" title="Qpid::Proton::MessagingHandler (class)">MessagingHandler</a></span></span>
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
<span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
<span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_replace'>replace</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rparen'>)</span>
<span class='kw'>else</span> <span class='comment'># Fill options from deprecated fixed arguments
</span> <span class='lbracket'>[</span><span class='symbol'>:prefetch</span><span class='comma'>,</span> <span class='symbol'>:auto_accept</span><span class='comma'>,</span> <span class='symbol'>:auto_settle</span><span class='comma'>,</span> <span class='symbol'>:peer_close_is_error</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span>
<span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span> <span class='kw'>unless</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
<span class='kw'>end</span>
<span class='kw'>end</span> <span class='comment'># NOTE: the options are processed by {Handler::Adapater}
</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="instance_attr_details" class="attr_details">
<h2>Instance Attribute Details</h2>
<span id=""></span>
<div class="method_details first">
<h3 class="signature first" id="options-instance_method">
#<strong>options</strong> &#x21d2; <tt><span class='object_link'>Hash</span></tt> <span class="extras">(readonly)</span>
</h3><div class="docstring">
<div class="discussion">
<p>Returns handler options, see <span class='object_link'><a href="#initialize-instance_method" title="Qpid::Proton::Handler::MessagingHandler#initialize (method)">#initialize</a></span>.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt><span class='object_link'>Hash</span></tt>)</span>
&mdash;
<div class='inline'>
<p>handler options, see <span class='object_link'><a href="#initialize-instance_method" title="Qpid::Proton::Handler::MessagingHandler#initialize (method)">#initialize</a></span></p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
69
70
71</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/handler/messaging_handler.rb', line 69</span>
<span class='kw'>def</span> <span class='id identifier rubyid_options'>options</span>
<span class='ivar'>@options</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>