From d57501cbe3e7d1c55f888cb1d3efc6529b229f21 Mon Sep 17 00:00:00 2001 From: Davin Kevin Date: Sat, 2 Jul 2016 11:51:16 +0200 Subject: [PATCH] feat(connectionState): The state of the connection can be accessed by the promise on the ngStomp service If you want to know if the system is connected or not, you can subscribe to the promise `ngStomp.connectionState.then()` and execute some code. `then` first function will be called if connection is up, second `then` function or `catch` will be called if connection is down. Don't forget, if you set a long timeOut in setting, the promise won't be fulfilled until we reach this timeOut. If the connection have already been open, the catch method won't be called Linked to #43 --- core/service.js | 23 ++++++++++++++--------- dist/angular-stomp.js | 30 ++++++++++++++++++++++-------- dist/angular-stomp.min.js | 2 +- dist/angular-stomp.min.js.map | 2 +- package.json | 1 + 5 files changed, 39 insertions(+), 19 deletions(-) diff --git a/core/service.js b/core/service.js index 974b50c..511953a 100644 --- a/core/service.js +++ b/core/service.js @@ -16,19 +16,25 @@ export default class ngStompWebSocket { this.$timeout = $timeout; this.connections = []; + this.initConnectionState(); this.connect(); } + initConnectionState() { + this.deferred = this.$q.defer(); + this.connectionState = this.deferred.promise; + } + connect() { this.$setConnection(); + this.stompClient.connect( this.settings.login, this.settings.password, - () => { - this.deferred.resolve(); - }, + () => this.deferred.resolve(), () => { this.deferred.reject(); + this.initConnectionState(); this.settings.timeOut >= 0 && this.$timeout(() => { this.connect(); this.$reconnectAll(); @@ -36,11 +42,12 @@ export default class ngStompWebSocket { }, this.settings.vhost ); - return this.promiseResult; + + return this.connectionState; } subscribe(queue, callback, header = {}, scope, json = false, digest) { - this.promiseResult + this.connectionState .then( () => this.$stompSubscribe(queue, callback, header, scope, json, digest), () => this.$$addToConnectionQueue({ queue, callback, header, scope, json, digest }) @@ -55,14 +62,14 @@ export default class ngStompWebSocket { /* Deprecated */ unsubscribe(url) { - this.promiseResult.then(() => this.$stompUnSubscribe(url)); + this.connectionState.then(() => this.$stompUnSubscribe(url)); return this; } send(queue, data, header = {}) { let sendDeffered = this.$q.defer(); - this.promiseResult.then(() => { + this.connectionState.then(() => { this.stompClient.send(queue, header, JSON.stringify(data)); sendDeffered.resolve(); }); @@ -110,8 +117,6 @@ export default class ngStompWebSocket { this.stompClient.heartbeat.outgoing = this.settings.heartbeat.outgoing; this.stompClient.heartbeat.incoming = this.settings.heartbeat.incoming; } - this.deferred = this.$q.defer(); - this.promiseResult = this.deferred.promise; } $unRegisterScopeOnDestroy(connection) { diff --git a/dist/angular-stomp.js b/dist/angular-stomp.js index 8effdc4..72471cf 100644 --- a/dist/angular-stomp.js +++ b/dist/angular-stomp.js @@ -333,19 +333,35 @@ $__System.register('a', ['5', '6', '8', '9'], function (_export) { _createClass(ngStompWebSocket, [{ key: 'connect', value: function connect() { + this.$initConnectionState(); + this.$connect(); + } + }, { + key: '$initConnectionState', + value: function $initConnectionState() { + this.deferred && this.deferred.reject(); + this.deferred = this.$q.defer(); + this.connectionState = this.deferred.promise; + } + }, { + key: '$connect', + value: function $connect() { var _this = this; this.$setConnection(); + this.stompClient.connect(this.settings.login, this.settings.password, function () { - _this.deferred.resolve(); + return _this.deferred.resolve(); }, function () { _this.deferred.reject(); + _this.$initConnectionState(); _this.settings.timeOut >= 0 && _this.$timeout(function () { - _this.connect(); + _this.$connect(); _this.$reconnectAll(); }, _this.settings.timeOut); }, this.settings.vhost); - return this.promiseResult; + + return this.connectionState; } }, { key: 'subscribe', @@ -356,7 +372,7 @@ $__System.register('a', ['5', '6', '8', '9'], function (_export) { if (json === undefined) json = false; - this.promiseResult.then(function () { + this.connectionState.then(function () { return _this2.$stompSubscribe(queue, callback, header, scope, json, digest); }, function () { return _this2.$$addToConnectionQueue({ queue: queue, callback: callback, header: header, scope: scope, json: json, digest: digest }); @@ -375,7 +391,7 @@ $__System.register('a', ['5', '6', '8', '9'], function (_export) { value: function unsubscribe(url) { var _this3 = this; - this.promiseResult.then(function () { + this.connectionState.then(function () { return _this3.$stompUnSubscribe(url); }); return this; @@ -389,7 +405,7 @@ $__System.register('a', ['5', '6', '8', '9'], function (_export) { var sendDeffered = this.$q.defer(); - this.promiseResult.then(function () { + this.connectionState.then(function () { _this4.stompClient.send(queue, header, JSON.stringify(data)); sendDeffered.resolve(); }); @@ -449,8 +465,6 @@ $__System.register('a', ['5', '6', '8', '9'], function (_export) { this.stompClient.heartbeat.outgoing = this.settings.heartbeat.outgoing; this.stompClient.heartbeat.incoming = this.settings.heartbeat.incoming; } - this.deferred = this.$q.defer(); - this.promiseResult = this.deferred.promise; } }, { key: '$unRegisterScopeOnDestroy', diff --git a/dist/angular-stomp.min.js b/dist/angular-stomp.min.js index 1513419..9fe5e20 100644 --- a/dist/angular-stomp.min.js +++ b/dist/angular-stomp.min.js @@ -1,2 +1,2 @@ -"format global";"globals.angular angular";"globals.Stomp stompjs";!function(e){function t(e,t,r){return 4===arguments.length?n.apply(this,arguments):void i(e,{declarative:!0,deps:t,declare:r})}function n(e,t,n,r){i(e,{declarative:!1,deps:t,executingRequire:n,execute:r})}function i(e,t){t.name=e,e in h||(h[e]=t),t.normalizedDeps=t.deps}function r(e,t){if(t[e.groupIndex]=t[e.groupIndex]||[],-1==p.call(t[e.groupIndex],e)){t[e.groupIndex].push(e);for(var n=0,i=e.normalizedDeps.length;i>n;n++){var s=e.normalizedDeps[n],o=h[s];if(o&&!o.evaluated){var u=e.groupIndex+(o.declarative!=e.declarative);if(void 0===o.groupIndex||o.groupIndex=0;s--){for(var o=n[s],c=0;cs;s++){var u=n.importers[s];if(!u.locked)for(var c=0;cs;s++){var a,l=t.normalizedDeps[s],f=h[l],p=m[l];p?a=p.exports:f&&!f.declarative?a=f.esModule:f?(u(f),p=f.module,a=p.exports):a=d(l),p&&p.importers?(p.importers.push(n),n.dependencies.push(p)):n.dependencies.push(null),n.setters[s]&&n.setters[s](a)}}}function c(e){var t,n=h[e];if(n)n.declarative?f(e,[]):n.evaluated||a(n),t=n.module.exports;else if(t=d(e),!t)throw new Error("Unable to load dependency "+e+".");return(!n||n.declarative)&&t&&t.__useDefault?t["default"]:t}function a(t){if(!t.module){var n={},i=t.module={exports:n,id:t.name};if(!t.executingRequire)for(var r=0,s=t.normalizedDeps.length;s>r;r++){var o=t.normalizedDeps[r],u=h[o];u&&a(u)}t.evaluated=!0;var f=t.execute.call(e,function(e){for(var n=0,i=t.deps.length;i>n;n++)if(t.deps[n]==e)return c(t.normalizedDeps[n]);throw new TypeError("Module "+e+" not declared as a dependency.")},n,i);f&&(i.exports=f),n=i.exports,n&&n.__esModule?t.esModule=n:t.esModule=l(n)}}function l(t){if(t===e)return t;var n={};if("object"==typeof t||"function"==typeof t)if(g){var i;for(var r in t)(i=Object.getOwnPropertyDescriptor(t,r))&&b(n,r,i)}else{var s=t&&t.hasOwnProperty;for(var r in t)(!s||t.hasOwnProperty(r))&&(n[r]=t[r])}return n["default"]=t,b(n,"__useDefault",{value:!0}),n}function f(t,n){var i=h[t];if(i&&!i.evaluated&&i.declarative){n.push(t);for(var r=0,s=i.normalizedDeps.length;s>r;r++){var o=i.normalizedDeps[r];-1==p.call(n,o)&&(h[o]?f(o,n):d(o))}i.evaluated||(i.evaluated=!0,i.module.execute.call(e))}}function d(e){if($[e])return $[e];if("@node/"==e.substr(0,6))return y(e.substr(6));var t=h[e];if(!t)throw"Module "+e+" not present.";return s(e),f(e,[]),h[e]=void 0,t.declarative&&b(t.module.exports,"__esModule",{value:!0}),$[e]=t.declarative?t.module.exports:t.esModule}var h={},p=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},g=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(v){g=!1}var b;!function(){try{Object.defineProperty({},"a",{})&&(b=Object.defineProperty)}catch(e){b=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(i){}}}}();var m={},y="undefined"!=typeof System&&System._nodeRequire||"undefined"!=typeof require&&require.resolve&&"undefined"!=typeof process&&require,$={"@empty":{}};return function(e,i,r){return function(s){s(function(s){for(var o={_nodeRequire:y,register:t,registerDynamic:n,get:d,set:function(e,t){$[e]=t},newModule:function(e){return e}},u=0;u1)for(var u=1;u=0&&e.$timeout(function(){e.connect(),e.$reconnectAll()},e.settings.timeOut)},this.settings.vhost),this.promiseResult}},{key:"subscribe",value:function(e,t,n,i,r,s){void 0===n&&(n={});var o=this;return void 0===r&&(r=!1),this.promiseResult.then(function(){return o.$stompSubscribe(e,t,n,i,r,s)},function(){return o.$$addToConnectionQueue({queue:e,callback:t,header:n,scope:i,json:r,digest:s})}),this}},{key:"subscribeTo",value:function(e){return new i(this,e)}},{key:"unsubscribe",value:function(e){var t=this;return this.promiseResult.then(function(){return t.$stompUnSubscribe(e)}),this}},{key:"send",value:function(e,t){var n=this,i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=this.$q.defer();return this.promiseResult.then(function(){n.stompClient.send(e,i,JSON.stringify(t)),r.resolve()}),r.promise}},{key:"disconnect",value:function(){var e=this.$q.defer();return this.stompClient.disconnect(function(){e.resolve()}),e.promise}},{key:"$stompSubscribe",value:function(e,t,n,i,r,s){void 0===i&&(i=this.$rootScope);var o=this.stompClient.subscribe(e,function(e){r&&(e.body=JSON.parse(e.body)),s?i.$applyAsync(function(){return t(e)}):t(e)},n),u={queue:e,sub:o,callback:t,header:n,scope:i,json:r,digest:s};this.$$addToConnectionQueue(u),this.$unRegisterScopeOnDestroy(u)}},{key:"$stompUnSubscribe",value:function(e){this.connections.filter(function(t){return t.queue===e}).forEach(function(e){return e.sub.unsubscribe()}),this.connections=this.connections.filter(function(t){return t.queue!=e})}},{key:"$setConnection",value:function(){this.stompClient=this.settings["class"]?this.Stomp.over(new this.settings["class"](this.settings.url)):this.Stomp.client(this.settings.url),this.stompClient.debug=this.settings.debug?this.$log.debug:r.noop,r.isDefined(this.settings.heartbeat)&&(this.stompClient.heartbeat.outgoing=this.settings.heartbeat.outgoing,this.stompClient.heartbeat.incoming=this.settings.heartbeat.incoming),this.deferred=this.$q.defer(),this.promiseResult=this.deferred.promise}},{key:"$unRegisterScopeOnDestroy",value:function(e){var t=this;void 0!==e.scope&&r.isFunction(e.scope.$on)&&e.scope.$on("$destroy",function(){return t.$$unSubscribeOf(e)})}},{key:"$reconnectAll",value:function(){var e=this,t=this.connections;this.connections=[],t.forEach(function(t){return e.subscribe(t.queue,t.callback,t.header,t.scope,t.json,t.digest)})}},{key:"$$unSubscribeOf",value:function(e){var t=this;this.connections.filter(function(n){return t.$$connectionEquality(n,e)}).forEach(function(e){return e.sub.unsubscribe()}),this.connections=this.connections.filter(function(n){return!t.$$connectionEquality(n,e)})}},{key:"$$addToConnectionQueue",value:function(e){this.connections.push(e)}},{key:"$$connectionEquality",value:function(e,t){return e.queue===t.queue&&e.callback===t.callback&&e.header===t.header&&e.scope===t.scope&&e.digest===t.digest}}]),e}(),e("default",s)}}}),e.register("b",["5","6","a"],function(e){var t,n,i,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){i=e["default"]}],execute:function(){"use strict";r=function(){function e(){n(this,e),this.settings={timeOut:5e3,heartbeat:{outgoing:1e4,incoming:1e4}}}return t(e,[{key:"credential",value:function(e,t){return this.settings.login=e,this.settings.password=t,this}},{key:"url",value:function(e){return this.settings.url=e,this}},{key:"class",value:function(e){return this.settings["class"]=e,this}},{key:"setting",value:function(e){return this.settings=e,this}},{key:"debug",value:function(e){return this.settings.debug=e,this}},{key:"vhost",value:function(e){return this.settings.vhost=e,this}},{key:"reconnectAfter",value:function(e){return this.settings.timeOut=1e3*e,this}},{key:"heartbeat",value:function(e,t){return this.settings.heartbeat.outgoing=e,this.settings.heartbeat.incoming=t,this}},{key:"$get",value:["$q","$log","$rootScope","$timeout","Stomp",function(e,t,n,r,s){"ngInject";return new i(this.settings,e,t,n,r,s)}]}]),e}(),e("default",r)}}}),e.register("1",["9","c","b"],function(e){"use strict";var t,n,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){i=e["default"]}],execute:function(){e("default",t.module("AngularStompDK",[]).provider("ngstomp",i).constant("Stomp",n))}}})})(function(e){e(angular,Stomp)}); +"format global";"globals.angular angular";"globals.Stomp stompjs";!function(e){function t(e,t,r){return 4===arguments.length?n.apply(this,arguments):void i(e,{declarative:!0,deps:t,declare:r})}function n(e,t,n,r){i(e,{declarative:!1,deps:t,executingRequire:n,execute:r})}function i(e,t){t.name=e,e in h||(h[e]=t),t.normalizedDeps=t.deps}function r(e,t){if(t[e.groupIndex]=t[e.groupIndex]||[],-1==p.call(t[e.groupIndex],e)){t[e.groupIndex].push(e);for(var n=0,i=e.normalizedDeps.length;i>n;n++){var s=e.normalizedDeps[n],o=h[s];if(o&&!o.evaluated){var u=e.groupIndex+(o.declarative!=e.declarative);if(void 0===o.groupIndex||o.groupIndex=0;s--){for(var o=n[s],c=0;cs;s++){var u=n.importers[s];if(!u.locked)for(var c=0;cs;s++){var a,f=t.normalizedDeps[s],l=h[f],p=m[f];p?a=p.exports:l&&!l.declarative?a=l.esModule:l?(u(l),p=l.module,a=p.exports):a=d(f),p&&p.importers?(p.importers.push(n),n.dependencies.push(p)):n.dependencies.push(null),n.setters[s]&&n.setters[s](a)}}}function c(e){var t,n=h[e];if(n)n.declarative?l(e,[]):n.evaluated||a(n),t=n.module.exports;else if(t=d(e),!t)throw new Error("Unable to load dependency "+e+".");return(!n||n.declarative)&&t&&t.__useDefault?t["default"]:t}function a(t){if(!t.module){var n={},i=t.module={exports:n,id:t.name};if(!t.executingRequire)for(var r=0,s=t.normalizedDeps.length;s>r;r++){var o=t.normalizedDeps[r],u=h[o];u&&a(u)}t.evaluated=!0;var l=t.execute.call(e,function(e){for(var n=0,i=t.deps.length;i>n;n++)if(t.deps[n]==e)return c(t.normalizedDeps[n]);throw new TypeError("Module "+e+" not declared as a dependency.")},n,i);l&&(i.exports=l),n=i.exports,n&&n.__esModule?t.esModule=n:t.esModule=f(n)}}function f(t){if(t===e)return t;var n={};if("object"==typeof t||"function"==typeof t)if(v){var i;for(var r in t)(i=Object.getOwnPropertyDescriptor(t,r))&&b(n,r,i)}else{var s=t&&t.hasOwnProperty;for(var r in t)(!s||t.hasOwnProperty(r))&&(n[r]=t[r])}return n["default"]=t,b(n,"__useDefault",{value:!0}),n}function l(t,n){var i=h[t];if(i&&!i.evaluated&&i.declarative){n.push(t);for(var r=0,s=i.normalizedDeps.length;s>r;r++){var o=i.normalizedDeps[r];-1==p.call(n,o)&&(h[o]?l(o,n):d(o))}i.evaluated||(i.evaluated=!0,i.module.execute.call(e))}}function d(e){if($[e])return $[e];if("@node/"==e.substr(0,6))return y(e.substr(6));var t=h[e];if(!t)throw"Module "+e+" not present.";return s(e),l(e,[]),h[e]=void 0,t.declarative&&b(t.module.exports,"__esModule",{value:!0}),$[e]=t.declarative?t.module.exports:t.esModule}var h={},p=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},v=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(g){v=!1}var b;!function(){try{Object.defineProperty({},"a",{})&&(b=Object.defineProperty)}catch(e){b=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(i){}}}}();var m={},y="undefined"!=typeof System&&System._nodeRequire||"undefined"!=typeof require&&require.resolve&&"undefined"!=typeof process&&require,$={"@empty":{}};return function(e,i,r){return function(s){s(function(s){for(var o={_nodeRequire:y,register:t,registerDynamic:n,get:d,set:function(e,t){$[e]=t},newModule:function(e){return e}},u=0;u1)for(var u=1;u=0&&e.$timeout(function(){e.$connect(),e.$reconnectAll()},e.settings.timeOut)},this.settings.vhost),this.connectionState}},{key:"subscribe",value:function(e,t,n,i,r,s){void 0===n&&(n={});var o=this;return void 0===r&&(r=!1),this.connectionState.then(function(){return o.$stompSubscribe(e,t,n,i,r,s)},function(){return o.$$addToConnectionQueue({queue:e,callback:t,header:n,scope:i,json:r,digest:s})}),this}},{key:"subscribeTo",value:function(e){return new i(this,e)}},{key:"unsubscribe",value:function(e){var t=this;return this.connectionState.then(function(){return t.$stompUnSubscribe(e)}),this}},{key:"send",value:function(e,t){var n=this,i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=this.$q.defer();return this.connectionState.then(function(){n.stompClient.send(e,i,JSON.stringify(t)),r.resolve()}),r.promise}},{key:"disconnect",value:function(){var e=this.$q.defer();return this.stompClient.disconnect(function(){e.resolve()}),e.promise}},{key:"$stompSubscribe",value:function(e,t,n,i,r,s){void 0===i&&(i=this.$rootScope);var o=this.stompClient.subscribe(e,function(e){r&&(e.body=JSON.parse(e.body)),s?i.$applyAsync(function(){return t(e)}):t(e)},n),u={queue:e,sub:o,callback:t,header:n,scope:i,json:r,digest:s};this.$$addToConnectionQueue(u),this.$unRegisterScopeOnDestroy(u)}},{key:"$stompUnSubscribe",value:function(e){this.connections.filter(function(t){return t.queue===e}).forEach(function(e){return e.sub.unsubscribe()}),this.connections=this.connections.filter(function(t){return t.queue!=e})}},{key:"$setConnection",value:function(){this.stompClient=this.settings["class"]?this.Stomp.over(new this.settings["class"](this.settings.url)):this.Stomp.client(this.settings.url),this.stompClient.debug=this.settings.debug?this.$log.debug:r.noop,r.isDefined(this.settings.heartbeat)&&(this.stompClient.heartbeat.outgoing=this.settings.heartbeat.outgoing,this.stompClient.heartbeat.incoming=this.settings.heartbeat.incoming)}},{key:"$unRegisterScopeOnDestroy",value:function(e){var t=this;void 0!==e.scope&&r.isFunction(e.scope.$on)&&e.scope.$on("$destroy",function(){return t.$$unSubscribeOf(e)})}},{key:"$reconnectAll",value:function(){var e=this,t=this.connections;this.connections=[],t.forEach(function(t){return e.subscribe(t.queue,t.callback,t.header,t.scope,t.json,t.digest)})}},{key:"$$unSubscribeOf",value:function(e){var t=this;this.connections.filter(function(n){return t.$$connectionEquality(n,e)}).forEach(function(e){return e.sub.unsubscribe()}),this.connections=this.connections.filter(function(n){return!t.$$connectionEquality(n,e)})}},{key:"$$addToConnectionQueue",value:function(e){this.connections.push(e)}},{key:"$$connectionEquality",value:function(e,t){return e.queue===t.queue&&e.callback===t.callback&&e.header===t.header&&e.scope===t.scope&&e.digest===t.digest}}]),e}(),e("default",s)}}}),e.register("b",["5","6","a"],function(e){var t,n,i,r;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){i=e["default"]}],execute:function(){"use strict";r=function(){function e(){n(this,e),this.settings={timeOut:5e3,heartbeat:{outgoing:1e4,incoming:1e4}}}return t(e,[{key:"credential",value:function(e,t){return this.settings.login=e,this.settings.password=t,this}},{key:"url",value:function(e){return this.settings.url=e,this}},{key:"class",value:function(e){return this.settings["class"]=e,this}},{key:"setting",value:function(e){return this.settings=e,this}},{key:"debug",value:function(e){return this.settings.debug=e,this}},{key:"vhost",value:function(e){return this.settings.vhost=e,this}},{key:"reconnectAfter",value:function(e){return this.settings.timeOut=1e3*e,this}},{key:"heartbeat",value:function(e,t){return this.settings.heartbeat.outgoing=e,this.settings.heartbeat.incoming=t,this}},{key:"$get",value:["$q","$log","$rootScope","$timeout","Stomp",function(e,t,n,r,s){"ngInject";return new i(this.settings,e,t,n,r,s)}]}]),e}(),e("default",r)}}}),e.register("1",["9","c","b"],function(e){"use strict";var t,n,i;return{setters:[function(e){t=e["default"]},function(e){n=e["default"]},function(e){i=e["default"]}],execute:function(){e("default",t.module("AngularStompDK",[]).provider("ngstomp",i).constant("Stomp",n))}}})})(function(e){e(angular,Stomp)}); //# sourceMappingURL=angular-stomp.min.js.map diff --git a/dist/angular-stomp.min.js.map b/dist/angular-stomp.min.js.map index 23d9724..0095e6c 100644 --- a/dist/angular-stomp.min.js.map +++ b/dist/angular-stomp.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["angular-stomp.js","../jspm_packages/npm/core-js@1.2.6/library/modules/$.js","../jspm_packages/npm/core-js@1.2.6/library/fn/object/define-property.js","../jspm_packages/npm/babel-runtime@5.8.34/core-js/object/define-property.js","../jspm_packages/npm/babel-runtime@5.8.34/helpers/create-class.js","../jspm_packages/npm/babel-runtime@5.8.34/helpers/class-call-check.js","../core/unSubscriber.js","../core/builder.js","../core/service.js","../core/provider.js","../core/ngStomp.js"],"names":["e","r","o","arguments","length","t","apply","this","n","declarative","deps","declare","executingRequire","execute","name","p","normalizedDeps","groupIndex","v","call","push","a","u","evaluated","d","splice","TypeError","i","s","l","x","dependencies","exports","importers","module","locked","setters","c","esModule","f","Error","__useDefault","id","__esModule","g","Object","getOwnPropertyDescriptor","h","hasOwnProperty","value","D","substr","y","Array","prototype","indexOf","m","defineProperty","get","System","_nodeRequire","require","resolve","process","@empty","register","registerDynamic","set","newModule","self","global","$__System","window","document","location","protocol","hostname","port","getPathVars","lastIndexOf","split","pop","join","isWindows","filename","dirname","$__require","__define","define","undefined","$Object","create","getProto","getPrototypeOf","isEnum","propertyIsEnumerable","getDesc","setDesc","setDescs","defineProperties","getKeys","keys","getNames","getOwnPropertyNames","getSymbols","getOwnPropertySymbols","each","forEach","$","it","key","desc","default","_Object$defineProperty","target","props","descriptor","enumerable","configurable","writable","Constructor","protoProps","staticProps","instance","_export","_createClass","_classCallCheck","Unsubscriber","_","_2","ngStomp","connections","_this","$$unSubscribeOf","queue","_this2","filter","index","_this3","callback","header","headers","scope","digest","UnSubscriber","angular","SubscribeBuilder","_3","_4","subscribeTo","aCallback","aScope","json","connect","noop","and","subscribe","ngStompWebSocket","settings","$q","$log","$rootScope","$timeout","Stomp","$setConnection","stompClient","login","password","deferred","reject","timeOut","$reconnectAll","vhost","promiseResult","then","$stompSubscribe","$$addToConnectionQueue","topic","url","$stompUnSubscribe","data","_this4","sendDeffered","defer","send","JSON","stringify","promise","disconnectionPromise","disconnect","sub","message","body","parse","$applyAsync","connection","$unRegisterScopeOnDestroy","unsubscribe","over","client","debug","isDefined","heartbeat","outgoing","incoming","_this5","isFunction","$on","_this6","_this7","$$connectionEquality","c1","c2","ngstompProvider","_a","_url","clazz","settingsObject","boolean","host","numberInSeconds","_c","_b","provider","constant","factory"],"mappings":"AAAA,eACA,0BACA,0BAEC,SAASA,GAAG,QAASC,GAAED,EAAEC,EAAEC,GAAG,MAAO,KAAIC,UAAUC,OAAOC,EAAEC,MAAMC,KAAKJ,eAAgBK,GAAER,GAAGS,aAAY,EAAGC,KAAKT,EAAEU,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UC,SAAWA,EACnCpM,KAAKuJ,SAAS4C,UAAUE,SAAWA,EAC5BrM,QTshBKuG,IAAK,OACL7D,OSnhBZ,KAAA,OAAC,aAAU,WAAY,QAAU,SAAO8G,EAAAC,EAAAC,EAAAC,EAAAC,GACxC,UACA,OAAO,IAAIN,GAAiBtJ,KAAKuJ,SAAUC,EAAIC,EAAMC,EAAYC,EAAUC,QAzD9DkD,KTmlBTzF,EAAQ,USnlBCyF,OTulBrB9I,EAAUN,SAAS,KAAM,IAAK,IAAK,KAAM,SAAU2D,GAC/C,YAEA,IAAIqB,GAASkB,EAAOkD,CACpB,QACIjL,SAAU,SAAU4F,GAChBiB,EAAUjB,EAAE,YACb,SAAU6F,GACT1D,EAAQ0D,EAAG,YACZ,SAAUC,GACTT,EAAkBS,EAAG,aAEzBjN,QAAS,WACL+G,EAAQ,UUlmBLqB,EACV/G,OAAO,qBACP6L,SAAS,UAAWV,GACpBW,SAAS,QAAS7D,UVomBtB,SAAS8D,GACRA,EAAQhF,QAASkB","file":"angular-stomp.min.js","sourcesContent":["\"format global\";\n\"globals.angular angular\";\n\"globals.Stomp stompjs\";\n\n!function(e){function r(e,r,o){return 4===arguments.length?t.apply(this,arguments):void n(e,{declarative:!0,deps:r,declare:o})}function t(e,r,t,o){n(e,{declarative:!1,deps:r,executingRequire:t,execute:o})}function n(e,r){r.name=e,e in p||(p[e]=r),r.normalizedDeps=r.deps}function o(e,r){if(r[e.groupIndex]=r[e.groupIndex]||[],-1==v.call(r[e.groupIndex],e)){r[e.groupIndex].push(e);for(var t=0,n=e.normalizedDeps.length;n>t;t++){var a=e.normalizedDeps[t],u=p[a];if(u&&!u.evaluated){var d=e.groupIndex+(u.declarative!=e.declarative);if(void 0===u.groupIndex||u.groupIndex=0;a--){for(var u=t[a],i=0;ia;a++){var d=t.importers[a];if(!d.locked)for(var i=0;ia;a++){var l,s=r.normalizedDeps[a],c=p[s],v=x[s];v?l=v.exports:c&&!c.declarative?l=c.esModule:c?(d(c),v=c.module,l=v.exports):l=f(s),v&&v.importers?(v.importers.push(t),t.dependencies.push(v)):t.dependencies.push(null),t.setters[a]&&t.setters[a](l)}}}function i(e){var r,t=p[e];if(t)t.declarative?c(e,[]):t.evaluated||l(t),r=t.module.exports;else if(r=f(e),!r)throw new Error(\"Unable to load dependency \"+e+\".\");return(!t||t.declarative)&&r&&r.__useDefault?r[\"default\"]:r}function l(r){if(!r.module){var t={},n=r.module={exports:t,id:r.name};if(!r.executingRequire)for(var o=0,a=r.normalizedDeps.length;a>o;o++){var u=r.normalizedDeps[o],d=p[u];d&&l(d)}r.evaluated=!0;var c=r.execute.call(e,function(e){for(var t=0,n=r.deps.length;n>t;t++)if(r.deps[t]==e)return i(r.normalizedDeps[t]);throw new TypeError(\"Module \"+e+\" not declared as a dependency.\")},t,n);c&&(n.exports=c),t=n.exports,t&&t.__esModule?r.esModule=t:r.esModule=s(t)}}function s(r){if(r===e)return r;var t={};if(\"object\"==typeof r||\"function\"==typeof r)if(g){var n;for(var o in r)(n=Object.getOwnPropertyDescriptor(r,o))&&h(t,o,n)}else{var a=r&&r.hasOwnProperty;for(var o in r)(!a||r.hasOwnProperty(o))&&(t[o]=r[o])}return t[\"default\"]=r,h(t,\"__useDefault\",{value:!0}),t}function c(r,t){var n=p[r];if(n&&!n.evaluated&&n.declarative){t.push(r);for(var o=0,a=n.normalizedDeps.length;a>o;o++){var u=n.normalizedDeps[o];-1==v.call(t,u)&&(p[u]?c(u,t):f(u))}n.evaluated||(n.evaluated=!0,n.module.execute.call(e))}}function f(e){if(D[e])return D[e];if(\"@node/\"==e.substr(0,6))return y(e.substr(6));var r=p[e];if(!r)throw\"Module \"+e+\" not present.\";return a(e),c(e,[]),p[e]=void 0,r.declarative&&h(r.module.exports,\"__esModule\",{value:!0}),D[e]=r.declarative?r.module.exports:r.esModule}var p={},v=Array.prototype.indexOf||function(e){for(var r=0,t=this.length;t>r;r++)if(this[r]===e)return r;return-1},g=!0;try{Object.getOwnPropertyDescriptor({a:0},\"a\")}catch(m){g=!1}var h;!function(){try{Object.defineProperty({},\"a\",{})&&(h=Object.defineProperty)}catch(e){h=function(e,r,t){try{e[r]=t.value||t.get.call(e)}catch(n){}}}}();var x={},y=\"undefined\"!=typeof System&&System._nodeRequire||\"undefined\"!=typeof require&&require.resolve&&\"undefined\"!=typeof process&&require,D={\"@empty\":{}};return function(e,n,o){return function(a){a(function(a){for(var u={_nodeRequire:y,register:r,registerDynamic:t,get:f,set:function(e,r){D[e]=r},newModule:function(e){return e}},d=0;d1)for(var d=1;d= 0 && _this.$timeout(function () {\n _this.connect();\n _this.$reconnectAll();\n }, _this.settings.timeOut);\n }, this.settings.vhost);\n return this.promiseResult;\n }\n }, {\n key: 'subscribe',\n value: function subscribe(queue, callback, header, scope, json, digest) {\n if (header === undefined) header = {};\n\n var _this2 = this;\n\n if (json === undefined) json = false;\n\n this.promiseResult.then(function () {\n return _this2.$stompSubscribe(queue, callback, header, scope, json, digest);\n }, function () {\n return _this2.$$addToConnectionQueue({ queue: queue, callback: callback, header: header, scope: scope, json: json, digest: digest });\n });\n return this;\n }\n }, {\n key: 'subscribeTo',\n value: function subscribeTo(topic) {\n return new SubscribeBuilder(this, topic);\n }\n\n /* Deprecated */\n }, {\n key: 'unsubscribe',\n value: function unsubscribe(url) {\n var _this3 = this;\n\n this.promiseResult.then(function () {\n return _this3.$stompUnSubscribe(url);\n });\n return this;\n }\n }, {\n key: 'send',\n value: function send(queue, data) {\n var _this4 = this;\n\n var header = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];\n\n var sendDeffered = this.$q.defer();\n\n this.promiseResult.then(function () {\n _this4.stompClient.send(queue, header, JSON.stringify(data));\n sendDeffered.resolve();\n });\n\n return sendDeffered.promise;\n }\n }, {\n key: 'disconnect',\n value: function disconnect() {\n var disconnectionPromise = this.$q.defer();\n this.stompClient.disconnect(function () {\n disconnectionPromise.resolve();\n });\n\n return disconnectionPromise.promise;\n }\n }, {\n key: '$stompSubscribe',\n value: function $stompSubscribe(queue, callback, header, scope, json, digest) {\n if (scope === undefined) scope = this.$rootScope;\n\n var sub = this.stompClient.subscribe(queue, function (message) {\n if (json) message.body = JSON.parse(message.body);\n\n if (digest) {\n scope.$applyAsync(function () {\n return callback(message);\n });\n } else {\n callback(message);\n }\n }, header);\n\n var connection = { queue: queue, sub: sub, callback: callback, header: header, scope: scope, json: json, digest: digest };\n this.$$addToConnectionQueue(connection);\n this.$unRegisterScopeOnDestroy(connection);\n }\n }, {\n key: '$stompUnSubscribe',\n value: function $stompUnSubscribe(queue) {\n this.connections.filter(function (c) {\n return c.queue === queue;\n }).forEach(function (c) {\n return c.sub.unsubscribe();\n });\n\n this.connections = this.connections.filter(function (c) {\n return c.queue != queue;\n });\n }\n }, {\n key: '$setConnection',\n value: function $setConnection() {\n this.stompClient = this.settings['class'] ? this.Stomp.over(new this.settings['class'](this.settings.url)) : this.Stomp.client(this.settings.url);\n this.stompClient.debug = this.settings.debug ? this.$log.debug : angular.noop;\n if (angular.isDefined(this.settings.heartbeat)) {\n this.stompClient.heartbeat.outgoing = this.settings.heartbeat.outgoing;\n this.stompClient.heartbeat.incoming = this.settings.heartbeat.incoming;\n }\n this.deferred = this.$q.defer();\n this.promiseResult = this.deferred.promise;\n }\n }, {\n key: '$unRegisterScopeOnDestroy',\n value: function $unRegisterScopeOnDestroy(connection) {\n var _this5 = this;\n\n if (connection.scope !== undefined && angular.isFunction(connection.scope.$on)) connection.scope.$on('$destroy', function () {\n return _this5.$$unSubscribeOf(connection);\n });\n }\n }, {\n key: '$reconnectAll',\n value: function $reconnectAll() {\n var _this6 = this;\n\n var connections = this.connections;\n this.connections = [];\n // during subscription each connection will be added to this.connections array again\n connections.forEach(function (c) {\n return _this6.subscribe(c.queue, c.callback, c.header, c.scope, c.json, c.digest);\n });\n }\n }, {\n key: '$$unSubscribeOf',\n value: function $$unSubscribeOf(connection) {\n var _this7 = this;\n\n this.connections.filter(function (c) {\n return _this7.$$connectionEquality(c, connection);\n }).forEach(function (c) {\n return c.sub.unsubscribe();\n });\n\n this.connections = this.connections.filter(function (c) {\n return !_this7.$$connectionEquality(c, connection);\n });\n }\n }, {\n key: '$$addToConnectionQueue',\n value: function $$addToConnectionQueue(connection) {\n this.connections.push(connection);\n }\n }, {\n key: '$$connectionEquality',\n value: function $$connectionEquality(c1, c2) {\n return c1.queue === c2.queue && c1.callback === c2.callback && c1.header === c2.header && c1.scope === c2.scope && c1.digest === c2.digest;\n }\n }]);\n\n return ngStompWebSocket;\n })();\n\n _export('default', ngStompWebSocket);\n }\n };\n});\n$__System.register(\"b\", [\"5\", \"6\", \"a\"], function (_export) {\n var _createClass, _classCallCheck, ngStompWebSocket, ngstompProvider;\n\n return {\n setters: [function (_) {\n _createClass = _[\"default\"];\n }, function (_2) {\n _classCallCheck = _2[\"default\"];\n }, function (_a) {\n ngStompWebSocket = _a[\"default\"];\n }],\n execute: function () {\n \"use strict\";\n\n ngstompProvider = (function () {\n function ngstompProvider() {\n _classCallCheck(this, ngstompProvider);\n\n this.settings = {\n timeOut: 5000,\n heartbeat: {\n outgoing: 10000,\n incoming: 10000\n }\n };\n }\n\n _createClass(ngstompProvider, [{\n key: \"credential\",\n value: function credential(login, password) {\n this.settings.login = login;\n this.settings.password = password;\n return this;\n }\n }, {\n key: \"url\",\n value: function url(_url) {\n this.settings.url = _url;\n return this;\n }\n }, {\n key: \"class\",\n value: function _class(clazz) {\n this.settings[\"class\"] = clazz;\n return this;\n }\n }, {\n key: \"setting\",\n value: function setting(settingsObject) {\n this.settings = settingsObject;\n return this;\n }\n }, {\n key: \"debug\",\n value: function debug(boolean) {\n this.settings.debug = boolean;\n return this;\n }\n }, {\n key: \"vhost\",\n value: function vhost(host) {\n this.settings.vhost = host;\n return this;\n }\n }, {\n key: \"reconnectAfter\",\n value: function reconnectAfter(numberInSeconds) {\n this.settings.timeOut = numberInSeconds * 1000;\n return this;\n }\n }, {\n key: \"heartbeat\",\n value: function heartbeat(outgoing, incoming) {\n this.settings.heartbeat.outgoing = outgoing;\n this.settings.heartbeat.incoming = incoming;\n return this;\n }\n }, {\n key: \"$get\",\n value: [\"$q\", \"$log\", \"$rootScope\", \"$timeout\", \"Stomp\", function $get($q, $log, $rootScope, $timeout, Stomp) {\n \"ngInject\";\n return new ngStompWebSocket(this.settings, $q, $log, $rootScope, $timeout, Stomp);\n }]\n }]);\n\n return ngstompProvider;\n })();\n\n _export(\"default\", ngstompProvider);\n }\n };\n});\n$__System.register('1', ['9', 'c', 'b'], function (_export) {\n 'use strict';\n\n var angular, Stomp, ngstompProvider;\n return {\n setters: [function (_) {\n angular = _['default'];\n }, function (_c) {\n Stomp = _c['default'];\n }, function (_b) {\n ngstompProvider = _b['default'];\n }],\n execute: function () {\n _export('default', angular.module('AngularStompDK', []).provider('ngstomp', ngstompProvider).constant('Stomp', Stomp));\n }\n };\n});\n})\n(function(factory) {\n factory(angular, Stomp);\n});\n","/* */ \nvar $Object = Object;\nmodule.exports = {\n create: $Object.create,\n getProto: $Object.getPrototypeOf,\n isEnum: {}.propertyIsEnumerable,\n getDesc: $Object.getOwnPropertyDescriptor,\n setDesc: $Object.defineProperty,\n setDescs: $Object.defineProperties,\n getKeys: $Object.keys,\n getNames: $Object.getOwnPropertyNames,\n getSymbols: $Object.getOwnPropertySymbols,\n each: [].forEach\n};","/* */ \nvar $ = require('../../modules/$');\nmodule.exports = function defineProperty(it, key, desc) {\n return $.setDesc(it, key, desc);\n};\n","/* */ \nmodule.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };","/* */ \n\"use strict\";\nvar _Object$defineProperty = require('../core-js/object/define-property')[\"default\"];\nexports[\"default\"] = (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor)\n descriptor.writable = true;\n _Object$defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function(Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n})();\nexports.__esModule = true;\n","/* */ \n\"use strict\";\n\nexports[\"default\"] = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nexports.__esModule = true;","/**\n * Created by kevin on 10/01/2016.\n */\n\nexport default class Unsubscriber {\n\n constructor(ngStomp, connections) {\n this.ngStomp = ngStomp;\n this.connections = connections;\n }\n\n unSubscribeAll() {\n this.connections.forEach(c => this.$$unSubscribeOf(c));\n this.connections = [];\n }\n\n unSubscribeOf(queue) {\n this.connections\n .filter(c => c.queue === queue)\n .forEach(c => this.$$unSubscribeOf(c));\n\n this.connections = this.connections.filter(c => c.queue !== queue);\n }\n\n unSubscribeNth(index) {\n this.connections\n .filter(c => c.index === index)\n .forEach(c => this.$$unSubscribeOf(c));\n\n this.connections = this.connections.filter(c => c.index !== index);\n }\n\n $$unSubscribeOf(c) {\n this.ngStomp.$$unSubscribeOf({ queue: c.queue, callback: c.callback, header: c.headers, scope: c.scope, digest : c.digest});\n }\n\n}","/**\n * Created by kevin on 14/12/2015.\n */\nimport UnSubscriber from './unSubscriber';\nimport angular from 'angular';\n\nexport default class SubscribeBuilder {\n\n /*@ngNoInject*/\n constructor(ngStomp, queue) {\n this.ngStomp = ngStomp;\n this.connections = [];\n\n this.subscribeTo(queue);\n }\n\n callback(aCallback) {\n this.aCallback = aCallback;\n return this;\n }\n\n withHeaders(headers) {\n this.headers = headers;\n return this;\n }\n\n bindTo(aScope) {\n this.scope = aScope;\n return this;\n }\n\n withBodyInJson() {\n this.json = true;\n return this;\n }\n\n withDigest(digest) {\n this.digest = digest;\n return this;\n }\n\n build() {\n return this.connect();\n }\n\n subscribeTo(queue) {\n this.queue = queue;\n this.aCallback = angular.noop;\n this.headers = {};\n this.scope = undefined;\n this.json = false;\n this.digest = true;\n\n return this;\n }\n\n connect() {\n this.and();\n this.connections.forEach(c => this.ngStomp.subscribe(c.queue, c.callback, c.headers, c.scope, c.json, c.digest));\n return new UnSubscriber(this.ngStomp, this.connections);\n }\n\n and() {\n this.connections.push({\n queue : this.queue, \n callback : this.aCallback, \n headers : this.headers, \n scope : this.scope, \n json : this.json,\n digest : this.digest,\n index : this.connections.length\n });\n return this;\n }\n}","/**\n * Created by kevin on 14/12/2015.\n */\nimport SubscribeBuilder from './builder';\nimport angular from 'angular';\n\nexport default class ngStompWebSocket {\n\n /*@ngNoInject*/\n constructor(settings, $q, $log, $rootScope, $timeout, Stomp) {\n this.settings = settings;\n this.$q = $q;\n this.$rootScope = $rootScope;\n this.$log = $log;\n this.Stomp = Stomp;\n this.$timeout = $timeout;\n this.connections = [];\n\n this.connect();\n }\n\n connect() {\n this.$setConnection();\n this.stompClient.connect(\n this.settings.login,\n this.settings.password,\n () => {\n this.deferred.resolve();\n },\n () => {\n this.deferred.reject();\n this.settings.timeOut >= 0 && this.$timeout(() => {\n this.connect();\n this.$reconnectAll();\n }, this.settings.timeOut);\n },\n this.settings.vhost\n );\n return this.promiseResult;\n }\n\n subscribe(queue, callback, header = {}, scope, json = false, digest) {\n this.promiseResult\n .then(\n () => this.$stompSubscribe(queue, callback, header, scope, json, digest),\n () => this.$$addToConnectionQueue({ queue, callback, header, scope, json, digest })\n )\n ;\n return this;\n }\n\n subscribeTo(topic) {\n return new SubscribeBuilder(this, topic);\n }\n\n /* Deprecated */\n unsubscribe(url) {\n this.promiseResult.then(() => this.$stompUnSubscribe(url));\n return this;\n }\n\n send(queue, data, header = {}) {\n let sendDeffered = this.$q.defer();\n\n this.promiseResult.then(() => {\n this.stompClient.send(queue, header, JSON.stringify(data));\n sendDeffered.resolve();\n });\n\n return sendDeffered.promise;\n }\n\n disconnect() {\n let disconnectionPromise = this.$q.defer();\n this.stompClient.disconnect(() => {\n disconnectionPromise.resolve();\n });\n\n return disconnectionPromise.promise;\n }\n\n $stompSubscribe(queue, callback, header, scope = this.$rootScope, json, digest) {\n let sub = this.stompClient.subscribe(queue, message => {\n if (json) message.body = JSON.parse(message.body);\n\n if (digest) {\n scope.$applyAsync(() => callback(message));\n } else {\n callback(message);\n }\n }, header);\n\n let connection = { queue, sub, callback, header, scope, json, digest};\n this.$$addToConnectionQueue(connection);\n this.$unRegisterScopeOnDestroy(connection);\n }\n\n $stompUnSubscribe(queue) {\n this.connections\n .filter(c => c.queue === queue)\n .forEach(c => c.sub.unsubscribe());\n\n this.connections = this.connections.filter(c => c.queue != queue);\n }\n\n $setConnection() {\n this.stompClient = this.settings.class ? this.Stomp.over(new this.settings.class(this.settings.url)) : this.Stomp.client(this.settings.url);\n this.stompClient.debug = (this.settings.debug) ? this.$log.debug : angular.noop;\n if (angular.isDefined(this.settings.heartbeat)) {\n this.stompClient.heartbeat.outgoing = this.settings.heartbeat.outgoing;\n this.stompClient.heartbeat.incoming = this.settings.heartbeat.incoming;\n }\n this.deferred = this.$q.defer();\n this.promiseResult = this.deferred.promise;\n }\n\n $unRegisterScopeOnDestroy(connection) {\n if (connection.scope !== undefined && angular.isFunction(connection.scope.$on))\n connection.scope.$on('$destroy', () => this.$$unSubscribeOf(connection) );\n }\n\n $reconnectAll() {\n let connections = this.connections;\n this.connections = [];\n // during subscription each connection will be added to this.connections array again\n connections.forEach(c => this.subscribe(c.queue, c.callback, c.header, c.scope, c.json, c.digest));\n }\n\n $$unSubscribeOf(connection) {\n this.connections\n .filter(c => this.$$connectionEquality(c, connection))\n .forEach(c => c.sub.unsubscribe());\n\n this.connections = this.connections.filter(c => !this.$$connectionEquality(c, connection));\n }\n\n $$addToConnectionQueue(connection) {\n this.connections.push(connection);\n }\n\n $$connectionEquality(c1, c2) {\n return c1.queue === c2.queue\n && c1.callback === c2.callback\n && c1.header === c2.header\n && c1.scope === c2.scope\n && c1.digest === c2.digest;\n }\n}","import ngStompWebSocket from './service';\n\nexport default class ngstompProvider {\n\n constructor() {\n this.settings = {\n timeOut : 5000,\n heartbeat : {\n outgoing : 10000,\n incoming : 10000\n }\n };\n }\n\n credential(login, password) {\n this.settings.login = login;\n this.settings.password = password;\n return this;\n }\n\n url(url) {\n this.settings.url = url;\n return this;\n }\n\n class(clazz) {\n this.settings.class = clazz;\n return this;\n }\n\n setting(settingsObject) {\n this.settings = settingsObject;\n return this;\n }\n\n debug(boolean) {\n this.settings.debug = boolean;\n return this;\n }\n\n vhost(host) {\n this.settings.vhost = host;\n return this;\n }\n\n reconnectAfter(numberInSeconds) {\n this.settings.timeOut = numberInSeconds * 1000;\n return this;\n }\n\n heartbeat(outgoing, incoming) {\n this.settings.heartbeat.outgoing = outgoing;\n this.settings.heartbeat.incoming = incoming;\n return this;\n }\n\n\n $get($q, $log, $rootScope, $timeout, Stomp) {\n \"ngInject\";\n return new ngStompWebSocket(this.settings, $q, $log, $rootScope, $timeout, Stomp);\n }\n}\n\n\n","import angular from 'angular';\nimport Stomp from 'stompjs';\nimport ngstompProvider from './provider';\n\nexport default angular\n .module('AngularStompDK', [])\n .provider('ngstomp', ngstompProvider)\n .constant('Stomp', Stomp);"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["angular-stomp.js","../jspm_packages/npm/core-js@1.2.6/library/modules/$.js","../jspm_packages/npm/core-js@1.2.6/library/fn/object/define-property.js","../jspm_packages/npm/babel-runtime@5.8.34/core-js/object/define-property.js","../jspm_packages/npm/babel-runtime@5.8.34/helpers/create-class.js","../jspm_packages/npm/babel-runtime@5.8.34/helpers/class-call-check.js","../core/unSubscriber.js","../core/builder.js","../core/service.js","../core/provider.js","../core/ngStomp.js"],"names":["e","r","o","arguments","length","t","apply","this","n","declarative","deps","declare","executingRequire","execute","name","p","normalizedDeps","groupIndex","v","call","push","a","u","evaluated","d","splice","TypeError","i","s","l","x","dependencies","exports","importers","module","locked","setters","c","esModule","f","Error","__useDefault","id","__esModule","g","Object","getOwnPropertyDescriptor","h","hasOwnProperty","value","D","substr","y","Array","prototype","indexOf","m","defineProperty","get","System","_nodeRequire","require","resolve","process","@empty","register","registerDynamic","set","newModule","self","global","$__System","window","document","location","protocol","hostname","port","getPathVars","lastIndexOf","split","pop","join","isWindows","filename","dirname","$__require","__define","define","undefined","$Object","create","getProto","getPrototypeOf","isEnum","propertyIsEnumerable","getDesc","setDesc","setDescs","defineProperties","getKeys","keys","getNames","getOwnPropertyNames","getSymbols","getOwnPropertySymbols","each","forEach","$","it","key","desc","default","_Object$defineProperty","target","props","descriptor","enumerable","configurable","writable","Constructor","protoProps","staticProps","instance","_export","_createClass","_classCallCheck","Unsubscriber","_","_2","ngStomp","connections","_this","$$unSubscribeOf","queue","_this2","filter","index","_this3","callback","header","headers","scope","digest","UnSubscriber","angular","SubscribeBuilder","_3","_4","subscribeTo","aCallback","aScope","json","connect","noop","and","subscribe","ngStompWebSocket","settings","$q","$log","$rootScope","$timeout","Stomp","$initConnectionState","$connect","deferred","reject","defer","connectionState","promise","$setConnection","stompClient","login","password","timeOut","$reconnectAll","vhost","then","$stompSubscribe","$$addToConnectionQueue","topic","url","$stompUnSubscribe","data","_this4","sendDeffered","send","JSON","stringify","disconnectionPromise","disconnect","sub","message","body","parse","$applyAsync","connection","$unRegisterScopeOnDestroy","unsubscribe","over","client","debug","isDefined","heartbeat","outgoing","incoming","_this5","isFunction","$on","_this6","_this7","$$connectionEquality","c1","c2","ngstompProvider","_a","_url","clazz","settingsObject","boolean","host","numberInSeconds","_c","_b","provider","constant","factory"],"mappings":"AAAA,eACA,0BACA,0BAEC,SAASA,GAAG,QAASC,GAAED,EAAEC,EAAEC,GAAG,MAAO,KAAIC,UAAUC,OAAOC,EAAEC,MAAMC,KAAKJ,eAAgBK,GAAER,GAAGS,aAAY,EAAGC,KAAKT,EAAEU,QAAQT,IAAI,QAASG,GAAEL,EAAEC,EAAEI,EAAEH,GAAGM,EAAER,GAAGS,aAAY,EAAGC,KAAKT,EAAEW,iBAAiBP,EAAEQ,QAAQX,IAAI,QAASM,GAAER,EAAEC,GAAGA,EAAEa,KAAKd,EAAEA,IAAKe,KAAIA,EAAEf,GAAGC,G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SAAS8C,UAAUE,SAAWA,EAC5BvM,QToiBKuG,IAAK,OACL7D,OSjiBZ,KAAA,OAAC,aAAU,WAAY,QAAU,SAAO8G,EAAAC,EAAAC,EAAAC,EAAAC,GACxC,UACA,OAAO,IAAIN,GAAiBtJ,KAAKuJ,SAAUC,EAAIC,EAAMC,EAAYC,EAAUC,QAzD9DoD,KTimBT3F,EAAQ,USjmBC2F,OTqmBrBhJ,EAAUN,SAAS,KAAM,IAAK,IAAK,KAAM,SAAU2D,GAC/C,YAEA,IAAIqB,GAASkB,EAAOoD,CACpB,QACInL,SAAU,SAAU4F,GAChBiB,EAAUjB,EAAE,YACb,SAAU+F,GACT5D,EAAQ4D,EAAG,YACZ,SAAUC,GACTT,EAAkBS,EAAG,aAEzBnN,QAAS,WACL+G,EAAQ,UUhnBLqB,EACV/G,OAAO,qBACP+L,SAAS,UAAWV,GACpBW,SAAS,QAAS/D,UVknBtB,SAASgE,GACRA,EAAQlF,QAASkB","file":"angular-stomp.min.js","sourcesContent":["\"format global\";\n\"globals.angular angular\";\n\"globals.Stomp stompjs\";\n\n!function(e){function r(e,r,o){return 4===arguments.length?t.apply(this,arguments):void n(e,{declarative:!0,deps:r,declare:o})}function t(e,r,t,o){n(e,{declarative:!1,deps:r,executingRequire:t,execute:o})}function n(e,r){r.name=e,e in p||(p[e]=r),r.normalizedDeps=r.deps}function o(e,r){if(r[e.groupIndex]=r[e.groupIndex]||[],-1==v.call(r[e.groupIndex],e)){r[e.groupIndex].push(e);for(var t=0,n=e.normalizedDeps.length;n>t;t++){var a=e.normalizedDeps[t],u=p[a];if(u&&!u.evaluated){var d=e.groupIndex+(u.declarative!=e.declarative);if(void 0===u.groupIndex||u.groupIndex=0;a--){for(var u=t[a],i=0;ia;a++){var d=t.importers[a];if(!d.locked)for(var i=0;ia;a++){var l,s=r.normalizedDeps[a],c=p[s],v=x[s];v?l=v.exports:c&&!c.declarative?l=c.esModule:c?(d(c),v=c.module,l=v.exports):l=f(s),v&&v.importers?(v.importers.push(t),t.dependencies.push(v)):t.dependencies.push(null),t.setters[a]&&t.setters[a](l)}}}function i(e){var r,t=p[e];if(t)t.declarative?c(e,[]):t.evaluated||l(t),r=t.module.exports;else if(r=f(e),!r)throw new Error(\"Unable to load dependency \"+e+\".\");return(!t||t.declarative)&&r&&r.__useDefault?r[\"default\"]:r}function l(r){if(!r.module){var t={},n=r.module={exports:t,id:r.name};if(!r.executingRequire)for(var o=0,a=r.normalizedDeps.length;a>o;o++){var u=r.normalizedDeps[o],d=p[u];d&&l(d)}r.evaluated=!0;var c=r.execute.call(e,function(e){for(var t=0,n=r.deps.length;n>t;t++)if(r.deps[t]==e)return i(r.normalizedDeps[t]);throw new TypeError(\"Module \"+e+\" not declared as a dependency.\")},t,n);c&&(n.exports=c),t=n.exports,t&&t.__esModule?r.esModule=t:r.esModule=s(t)}}function s(r){if(r===e)return r;var t={};if(\"object\"==typeof r||\"function\"==typeof r)if(g){var n;for(var o in r)(n=Object.getOwnPropertyDescriptor(r,o))&&h(t,o,n)}else{var a=r&&r.hasOwnProperty;for(var o in r)(!a||r.hasOwnProperty(o))&&(t[o]=r[o])}return t[\"default\"]=r,h(t,\"__useDefault\",{value:!0}),t}function c(r,t){var n=p[r];if(n&&!n.evaluated&&n.declarative){t.push(r);for(var o=0,a=n.normalizedDeps.length;a>o;o++){var u=n.normalizedDeps[o];-1==v.call(t,u)&&(p[u]?c(u,t):f(u))}n.evaluated||(n.evaluated=!0,n.module.execute.call(e))}}function f(e){if(D[e])return D[e];if(\"@node/\"==e.substr(0,6))return y(e.substr(6));var r=p[e];if(!r)throw\"Module \"+e+\" not present.\";return a(e),c(e,[]),p[e]=void 0,r.declarative&&h(r.module.exports,\"__esModule\",{value:!0}),D[e]=r.declarative?r.module.exports:r.esModule}var p={},v=Array.prototype.indexOf||function(e){for(var r=0,t=this.length;t>r;r++)if(this[r]===e)return r;return-1},g=!0;try{Object.getOwnPropertyDescriptor({a:0},\"a\")}catch(m){g=!1}var h;!function(){try{Object.defineProperty({},\"a\",{})&&(h=Object.defineProperty)}catch(e){h=function(e,r,t){try{e[r]=t.value||t.get.call(e)}catch(n){}}}}();var x={},y=\"undefined\"!=typeof System&&System._nodeRequire||\"undefined\"!=typeof require&&require.resolve&&\"undefined\"!=typeof process&&require,D={\"@empty\":{}};return function(e,n,o){return function(a){a(function(a){for(var u={_nodeRequire:y,register:r,registerDynamic:t,get:f,set:function(e,r){D[e]=r},newModule:function(e){return e}},d=0;d1)for(var d=1;d= 0 && _this.$timeout(function () {\n _this.$connect();\n _this.$reconnectAll();\n }, _this.settings.timeOut);\n }, this.settings.vhost);\n\n return this.connectionState;\n }\n }, {\n key: 'subscribe',\n value: function subscribe(queue, callback, header, scope, json, digest) {\n if (header === undefined) header = {};\n\n var _this2 = this;\n\n if (json === undefined) json = false;\n\n this.connectionState.then(function () {\n return _this2.$stompSubscribe(queue, callback, header, scope, json, digest);\n }, function () {\n return _this2.$$addToConnectionQueue({ queue: queue, callback: callback, header: header, scope: scope, json: json, digest: digest });\n });\n return this;\n }\n }, {\n key: 'subscribeTo',\n value: function subscribeTo(topic) {\n return new SubscribeBuilder(this, topic);\n }\n\n /* Deprecated */\n }, {\n key: 'unsubscribe',\n value: function unsubscribe(url) {\n var _this3 = this;\n\n this.connectionState.then(function () {\n return _this3.$stompUnSubscribe(url);\n });\n return this;\n }\n }, {\n key: 'send',\n value: function send(queue, data) {\n var _this4 = this;\n\n var header = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];\n\n var sendDeffered = this.$q.defer();\n\n this.connectionState.then(function () {\n _this4.stompClient.send(queue, header, JSON.stringify(data));\n sendDeffered.resolve();\n });\n\n return sendDeffered.promise;\n }\n }, {\n key: 'disconnect',\n value: function disconnect() {\n var disconnectionPromise = this.$q.defer();\n this.stompClient.disconnect(function () {\n disconnectionPromise.resolve();\n });\n\n return disconnectionPromise.promise;\n }\n }, {\n key: '$stompSubscribe',\n value: function $stompSubscribe(queue, callback, header, scope, json, digest) {\n if (scope === undefined) scope = this.$rootScope;\n\n var sub = this.stompClient.subscribe(queue, function (message) {\n if (json) message.body = JSON.parse(message.body);\n\n if (digest) {\n scope.$applyAsync(function () {\n return callback(message);\n });\n } else {\n callback(message);\n }\n }, header);\n\n var connection = { queue: queue, sub: sub, callback: callback, header: header, scope: scope, json: json, digest: digest };\n this.$$addToConnectionQueue(connection);\n this.$unRegisterScopeOnDestroy(connection);\n }\n }, {\n key: '$stompUnSubscribe',\n value: function $stompUnSubscribe(queue) {\n this.connections.filter(function (c) {\n return c.queue === queue;\n }).forEach(function (c) {\n return c.sub.unsubscribe();\n });\n\n this.connections = this.connections.filter(function (c) {\n return c.queue != queue;\n });\n }\n }, {\n key: '$setConnection',\n value: function $setConnection() {\n this.stompClient = this.settings['class'] ? this.Stomp.over(new this.settings['class'](this.settings.url)) : this.Stomp.client(this.settings.url);\n this.stompClient.debug = this.settings.debug ? this.$log.debug : angular.noop;\n if (angular.isDefined(this.settings.heartbeat)) {\n this.stompClient.heartbeat.outgoing = this.settings.heartbeat.outgoing;\n this.stompClient.heartbeat.incoming = this.settings.heartbeat.incoming;\n }\n }\n }, {\n key: '$unRegisterScopeOnDestroy',\n value: function $unRegisterScopeOnDestroy(connection) {\n var _this5 = this;\n\n if (connection.scope !== undefined && angular.isFunction(connection.scope.$on)) connection.scope.$on('$destroy', function () {\n return _this5.$$unSubscribeOf(connection);\n });\n }\n }, {\n key: '$reconnectAll',\n value: function $reconnectAll() {\n var _this6 = this;\n\n var connections = this.connections;\n this.connections = [];\n // during subscription each connection will be added to this.connections array again\n connections.forEach(function (c) {\n return _this6.subscribe(c.queue, c.callback, c.header, c.scope, c.json, c.digest);\n });\n }\n }, {\n key: '$$unSubscribeOf',\n value: function $$unSubscribeOf(connection) {\n var _this7 = this;\n\n this.connections.filter(function (c) {\n return _this7.$$connectionEquality(c, connection);\n }).forEach(function (c) {\n return c.sub.unsubscribe();\n });\n\n this.connections = this.connections.filter(function (c) {\n return !_this7.$$connectionEquality(c, connection);\n });\n }\n }, {\n key: '$$addToConnectionQueue',\n value: function $$addToConnectionQueue(connection) {\n this.connections.push(connection);\n }\n }, {\n key: '$$connectionEquality',\n value: function $$connectionEquality(c1, c2) {\n return c1.queue === c2.queue && c1.callback === c2.callback && c1.header === c2.header && c1.scope === c2.scope && c1.digest === c2.digest;\n }\n }]);\n\n return ngStompWebSocket;\n })();\n\n _export('default', ngStompWebSocket);\n }\n };\n});\n$__System.register(\"b\", [\"5\", \"6\", \"a\"], function (_export) {\n var _createClass, _classCallCheck, ngStompWebSocket, ngstompProvider;\n\n return {\n setters: [function (_) {\n _createClass = _[\"default\"];\n }, function (_2) {\n _classCallCheck = _2[\"default\"];\n }, function (_a) {\n ngStompWebSocket = _a[\"default\"];\n }],\n execute: function () {\n \"use strict\";\n\n ngstompProvider = (function () {\n function ngstompProvider() {\n _classCallCheck(this, ngstompProvider);\n\n this.settings = {\n timeOut: 5000,\n heartbeat: {\n outgoing: 10000,\n incoming: 10000\n }\n };\n }\n\n _createClass(ngstompProvider, [{\n key: \"credential\",\n value: function credential(login, password) {\n this.settings.login = login;\n this.settings.password = password;\n return this;\n }\n }, {\n key: \"url\",\n value: function url(_url) {\n this.settings.url = _url;\n return this;\n }\n }, {\n key: \"class\",\n value: function _class(clazz) {\n this.settings[\"class\"] = clazz;\n return this;\n }\n }, {\n key: \"setting\",\n value: function setting(settingsObject) {\n this.settings = settingsObject;\n return this;\n }\n }, {\n key: \"debug\",\n value: function debug(boolean) {\n this.settings.debug = boolean;\n return this;\n }\n }, {\n key: \"vhost\",\n value: function vhost(host) {\n this.settings.vhost = host;\n return this;\n }\n }, {\n key: \"reconnectAfter\",\n value: function reconnectAfter(numberInSeconds) {\n this.settings.timeOut = numberInSeconds * 1000;\n return this;\n }\n }, {\n key: \"heartbeat\",\n value: function heartbeat(outgoing, incoming) {\n this.settings.heartbeat.outgoing = outgoing;\n this.settings.heartbeat.incoming = incoming;\n return this;\n }\n }, {\n key: \"$get\",\n value: [\"$q\", \"$log\", \"$rootScope\", \"$timeout\", \"Stomp\", function $get($q, $log, $rootScope, $timeout, Stomp) {\n \"ngInject\";\n return new ngStompWebSocket(this.settings, $q, $log, $rootScope, $timeout, Stomp);\n }]\n }]);\n\n return ngstompProvider;\n })();\n\n _export(\"default\", ngstompProvider);\n }\n };\n});\n$__System.register('1', ['9', 'c', 'b'], function (_export) {\n 'use strict';\n\n var angular, Stomp, ngstompProvider;\n return {\n setters: [function (_) {\n angular = _['default'];\n }, function (_c) {\n Stomp = _c['default'];\n }, function (_b) {\n ngstompProvider = _b['default'];\n }],\n execute: function () {\n _export('default', angular.module('AngularStompDK', []).provider('ngstomp', ngstompProvider).constant('Stomp', Stomp));\n }\n };\n});\n})\n(function(factory) {\n factory(angular, Stomp);\n});\n","/* */ \nvar $Object = Object;\nmodule.exports = {\n create: $Object.create,\n getProto: $Object.getPrototypeOf,\n isEnum: {}.propertyIsEnumerable,\n getDesc: $Object.getOwnPropertyDescriptor,\n setDesc: $Object.defineProperty,\n setDescs: $Object.defineProperties,\n getKeys: $Object.keys,\n getNames: $Object.getOwnPropertyNames,\n getSymbols: $Object.getOwnPropertySymbols,\n each: [].forEach\n};","/* */ \nvar $ = require('../../modules/$');\nmodule.exports = function defineProperty(it, key, desc) {\n return $.setDesc(it, key, desc);\n};\n","/* */ \nmodule.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };","/* */ \n\"use strict\";\nvar _Object$defineProperty = require('../core-js/object/define-property')[\"default\"];\nexports[\"default\"] = (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor)\n descriptor.writable = true;\n _Object$defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function(Constructor, protoProps, staticProps) {\n if (protoProps)\n defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n defineProperties(Constructor, staticProps);\n return Constructor;\n };\n})();\nexports.__esModule = true;\n","/* */ \n\"use strict\";\n\nexports[\"default\"] = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nexports.__esModule = true;","/**\n * Created by kevin on 10/01/2016.\n */\n\nexport default class Unsubscriber {\n\n constructor(ngStomp, connections) {\n this.ngStomp = ngStomp;\n this.connections = connections;\n }\n\n unSubscribeAll() {\n this.connections.forEach(c => this.$$unSubscribeOf(c));\n this.connections = [];\n }\n\n unSubscribeOf(queue) {\n this.connections\n .filter(c => c.queue === queue)\n .forEach(c => this.$$unSubscribeOf(c));\n\n this.connections = this.connections.filter(c => c.queue !== queue);\n }\n\n unSubscribeNth(index) {\n this.connections\n .filter(c => c.index === index)\n .forEach(c => this.$$unSubscribeOf(c));\n\n this.connections = this.connections.filter(c => c.index !== index);\n }\n\n $$unSubscribeOf(c) {\n this.ngStomp.$$unSubscribeOf({ queue: c.queue, callback: c.callback, header: c.headers, scope: c.scope, digest : c.digest});\n }\n\n}","/**\n * Created by kevin on 14/12/2015.\n */\nimport UnSubscriber from './unSubscriber';\nimport angular from 'angular';\n\nexport default class SubscribeBuilder {\n\n /*@ngNoInject*/\n constructor(ngStomp, queue) {\n this.ngStomp = ngStomp;\n this.connections = [];\n\n this.subscribeTo(queue);\n }\n\n callback(aCallback) {\n this.aCallback = aCallback;\n return this;\n }\n\n withHeaders(headers) {\n this.headers = headers;\n return this;\n }\n\n bindTo(aScope) {\n this.scope = aScope;\n return this;\n }\n\n withBodyInJson() {\n this.json = true;\n return this;\n }\n\n withDigest(digest) {\n this.digest = digest;\n return this;\n }\n\n build() {\n return this.connect();\n }\n\n subscribeTo(queue) {\n this.queue = queue;\n this.aCallback = angular.noop;\n this.headers = {};\n this.scope = undefined;\n this.json = false;\n this.digest = true;\n\n return this;\n }\n\n connect() {\n this.and();\n this.connections.forEach(c => this.ngStomp.subscribe(c.queue, c.callback, c.headers, c.scope, c.json, c.digest));\n return new UnSubscriber(this.ngStomp, this.connections);\n }\n\n and() {\n this.connections.push({\n queue : this.queue, \n callback : this.aCallback, \n headers : this.headers, \n scope : this.scope, \n json : this.json,\n digest : this.digest,\n index : this.connections.length\n });\n return this;\n }\n}","/**\n * Created by kevin on 14/12/2015.\n */\nimport SubscribeBuilder from './builder';\nimport angular from 'angular';\n\nexport default class ngStompWebSocket {\n\n /*@ngNoInject*/\n constructor(settings, $q, $log, $rootScope, $timeout, Stomp) {\n this.settings = settings;\n this.$q = $q;\n this.$rootScope = $rootScope;\n this.$log = $log;\n this.Stomp = Stomp;\n this.$timeout = $timeout;\n this.connections = [];\n\n this.connect();\n }\n\n connect() {\n this.$initConnectionState();\n this.$connect();\n }\n\n $initConnectionState() {\n this.deferred && this.deferred.reject();\n this.deferred = this.$q.defer();\n this.connectionState = this.deferred.promise;\n }\n\n $connect() {\n this.$setConnection();\n\n this.stompClient.connect(\n this.settings.login,\n this.settings.password,\n () => this.deferred.resolve(),\n () => {\n this.deferred.reject();\n this.$initConnectionState();\n this.settings.timeOut >= 0 && this.$timeout(() => {\n this.$connect();\n this.$reconnectAll();\n }, this.settings.timeOut);\n },\n this.settings.vhost\n );\n\n return this.connectionState;\n }\n\n subscribe(queue, callback, header = {}, scope, json = false, digest) {\n this.connectionState\n .then(\n () => this.$stompSubscribe(queue, callback, header, scope, json, digest),\n () => this.$$addToConnectionQueue({ queue, callback, header, scope, json, digest })\n )\n ;\n return this;\n }\n\n subscribeTo(topic) {\n return new SubscribeBuilder(this, topic);\n }\n\n /* Deprecated */\n unsubscribe(url) {\n this.connectionState.then(() => this.$stompUnSubscribe(url));\n return this;\n }\n\n send(queue, data, header = {}) {\n let sendDeffered = this.$q.defer();\n\n this.connectionState.then(() => {\n this.stompClient.send(queue, header, JSON.stringify(data));\n sendDeffered.resolve();\n });\n\n return sendDeffered.promise;\n }\n\n disconnect() {\n let disconnectionPromise = this.$q.defer();\n this.stompClient.disconnect(() => {\n disconnectionPromise.resolve();\n });\n\n return disconnectionPromise.promise;\n }\n\n $stompSubscribe(queue, callback, header, scope = this.$rootScope, json, digest) {\n let sub = this.stompClient.subscribe(queue, message => {\n if (json) message.body = JSON.parse(message.body);\n\n if (digest) {\n scope.$applyAsync(() => callback(message));\n } else {\n callback(message);\n }\n }, header);\n\n let connection = { queue, sub, callback, header, scope, json, digest};\n this.$$addToConnectionQueue(connection);\n this.$unRegisterScopeOnDestroy(connection);\n }\n\n $stompUnSubscribe(queue) {\n this.connections\n .filter(c => c.queue === queue)\n .forEach(c => c.sub.unsubscribe());\n\n this.connections = this.connections.filter(c => c.queue != queue);\n }\n\n $setConnection() {\n this.stompClient = this.settings.class ? this.Stomp.over(new this.settings.class(this.settings.url)) : this.Stomp.client(this.settings.url);\n this.stompClient.debug = (this.settings.debug) ? this.$log.debug : angular.noop;\n if (angular.isDefined(this.settings.heartbeat)) {\n this.stompClient.heartbeat.outgoing = this.settings.heartbeat.outgoing;\n this.stompClient.heartbeat.incoming = this.settings.heartbeat.incoming;\n }\n }\n\n $unRegisterScopeOnDestroy(connection) {\n if (connection.scope !== undefined && angular.isFunction(connection.scope.$on))\n connection.scope.$on('$destroy', () => this.$$unSubscribeOf(connection) );\n }\n\n $reconnectAll() {\n let connections = this.connections;\n this.connections = [];\n // during subscription each connection will be added to this.connections array again\n connections.forEach(c => this.subscribe(c.queue, c.callback, c.header, c.scope, c.json, c.digest));\n }\n\n $$unSubscribeOf(connection) {\n this.connections\n .filter(c => this.$$connectionEquality(c, connection))\n .forEach(c => c.sub.unsubscribe());\n\n this.connections = this.connections.filter(c => !this.$$connectionEquality(c, connection));\n }\n\n $$addToConnectionQueue(connection) {\n this.connections.push(connection);\n }\n\n $$connectionEquality(c1, c2) {\n return c1.queue === c2.queue\n && c1.callback === c2.callback\n && c1.header === c2.header\n && c1.scope === c2.scope\n && c1.digest === c2.digest;\n }\n}","import ngStompWebSocket from './service';\n\nexport default class ngstompProvider {\n\n constructor() {\n this.settings = {\n timeOut : 5000,\n heartbeat : {\n outgoing : 10000,\n incoming : 10000\n }\n };\n }\n\n credential(login, password) {\n this.settings.login = login;\n this.settings.password = password;\n return this;\n }\n\n url(url) {\n this.settings.url = url;\n return this;\n }\n\n class(clazz) {\n this.settings.class = clazz;\n return this;\n }\n\n setting(settingsObject) {\n this.settings = settingsObject;\n return this;\n }\n\n debug(boolean) {\n this.settings.debug = boolean;\n return this;\n }\n\n vhost(host) {\n this.settings.vhost = host;\n return this;\n }\n\n reconnectAfter(numberInSeconds) {\n this.settings.timeOut = numberInSeconds * 1000;\n return this;\n }\n\n heartbeat(outgoing, incoming) {\n this.settings.heartbeat.outgoing = outgoing;\n this.settings.heartbeat.incoming = incoming;\n return this;\n }\n\n\n $get($q, $log, $rootScope, $timeout, Stomp) {\n \"ngInject\";\n return new ngStompWebSocket(this.settings, $q, $log, $rootScope, $timeout, Stomp);\n }\n}\n\n\n","import angular from 'angular';\nimport Stomp from 'stompjs';\nimport ngstompProvider from './provider';\n\nexport default angular\n .module('AngularStompDK', [])\n .provider('ngstomp', ngstompProvider)\n .constant('Stomp', Stomp);"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/package.json b/package.json index 033f19f..859fd71 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "prebuild": "jspm install", "build": "gulp build", "release": "gulp release --type $(type)", + "postrelease": "npm publish", "test": "karma start --single-run", "test-tdd": "karma start" },