This repository was archived by the owner on Nov 28, 2018. It is now read-only.
File tree 7 files changed +75
-5
lines changed
7 files changed +75
-5
lines changed Original file line number Diff line number Diff line change 1
- <!DOCTYPE html> < html > < head > < title > frame.js</ title > < meta http-equiv ="content-type " content ="text/html; charset=UTF-8 "> < link rel ="stylesheet " media ="all " href ="docco.css " /> </ head > < body > < div id ="container "> < div id ="background "> </ div > < div id ="jump_to "> Jump To … < div id ="jump_wrapper "> < div id ="jump_page "> < a class ="source " href ="frame.html "> frame.js </ a > < a class ="source " href ="stomp-exceptions.html "> stomp-exceptions.js </ a > < a class ="source " href ="stomp-utils.html "> stomp-utils.js </ a > < a class ="source " href ="stomp.html "> stomp.js </ a > </ div > </ div > </ div > < table cellpadding ="0 " cellspacing ="0 "> < thead > < tr > < th class ="docs "> < h1 > frame.js </ h1 > </ th > < th class ="code "> </ th > </ tr > </ thead > < tbody > < tr id ="section-1 "> < td class ="docs "> < div class ="pilwrap "> < a class ="pilcrow " href ="#section-1 "> ¶</ a > </ div > < h2 > frame</ h2 >
1
+ <!DOCTYPE html> < html > < head > < title > frame.js</ title > < meta http-equiv ="content-type " content ="text/html; charset=UTF-8 "> < link rel ="stylesheet " media ="all " href ="docco.css " /> </ head > < body > < div id ="container "> < div id ="background "> </ div > < div id ="jump_to "> Jump To … < div id ="jump_wrapper "> < div id ="jump_page "> < a class ="source " href ="frame.html "> frame.js </ a > < a class ="source " href ="index.html "> index.js </ a > < a class ="source " href ="stomp-exceptions.html "> stomp-exceptions.js </ a > < a class ="source " href ="stomp-utils.html "> stomp-utils.js </ a > < a class ="source " href ="stomp.html "> stomp.js </ a > </ div > </ div > </ div > < table cellpadding ="0 " cellspacing ="0 "> < thead > < tr > < th class ="docs "> < h1 > frame.js </ h1 > </ th > < th class ="code "> </ th > </ tr > </ thead > < tbody > < tr id ="section-1 "> < td class ="docs "> < div class ="pilwrap "> < a class ="pilcrow " href ="#section-1 "> ¶</ a > </ div > < h2 > frame</ h2 >
2
2
3
3
< p > The < code > Frame</ code > module provides an object representation of a < code > Stomp</ code > frame.</ p >
4
4
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html> < html > < head > < title > index.js</ title > < meta http-equiv ="content-type " content ="text/html; charset=UTF-8 "> < link rel ="stylesheet " media ="all " href ="docco.css " /> </ head > < body > < div id ="container "> < div id ="background "> </ div > < div id ="jump_to "> Jump To … < div id ="jump_wrapper "> < div id ="jump_page "> < a class ="source " href ="frame.html "> frame.js </ a > < a class ="source " href ="index.html "> index.js </ a > < a class ="source " href ="stomp-exceptions.html "> stomp-exceptions.js </ a > < a class ="source " href ="stomp-utils.html "> stomp-utils.js </ a > < a class ="source " href ="stomp.html "> stomp.js </ a > </ div > </ div > </ div > < table cellpadding ="0 " cellspacing ="0 "> < thead > < tr > < th class ="docs "> < h1 > index.js </ h1 > </ th > < th class ="code "> </ th > </ tr > </ thead > < tbody > < tr id ="section-1 "> < td class ="docs "> < div class ="pilwrap "> < a class ="pilcrow " href ="#section-1 "> ¶</ a > </ div > < h1 > stomp-js</ h1 >
2
+
3
+ < h2 > Overview</ h2 >
4
+
5
+ < p > An exercise with node.js to implement the STOMP protocol.</ p >
6
+
7
+ < p > For documentation see doc/stomp.md and doc/frame.md</ p >
8
+
9
+ < h2 > Installation</ h2 >
10
+
11
+ < p > < code > npm install stomp</ code > </ p >
12
+
13
+ < p > < code > git clone https://benjaminws@github.com/benjaminws/stomp-js.git</ code > </ p >
14
+
15
+ < h2 > Examples</ h2 >
16
+
17
+ < h3 > Consumer</ h3 >
18
+
19
+ < p > See examples/stomp-consumer.js</ p >
20
+
21
+ < h3 > Producer</ h3 >
22
+
23
+ < p > See examples/stomp-producer.js</ p >
24
+
25
+ < h3 > Producer with Transaction Support</ h3 >
26
+
27
+ < p > See examples/stomp-producer-txn.js</ p > </ td > < td class ="code "> < div class ="highlight "> < pre >
28
+
29
+ </ pre > </ div > </ td > </ tr > </ tbody > </ table > </ div > </ body > </ html >
Original file line number Diff line number Diff line change 1
- <!DOCTYPE html> < html > < head > < title > stomp-exceptions.js</ title > < meta http-equiv ="content-type " content ="text/html; charset=UTF-8 "> < link rel ="stylesheet " media ="all " href ="docco.css " /> </ head > < body > < div id ="container "> < div id ="background "> </ div > < div id ="jump_to "> Jump To … < div id ="jump_wrapper "> < div id ="jump_page "> < a class ="source " href ="frame.html "> frame.js </ a > < a class ="source " href ="stomp-exceptions.html "> stomp-exceptions.js </ a > < a class ="source " href ="stomp-utils.html "> stomp-utils.js </ a > < a class ="source " href ="stomp.html "> stomp.js </ a > </ div > </ div > </ div > < table cellpadding ="0 " cellspacing ="0 "> < thead > < tr > < th class ="docs "> < h1 > stomp-exceptions.js </ h1 > </ th > < th class ="code "> </ th > </ tr > </ thead > < tbody > < tr id ="section-1 "> < td class ="docs "> < div class ="pilwrap "> < a class ="pilcrow " href ="#section-1 "> ¶</ a > </ div > </ td > < td class ="code "> < div class ="highlight "> < pre > < span class ="nx "> QueueEmpty</ span > < span class ="o "> =</ span > < span class ="nx "> exports</ span > < span class ="p "> .</ span > < span class ="nx "> QueueEmpty</ span > < span class ="o "> =</ span > < span class ="kd "> function</ span > < span class ="p "> ()</ span > < span class ="p "> {</ span >
1
+ <!DOCTYPE html> < html > < head > < title > stomp-exceptions.js</ title > < meta http-equiv ="content-type " content ="text/html; charset=UTF-8 "> < link rel ="stylesheet " media ="all " href ="docco.css " /> </ head > < body > < div id ="container "> < div id ="background "> </ div > < div id ="jump_to "> Jump To … < div id ="jump_wrapper "> < div id ="jump_page "> < a class ="source " href ="frame.html "> frame.js </ a > < a class ="source " href ="index.html "> index.js </ a > < a class ="source " href ="stomp-exceptions.html "> stomp-exceptions.js </ a > < a class ="source " href ="stomp-utils.html "> stomp-utils.js </ a > < a class ="source " href ="stomp.html "> stomp.js </ a > </ div > </ div > </ div > < table cellpadding ="0 " cellspacing ="0 "> < thead > < tr > < th class ="docs "> < h1 > stomp-exceptions.js </ h1 > </ th > < th class ="code "> </ th > </ tr > </ thead > < tbody > < tr id ="section-1 "> < td class ="docs "> < div class ="pilwrap "> < a class ="pilcrow " href ="#section-1 "> ¶</ a > </ div > </ td > < td class ="code "> < div class ="highlight "> < pre > < span class ="nx "> QueueEmpty</ span > < span class ="o "> =</ span > < span class ="nx "> exports</ span > < span class ="p "> .</ span > < span class ="nx "> QueueEmpty</ span > < span class ="o "> =</ span > < span class ="kd "> function</ span > < span class ="p "> ()</ span > < span class ="p "> {</ span >
2
2
< span class ="k "> this</ span > < span class ="p "> .</ span > < span class ="nx "> name</ span > < span class ="o "> =</ span > < span class ="s2 "> "QueueEmpty"</ span > < span class ="p "> ;</ span >
3
3
< span class ="k "> this</ span > < span class ="p "> .</ span > < span class ="nx "> message</ span > < span class ="o "> =</ span > < span class ="s2 "> "Queue is Empty"</ span > < span class ="p "> ;</ span >
4
4
< span class ="p "> };</ span >
Original file line number Diff line number Diff line change 1
- <!DOCTYPE html> < html > < head > < title > stomp-utils.js</ title > < meta http-equiv ="content-type " content ="text/html; charset=UTF-8 "> < link rel ="stylesheet " media ="all " href ="docco.css " /> </ head > < body > < div id ="container "> < div id ="background "> </ div > < div id ="jump_to "> Jump To … < div id ="jump_wrapper "> < div id ="jump_page "> < a class ="source " href ="frame.html "> frame.js </ a > < a class ="source " href ="stomp-exceptions.html "> stomp-exceptions.js </ a > < a class ="source " href ="stomp-utils.html "> stomp-utils.js </ a > < a class ="source " href ="stomp.html "> stomp.js </ a > </ div > </ div > </ div > < table cellpadding ="0 " cellspacing ="0 "> < thead > < tr > < th class ="docs "> < h1 > stomp-utils.js </ h1 > </ th > < th class ="code "> </ th > </ tr > </ thead > < tbody > < tr id ="section-1 "> < td class ="docs "> < div class ="pilwrap "> < a class ="pilcrow " href ="#section-1 "> ¶</ a > </ div > </ td > < td class ="code "> < div class ="highlight "> < pre > < span class ="kd "> var</ span > < span class ="nx "> exceptions</ span > < span class ="o "> =</ span > < span class ="nx "> require</ span > < span class ="p "> (</ span > < span class ="s1 "> './stomp-exceptions'</ span > < span class ="p "> );</ span >
1
+ <!DOCTYPE html> < html > < head > < title > stomp-utils.js</ title > < meta http-equiv ="content-type " content ="text/html; charset=UTF-8 "> < link rel ="stylesheet " media ="all " href ="docco.css " /> </ head > < body > < div id ="container "> < div id ="background "> </ div > < div id ="jump_to "> Jump To … < div id ="jump_wrapper "> < div id ="jump_page "> < a class ="source " href ="frame.html "> frame.js </ a > < a class ="source " href ="index.html "> index.js </ a > < a class ="source " href ="stomp-exceptions.html "> stomp-exceptions.js </ a > < a class ="source " href ="stomp-utils.html "> stomp-utils.js </ a > < a class ="source " href ="stomp.html "> stomp.js </ a > </ div > </ div > </ div > < table cellpadding ="0 " cellspacing ="0 "> < thead > < tr > < th class ="docs "> < h1 > stomp-utils.js </ h1 > </ th > < th class ="code "> </ th > </ tr > </ thead > < tbody > < tr id ="section-1 "> < td class ="docs "> < div class ="pilwrap "> < a class ="pilcrow " href ="#section-1 "> ¶</ a > </ div > </ td > < td class ="code "> < div class ="highlight "> < pre > < span class ="kd "> var</ span > < span class ="nx "> exceptions</ span > < span class ="o "> =</ span > < span class ="nx "> require</ span > < span class ="p "> (</ span > < span class ="s1 "> './stomp-exceptions'</ span > < span class ="p "> );</ span >
2
2
< span class ="kd "> var</ span > < span class ="nx "> sys</ span > < span class ="o "> =</ span > < span class ="nx "> require</ span > < span class ="p "> (</ span > < span class ="s1 "> 'util'</ span > < span class ="p "> );</ span >
3
3
4
4
< span class ="nx "> StompLogging</ span > < span class ="o "> =</ span > < span class ="nx "> exports</ span > < span class ="p "> .</ span > < span class ="nx "> StompLogging</ span > < span class ="o "> =</ span > < span class ="kd "> function</ span > < span class ="p "> (</ span > < span class ="nx "> should_debug</ span > < span class ="p "> )</ span > < span class ="p "> {</ span >
Original file line number Diff line number Diff line change 1
- <!DOCTYPE html> < html > < head > < title > stomp.js</ title > < meta http-equiv ="content-type " content ="text/html; charset=UTF-8 "> < link rel ="stylesheet " media ="all " href ="docco.css " /> </ head > < body > < div id ="container "> < div id ="background "> </ div > < div id ="jump_to "> Jump To … < div id ="jump_wrapper "> < div id ="jump_page "> < a class ="source " href ="frame.html "> frame.js </ a > < a class ="source " href ="stomp-exceptions.html "> stomp-exceptions.js </ a > < a class ="source " href ="stomp-utils.html "> stomp-utils.js </ a > < a class ="source " href ="stomp.html "> stomp.js </ a > </ div > </ div > </ div > < table cellpadding ="0 " cellspacing ="0 "> < thead > < tr > < th class ="docs "> < h1 > stomp.js </ h1 > </ th > < th class ="code "> </ th > </ tr > </ thead > < tbody > < tr id ="section-1 "> < td class ="docs "> < div class ="pilwrap "> < a class ="pilcrow " href ="#section-1 "> ¶</ a > </ div > < h2 > stomp</ h2 >
1
+ <!DOCTYPE html> < html > < head > < title > stomp.js</ title > < meta http-equiv ="content-type " content ="text/html; charset=UTF-8 "> < link rel ="stylesheet " media ="all " href ="docco.css " /> </ head > < body > < div id ="container "> < div id ="background "> </ div > < div id ="jump_to "> Jump To … < div id ="jump_wrapper "> < div id ="jump_page "> < a class ="source " href ="frame.html "> frame.js </ a > < a class ="source " href ="index.html "> index.js </ a > < a class ="source " href ="stomp-exceptions.html "> stomp-exceptions.js </ a > < a class ="source " href ="stomp-utils.html "> stomp-utils.js </ a > < a class ="source " href ="stomp.html "> stomp.js </ a > </ div > </ div > </ div > < table cellpadding ="0 " cellspacing ="0 "> < thead > < tr > < th class ="docs "> < h1 > stomp.js </ h1 > </ th > < th class ="code "> </ th > </ tr > </ thead > < tbody > < tr id ="section-1 "> < td class ="docs "> < div class ="pilwrap "> < a class ="pilcrow " href ="#section-1 "> ¶</ a > </ div > < h2 > stomp</ h2 >
2
2
3
3
< p > The < code > Stomp</ code > module provides you with a client interface for interacting with STOMP messaging brokers</ p >
4
4
Original file line number Diff line number Diff line change
1
+ // # stomp-js
2
+ //
3
+ // ## Overview
4
+ //
5
+ // An exercise with node.js to implement the STOMP protocol.
6
+ //
7
+ // For documentation see doc/stomp.md and doc/frame.md
8
+ //
9
+ // ## Installation
10
+ //
11
+ // `npm install stomp`
12
+ //
13
+ // `git clone https://benjaminws@github.com/benjaminws/stomp-js.git`
14
+ //
15
+ // ## Examples
16
+ //
17
+ // ### Consumer
18
+ //
19
+ // See examples/stomp-consumer.js
20
+ //
21
+ // ### Producer
22
+ //
23
+ // See examples/stomp-producer.js
24
+ //
25
+ // ### Producer with Transaction Support
26
+ //
27
+ // See examples/stomp-producer-txn.js
Original file line number Diff line number Diff line change @@ -309,7 +309,7 @@ Stomp.prototype.disconnect = function() {
309
309
}
310
310
311
311
//
312
- // ## Stomp.subscribe()
312
+ // ## Stomp.subscribe(headers, callback )
313
313
//
314
314
// **Subscribe to destination (queue or topic)**
315
315
//
@@ -321,6 +321,20 @@ Stomp.prototype.subscribe = function(headers, callback) {
321
321
var destination = headers [ 'destination' ] ;
322
322
headers [ 'session' ] = this . session ;
323
323
send_command ( this , 'SUBSCRIBE' , headers ) ;
324
+
325
+ /**
326
+ / Maybe we could subscribe to mulitple queues?
327
+ / if (destination instanceof Array) {
328
+ / for (var = i; i < 0; i++) {
329
+ / this._subscribed_to[destination[i]] = { enabled: true, callback: callback };
330
+ / }
331
+ / }
332
+ / else {
333
+ / this._subscribed_to[destination] = { enabled: true, callback: callback };
334
+ / }
335
+ /
336
+ */
337
+
324
338
this . _subscribed_to [ destination ] = { enabled : true , callback : callback } ;
325
339
this . log . debug ( 'subscribed to: ' + destination + ' with headers ' + sys . inspect ( headers ) ) ;
326
340
} ;
You can’t perform that action at this time.
0 commit comments