| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title> |
| Class: Qpid::Proton::Delivery |
| |
| — 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::Delivery"; |
| 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 (D)</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">Delivery</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::Delivery |
| |
| |
| |
| </h1> |
| <div class="box_info"> |
| |
| <dl> |
| <dt>Inherits:</dt> |
| <dd> |
| <span class="inheritName"><span class='object_link'><a href="Transfer.html" title="Qpid::Proton::Transfer (class)">Transfer</a></span></span> |
| |
| <ul class="fullTree"> |
| <li>Object</li> |
| |
| <li class="next"><span class='object_link'><a href="Transfer.html" title="Qpid::Proton::Transfer (class)">Transfer</a></span></li> |
| |
| <li class="next">Qpid::Proton::Delivery</li> |
| |
| </ul> |
| <a href="#" class="inheritanceTree">show all</a> |
| |
| </dd> |
| </dl> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <dl> |
| <dt>Defined in:</dt> |
| <dd>lib/core/delivery.rb</dd> |
| </dl> |
| |
| </div> |
| |
| <h2>Overview</h2><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Allow a <span class='object_link'><a href="Receiver.html" title="Qpid::Proton::Receiver (class)">Receiver</a></span> to indicate the status of a received message to the <span class='object_link'><a href="Sender.html" title="Qpid::Proton::Sender (class)">Sender</a></span></p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div> |
| |
| |
| <h2>Constant Summary</h2> |
| |
| <h3 class="inherited">Constants inherited |
| from <span class='object_link'><a href="Transfer.html" title="Qpid::Proton::Transfer (class)">Transfer</a></span></h3> |
| <p class="inherited"><span class='object_link'><a href="Transfer.html#PROTON_METHOD_PREFIX-constant" title="Qpid::Proton::Transfer::PROTON_METHOD_PREFIX (constant)">Transfer::PROTON_METHOD_PREFIX</a></span>, <span class='object_link'><a href="Transfer.html#State-constant" title="Qpid::Proton::Transfer::State (constant)">Transfer::State</a></span></p> |
| |
| |
| |
| <h3 class="inherited">Constants included |
| from <span class='object_link'><a href="Disposition/State.html" title="Qpid::Proton::Disposition::State (module)">Qpid::Proton::Disposition::State</a></span></h3> |
| <p class="inherited"><span class='object_link'><a href="Disposition/State.html#ACCEPTED-constant" title="Qpid::Proton::Disposition::State::ACCEPTED (constant)">Qpid::Proton::Disposition::State::ACCEPTED</a></span>, <span class='object_link'><a href="Disposition/State.html#MODIFIED-constant" title="Qpid::Proton::Disposition::State::MODIFIED (constant)">Qpid::Proton::Disposition::State::MODIFIED</a></span>, <span class='object_link'><a href="Disposition/State.html#RECEIVED-constant" title="Qpid::Proton::Disposition::State::RECEIVED (constant)">Qpid::Proton::Disposition::State::RECEIVED</a></span>, <span class='object_link'><a href="Disposition/State.html#REJECTED-constant" title="Qpid::Proton::Disposition::State::REJECTED (constant)">Qpid::Proton::Disposition::State::REJECTED</a></span>, <span class='object_link'><a href="Disposition/State.html#RELEASED-constant" title="Qpid::Proton::Disposition::State::RELEASED (constant)">Qpid::Proton::Disposition::State::RELEASED</a></span></p> |
| |
| |
| |
| |
| |
| |
| <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="#aborted%3F-instance_method" title="#aborted? (instance method)">#<strong>aborted?</strong> ⇒ Boolean </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>True if the transfer was aborted by the sender.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#accept-instance_method" title="#accept (instance method)">#<strong>accept</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Accept the receiveed message.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#complete%3F-instance_method" title="#complete? (instance method)">#<strong>complete?</strong> ⇒ Boolean </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>True if the incoming message is complete, call <span class='object_link'><a href="#message-instance_method" title="Qpid::Proton::Delivery#message (method)">#message</a></span> to retrieve it.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(*args) ⇒ Delivery </a> |
| |
| |
| |
| </span> |
| |
| |
| <span class="note title constructor">constructor</span> |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>A new instance of Delivery.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#message-instance_method" title="#message (instance method)">#<strong>message</strong> ⇒ Message </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Get the message from the delivery.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public deprecated"> |
| <span class="summary_signature"> |
| |
| <a href="#modify-instance_method" title="#modify (instance method)">#<strong>modify</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| <span class="deprecated note title">deprecated</span> |
| |
| |
| |
| <span class="summary_desc"><strong>Deprecated.</strong> <div class='inline'> |
| <p>use <span class='object_link'><a href="#release-instance_method" title="Qpid::Proton::Delivery#release (method)">#release</a></span> with modification options</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#receiver-instance_method" title="#receiver (instance method)">#<strong>receiver</strong> ⇒ Receiver </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>The parent <span class='object_link'><a href="Receiver.html" title="Qpid::Proton::Receiver (class)">Receiver</a></span> link.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#reject-instance_method" title="#reject (instance method)">#<strong>reject</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Reject a message, indicating to the sender that is invalid and should never be delivered again to this or any other receiver.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#release-instance_method" title="#release (instance method)">#<strong>release</strong>(opts = nil) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>Release a message, indicating to the sender that it was not processed but may be delivered again to this or another receiver.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| </ul> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Transfer.html" title="Qpid::Proton::Transfer (class)">Transfer</a></span></h3> |
| <p class="inherited"><span class='object_link'><a href="Transfer.html#connection-instance_method" title="Qpid::Proton::Transfer#connection (method)">#connection</a></span>, <span class='object_link'><a href="Transfer.html#id-instance_method" title="Qpid::Proton::Transfer#id (method)">#id</a></span>, <span class='object_link'><a href="Transfer.html#inspect-instance_method" title="Qpid::Proton::Transfer#inspect (method)">#inspect</a></span>, <span class='object_link'><a href="Transfer.html#link-instance_method" title="Qpid::Proton::Transfer#link (method)">#link</a></span>, <span class='object_link'><a href="Transfer.html#local_state-instance_method" title="Qpid::Proton::Transfer#local_state (method)">#local_state</a></span>, <span class='object_link'><a href="Transfer.html#session-instance_method" title="Qpid::Proton::Transfer#session (method)">#session</a></span>, <span class='object_link'><a href="Transfer.html#settle-instance_method" title="Qpid::Proton::Transfer#settle (method)">#settle</a></span>, <span class='object_link'><a href="Transfer.html#settled%3F-instance_method" title="Qpid::Proton::Transfer#settled? (method)">#settled?</a></span>, <span class='object_link'><a href="Transfer.html#state-instance_method" title="Qpid::Proton::Transfer#state (method)">#state</a></span>, <span class='object_link'><a href="Transfer.html#to_s-instance_method" title="Qpid::Proton::Transfer#to_s (method)">#to_s</a></span>, <span class='object_link'><a href="Transfer.html#transport-instance_method" title="Qpid::Proton::Transfer#transport (method)">#transport</a></span>, <span class='object_link'><a href="Transfer.html#update-instance_method" title="Qpid::Proton::Transfer#update (method)">#update</a></span>, <span class='object_link'><a href="Transfer.html#work_queue-instance_method" title="Qpid::Proton::Transfer#work_queue (method)">#work_queue</a></span>, <span class='object_link'><a href="Transfer.html#wrap-class_method" title="Qpid::Proton::Transfer.wrap (method)">wrap</a></span></p> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <h3 class="inherited">Methods included from <span class='object_link'><a href="Disposition/State/ClassMethods.html" title="Qpid::Proton::Disposition::State::ClassMethods (module)">Qpid::Proton::Disposition::State::ClassMethods</a></span></h3> |
| <p class="inherited"><span class='object_link'><a href="Disposition/State/ClassMethods.html#name_of-instance_method" title="Qpid::Proton::Disposition::State::ClassMethods#name_of (method)">#name_of</a></span></p> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <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>(*args) ⇒ <tt><span class='object_link'><a href="" title="Qpid::Proton::Delivery (class)">Delivery</a></span></tt> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns a new instance of Delivery.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 21</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/core/delivery.rb', line 21</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='kw'>super</span><span class='semicolon'>;</span> <span class='ivar'>@message</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='semicolon'>;</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="aborted?-instance_method"> |
| |
| #<strong>aborted?</strong> ⇒ <tt>Boolean</tt> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns True if the transfer was aborted by the sender.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| <p class="tag_title">Returns:</p> |
| <ul class="return"> |
| |
| <li> |
| |
| |
| <span class='type'>(<tt>Boolean</tt>)</span> |
| |
| |
| |
| — |
| <div class='inline'> |
| <p>True if the transfer was aborted by the sender.</p> |
| </div> |
| |
| </li> |
| |
| </ul> |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 74</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/core/delivery.rb', line 74</span> |
| |
| <span class='id identifier rubyid_proton_caller'>proton_caller</span> <span class='symbol'>:aborted?</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="accept-instance_method"> |
| |
| #<strong>accept</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Accept the receiveed message.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 27</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/core/delivery.rb', line 27</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_accept'>accept</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='id identifier rubyid_settle'>settle</span> <span class='const'><span class='object_link'><a href="Disposition/State.html#ACCEPTED-constant" title="Qpid::Proton::Disposition::State::ACCEPTED (constant)">ACCEPTED</a></span></span><span class='semicolon'>;</span> <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="complete?-instance_method"> |
| |
| #<strong>complete?</strong> ⇒ <tt>Boolean</tt> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns true if the incoming message is complete, call <span class='object_link'><a href="#message-instance_method" title="Qpid::Proton::Delivery#message (method)">#message</a></span> to retrieve it.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| <p class="tag_title">Returns:</p> |
| <ul class="return"> |
| |
| <li> |
| |
| |
| <span class='type'>(<tt>Boolean</tt>)</span> |
| |
| |
| |
| — |
| <div class='inline'> |
| <p>true if the incoming message is complete, call <span class='object_link'><a href="#message-instance_method" title="Qpid::Proton::Delivery#message (method)">#message</a></span> to retrieve it.</p> |
| </div> |
| |
| </li> |
| |
| </ul> |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 77</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/core/delivery.rb', line 77</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_complete?'>complete?</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='id identifier rubyid_readable?'>readable?</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_aborted?'>aborted?</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_partial?'>partial?</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="message-instance_method"> |
| |
| #<strong>message</strong> ⇒ <tt><span class='object_link'><a href="Message.html" title="Qpid::Proton::Message (class)">Message</a></span></tt> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Get the message from the delivery.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| <p class="tag_title">Returns:</p> |
| <ul class="return"> |
| |
| <li> |
| |
| |
| <span class='type'>(<tt><span class='object_link'><a href="Message.html" title="Qpid::Proton::Message (class)">Message</a></span></tt>)</span> |
| |
| |
| |
| — |
| <div class='inline'> |
| <p>The message</p> |
| </div> |
| |
| </li> |
| |
| </ul> |
| <p class="tag_title">Raises:</p> |
| <ul class="raise"> |
| |
| <li> |
| |
| |
| <span class='type'>(<tt><span class='object_link'><a href="AbortedError.html" title="Qpid::Proton::AbortedError (class)">AbortedError</a></span></tt>)</span> |
| |
| |
| |
| — |
| <div class='inline'> |
| <p>if the message has been aborted (check with <span class='object_link'><a href="#aborted%3F-instance_method" title="Qpid::Proton::Delivery#aborted? (method)">#aborted?</a></span></p> |
| </div> |
| |
| </li> |
| |
| <li> |
| |
| |
| <span class='type'>(<tt><span class='object_link'><a href="UnderflowError.html" title="Qpid::Proton::UnderflowError (class)">UnderflowError</a></span></tt>)</span> |
| |
| |
| |
| — |
| <div class='inline'> |
| <p>if the message is incomplete (check with <span class='object_link'><a href="#complete%3F-instance_method" title="Qpid::Proton::Delivery#complete? (method)">#complete?</a></span></p> |
| </div> |
| |
| </li> |
| |
| <li> |
| |
| |
| <span class='type'>(<tt>::ArgumentError</tt>)</span> |
| |
| |
| |
| — |
| <div class='inline'> |
| <p>if the delivery is not the current delivery on a receiving link.</p> |
| </div> |
| |
| </li> |
| |
| </ul> |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 84 |
| 85 |
| 86 |
| 87 |
| 88 |
| 89 |
| 90 |
| 91 |
| 92 |
| 93 |
| 94</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/core/delivery.rb', line 84</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_message'>message</span> |
| <span class='kw'>unless</span> <span class='ivar'>@message</span> |
| <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="AbortedError.html" title="Qpid::Proton::AbortedError (class)">AbortedError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>message aborted by sender</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_aborted?'>aborted?</span> |
| <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="UnderflowError.html" title="Qpid::Proton::UnderflowError (class)">UnderflowError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>incoming message incomplete</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_partial?'>partial?</span> |
| <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="ArgumentError.html" title="Qpid::Proton::ArgumentError (class)">ArgumentError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>no incoming message</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_readable?'>readable?</span> |
| <span class='ivar'>@message</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Message.html" title="Qpid::Proton::Message (class)">Message</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Message.html#initialize-instance_method" title="Qpid::Proton::Message#initialize (method)">new</a></span></span> |
| <span class='ivar'>@message</span><span class='period'>.</span><span class='id identifier rubyid_decode'>decode</span><span class='lparen'>(</span><span class='id identifier rubyid_link'>link</span><span class='period'>.</span><span class='id identifier rubyid_receive'>receive</span><span class='lparen'>(</span><span class='id identifier rubyid_pending'>pending</span><span class='rparen'>)</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_link'>link</span><span class='period'>.</span><span class='id identifier rubyid_advance'>advance</span> |
| <span class='kw'>end</span> |
| <span class='ivar'>@message</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="modify-instance_method"> |
| |
| #<strong>modify</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| <div class="note deprecated"><strong>Deprecated.</strong> <div class='inline'> |
| <p>use <span class='object_link'><a href="#release-instance_method" title="Qpid::Proton::Delivery#release (method)">#release</a></span> with modification options</p> |
| </div></div> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 68 |
| 69 |
| 70 |
| 71</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/core/delivery.rb', line 68</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_modify'>modify</span><span class='lparen'>(</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_deprecated'>deprecated</span> <span class='id identifier rubyid___method__'>__method__</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>release(modification_options)</span><span class='tstring_end'>"</span></span> |
| <span class='id identifier rubyid_release'>release</span> <span class='id identifier rubyid_failed'>failed</span><span class='op'>=></span><span class='kw'>true</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="receiver-instance_method"> |
| |
| #<strong>receiver</strong> ⇒ <tt><span class='object_link'><a href="Receiver.html" title="Qpid::Proton::Receiver (class)">Receiver</a></span></tt> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Returns The parent <span class='object_link'><a href="Receiver.html" title="Qpid::Proton::Receiver (class)">Receiver</a></span> link.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| <p class="tag_title">Returns:</p> |
| <ul class="return"> |
| |
| <li> |
| |
| |
| <span class='type'>(<tt><span class='object_link'><a href="Receiver.html" title="Qpid::Proton::Receiver (class)">Receiver</a></span></tt>)</span> |
| |
| |
| |
| — |
| <div class='inline'> |
| <p>The parent <span class='object_link'><a href="Receiver.html" title="Qpid::Proton::Receiver (class)">Receiver</a></span> link.</p> |
| </div> |
| |
| </li> |
| |
| </ul> |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 24</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/core/delivery.rb', line 24</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_receiver'>receiver</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='id identifier rubyid_link'>link</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="reject-instance_method"> |
| |
| #<strong>reject</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Reject a message, indicating to the sender that is invalid and should never be delivered again to this or any other receiver.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 31</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/core/delivery.rb', line 31</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_reject'>reject</span><span class='lparen'>(</span><span class='rparen'>)</span> <span class='id identifier rubyid_settle'>settle</span> <span class='const'><span class='object_link'><a href="Disposition/State.html#REJECTED-constant" title="Qpid::Proton::Disposition::State::REJECTED (constant)">REJECTED</a></span></span><span class='semicolon'>;</span> <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="release-instance_method"> |
| |
| #<strong>release</strong>(opts = nil) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| |
| <p>Release a message, indicating to the sender that it was not processed but may be delivered again to this or another receiver.</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| <p class="tag_title">Parameters:</p> |
| <ul class="param"> |
| |
| <li> |
| |
| <span class='name'>opts</span> |
| |
| |
| <span class='type'>(<tt><span class='object_link'>Hash</span></tt>)</span> |
| |
| |
| <em class="default">(defaults to: <tt>nil</tt>)</em> |
| |
| |
| — |
| <div class='inline'> |
| <p>Instructions to the sender to modify re-delivery. To allow re-delivery with no modifications at all use <tt>release(nil)</tt></p> |
| </div> |
| |
| </li> |
| |
| </ul> |
| |
| |
| |
| |
| <p class="tag_title">Options Hash (<tt>opts</tt>):</p> |
| <ul class="option"> |
| |
| <li> |
| <span class="name">:failed</span> |
| <span class="type">(<tt>Boolean</tt>)</span> |
| <span class="default"> |
| |
| — default: |
| <tt>true</tt> |
| |
| </span> |
| |
| — <div class='inline'> |
| <p>Instruct the sender to increase <span class='object_link'><a href="Message.html#delivery_count-instance_method" title="Qpid::Proton::Message#delivery_count (method)">Message#delivery_count</a></span> so future receivers will know there was a previous failed delivery.</p> |
| </div> |
| |
| </li> |
| |
| <li> |
| <span class="name">:undeliverable</span> |
| <span class="type">(<tt>Boolean</tt>)</span> |
| <span class="default"> |
| |
| — default: |
| <tt>false</tt> |
| |
| </span> |
| |
| — <div class='inline'> |
| <p>Instruct the sender that this message should never be re-delivered to this receiver, although it may be delivered other receivers.</p> |
| </div> |
| |
| </li> |
| |
| <li> |
| <span class="name">:annotations</span> |
| <span class="type">(<tt><span class='object_link'>Hash</span></tt>)</span> |
| <span class="default"> |
| |
| </span> |
| |
| — <div class='inline'> |
| <p>Instruct the sender to update the <span class='object_link'><a href="Message.html#annotations-instance_method" title="Qpid::Proton::Message#annotations (method)">Message#annotations</a></span> with these <tt>key=>value</tt> pairs before re-delivery, replacing existing entries in <span class='object_link'><a href="Message.html#annotations-instance_method" title="Qpid::Proton::Message#annotations (method)">Message#annotations</a></span> with the same key.</p> |
| </div> |
| |
| </li> |
| |
| </ul> |
| |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 50 |
| 51 |
| 52 |
| 53 |
| 54 |
| 55 |
| 56 |
| 57 |
| 58 |
| 59 |
| 60 |
| 61 |
| 62 |
| 63 |
| 64 |
| 65</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'lib/core/delivery.rb', line 50</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_release'>release</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='symbol'>:failed</span> <span class='op'>=></span> <span class='kw'>false</span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>==</span> <span class='kw'>false</span><span class='rparen'>)</span> <span class='comment'># deprecated |
| </span> <span class='id identifier rubyid_failed'>failed</span> <span class='op'>=</span> <span class='op'>!</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>||</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:failed</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_undeliverable'>undeliverable</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>&&</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:undeliverable</span><span class='rbracket'>]</span> |
| <span class='id identifier rubyid_annotations'>annotations</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>&&</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:annotations</span><span class='rbracket'>]</span> |
| <span class='id identifier rubyid_annotations'>annotations</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_annotations'>annotations</span> <span class='op'>&&</span> <span class='id identifier rubyid_annotations'>annotations</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> |
| <span class='kw'>if</span> <span class='id identifier rubyid_failed'>failed</span> <span class='op'>||</span> <span class='id identifier rubyid_undeliverable'>undeliverable</span> <span class='op'>||</span> <span class='id identifier rubyid_annotations'>annotations</span> |
| <span class='id identifier rubyid_d'>d</span> <span class='op'>=</span> <span class='const'>Cproton</span><span class='period'>.</span><span class='id identifier rubyid_pn_delivery_local'>pn_delivery_local</span><span class='lparen'>(</span><span class='ivar'>@impl</span><span class='rparen'>)</span> |
| <span class='const'>Cproton</span><span class='period'>.</span><span class='id identifier rubyid_pn_disposition_set_failed'>pn_disposition_set_failed</span><span class='lparen'>(</span><span class='id identifier rubyid_d'>d</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_failed'>failed</span> |
| <span class='const'>Cproton</span><span class='period'>.</span><span class='id identifier rubyid_pn_disposition_set_undeliverable'>pn_disposition_set_undeliverable</span><span class='lparen'>(</span><span class='id identifier rubyid_d'>d</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_undeliverable'>undeliverable</span> |
| <span class='const'>Codec</span><span class='op'>::</span><span class='const'>Data</span><span class='period'>.</span><span class='id identifier rubyid_from_object'>from_object</span><span class='lparen'>(</span><span class='const'>Cproton</span><span class='period'>.</span><span class='id identifier rubyid_pn_disposition_annotations'>pn_disposition_annotations</span><span class='lparen'>(</span><span class='id identifier rubyid_d'>d</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_annotations'>annotations</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_annotations'>annotations</span> |
| <span class='id identifier rubyid_settle'>settle</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Disposition/State.html#MODIFIED-constant" title="Qpid::Proton::Disposition::State::MODIFIED (constant)">MODIFIED</a></span></span><span class='rparen'>)</span> |
| <span class='kw'>else</span> |
| <span class='id identifier rubyid_settle'>settle</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Disposition/State.html#RELEASED-constant" title="Qpid::Proton::Disposition::State::RELEASED (constant)">RELEASED</a></span></span><span class='rparen'>)</span> |
| <span class='kw'>end</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div id="footer"> |
| Generated on Wed Nov 11 12:57:52 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> |