diff options
author | Evan Prodromou <evan@status.net> | 2009-10-04 03:02:04 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-10-04 03:15:59 -0400 |
commit | 035978270d609b650b8e32f252366e0e75b12507 (patch) | |
tree | 5d49a7fd92f376c110e27e1950ec288c1c04cadf /plugins/Orbited/orbitedupdater.js | |
parent | 9c2d0879e9064fe3b9cf9af2c7eabe869966bd92 (diff) |
Update OrbitedPlugin to work with RealtimePlugin framework
Diffstat (limited to 'plugins/Orbited/orbitedupdater.js')
-rw-r--r-- | plugins/Orbited/orbitedupdater.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/Orbited/orbitedupdater.js b/plugins/Orbited/orbitedupdater.js new file mode 100644 index 000000000..d70f4a4fd --- /dev/null +++ b/plugins/Orbited/orbitedupdater.js @@ -0,0 +1,21 @@ +// Update the local timeline from a Orbited server + +var OrbitedUpdater = function() +{ + return { + + init: function(server, port, timeline, username, password) + { + // set up stomp client. + stomp = new STOMPClient(); + + stomp.connect(server, port, username, password); + stomp.subscribe(timeline); + + stomp.onmessageframe = function(frame) { + RealtimeUpdate.receive(JSON.parse(frame.body)); + }; + }; + } +}(); + |