1 /** 2 * DataSubscriber 3 */ 4 wso2vis.s.Subscriber = function() { 5 this.attr = []; 6 wso2vis.environment.subscribers.push(this); 7 id = wso2vis.environment.subscribers.length - 1; 8 this.getID = function() { 9 return id; 10 }; 11 }; 12 13 wso2vis.s.Subscriber.prototype.property = function(name) { 14 /* 15 * Define the setter-getter globally 16 */ 17 wso2vis.s.Subscriber.prototype[name] = function(v) { 18 if (arguments.length) { 19 this.attr[name] = v; 20 return this; 21 } 22 return this.attr[name]; 23 }; 24 25 return this; 26 }; 27 28 /** 29 * Set data to the subscriber. Providers use this method to push data to subscribers. 30 * 31 * @param {object} [data] a JSON object. 32 */ 33 wso2vis.s.Subscriber.prototype.pushData = function(data) { 34 }; 35 36