You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<spanclass="cm"> Copyright (c) 2010, Benjamin W. Smith</span>
5
+
<spanclass="cm"> All rights reserved.</span>
6
+
7
+
<spanclass="cm"> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</span>
8
+
9
+
<spanclass="cm"> * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</span>
10
+
<spanclass="cm"> * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or</span>
11
+
<spanclass="cm"> other materials provided with the distribution.</span>
12
+
<spanclass="cm"> * Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software</span>
13
+
<spanclass="cm"> without specific prior written permission.</span>
14
+
15
+
<spanclass="cm"> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT</span>
16
+
<spanclass="cm"> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE</span>
17
+
<spanclass="cm"> COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span>
18
+
<spanclass="cm"> (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</span>
19
+
<spanclass="cm"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span>
20
+
<spanclass="cm"> ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
<p>The <code>Frame</code> module provides an object representation of a <code>Stomp</code> frame.</p>
24
+
25
+
<h3>frame.Frame</h3>
26
+
27
+
<p>An instance of the <code>Frame</code> object.</p>
28
+
29
+
<pre><code>var frame = new frame.Frame();
30
+
</code></pre>
31
+
32
+
<h3>frame.Frame.build_frame()</h3>
33
+
34
+
<p>Build a frame object from an object of arguments.</p>
35
+
36
+
<pre><code>var args = {
37
+
command: '',
38
+
headers: {},
39
+
body: ''
40
+
};
41
+
42
+
this_frame = frame.build_frame(args);
43
+
</code></pre></td><tdclass="code"><divclass="highlight"><pre></pre></div></td></tr><trid="section-3"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow" href="#section-3">¶</a></div><h2>Frame - Object representation of a STOMP frame</h2></td><tdclass="code"><divclass="highlight"><pre><spanclass="kd">function</span><spanclass="nx">Frame</span><spanclass="p">()</span><spanclass="p">{</span>
<p><strong>Build frame based on arguments provided</strong></p>
50
+
51
+
<p>Takes arguments object needed to build frame (command, headers, body?)</p>
52
+
53
+
<p>Takes boolean to indicate that you wish to get a receipt (set receipt header)</p>
54
+
55
+
<p>Returns an object representing a frame</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="nx">Frame</span><spanclass="p">.</span><spanclass="nx">prototype</span><spanclass="p">.</span><spanclass="nx">build_frame</span><spanclass="o">=</span><spanclass="kd">function</span><spanclass="p">(</span><spanclass="nx">args</span><spanclass="p">,</span><spanclass="nx">want_receipt</span><spanclass="p">)</span><spanclass="p">{</span>
<p><strong>String representation of Frame object</strong></p>
77
+
78
+
<p>Returns <code>Frame</code> as string</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="nx">Frame</span><spanclass="p">.</span><spanclass="nx">prototype</span><spanclass="p">.</span><spanclass="nx">as_string</span><spanclass="o">=</span><spanclass="kd">function</span><spanclass="p">()</span><spanclass="p">{</span>
0 commit comments