a:23:{s:9:"#provides";s:41:"dojox.cometd.longPollTransportFormEncoded";s:9:"#resource";s:38:"cometd/longPollTransportFormEncoded.js";s:9:"#requires";a:1:{i:0;a:2:{i:0;s:6:"common";i:1;s:18:"dojox.cometd._base";}}s:41:"dojox.cometd.longPollTransportFormEncoded";a:5:{s:4:"type";s:8:"Function";s:11:"initialized";b:1;s:6:"source";s:4379:"dojo.provide("dojox.cometd.longPollTransportFormEncoded"); dojo.require("dojox.cometd._base"); dojox.cometd.longPollTransportFormEncoded = new function(){ // This is an alternative implementation to that provided in logPollTransport.js that // form encodes all messages instead of sending them as text/json this._connectionType = "long-polling"; this._cometd = null; this.check = function(types, version, xdomain){ return ((!xdomain)&&(dojo.indexOf(types, "long-polling") >= 0)); } this.tunnelInit = function(){ var message = { channel: "/meta/connect", clientId: this._cometd.clientId, connectionType: this._connectionType, id: "" + this._cometd.messageId++ }; message = this._cometd._extendOut(message); this.openTunnelWith({ message: dojo.toJson([message]) }); } this.tunnelCollapse = function(){ // TODO handle transport specific advice if(!this._cometd._initialized){ return; } if(this._cometd._advice && this._cometd._advice["reconnect"]=="none"){ return; } var interval = this._cometd._interval(); if (this._cometd._status=="connected") { setTimeout(dojo.hitch(this, "_connect"), interval); }else{ setTimeout(dojo.hitch(this._cometd, function(){ this.init(this.url, this._props); }), interval); } } this._connect = function(){ if(!this._cometd._initialized){ return; } if(this._cometd._polling) { return; } if((this._cometd._advice) && (this._cometd._advice["reconnect"]=="handshake")){ this._cometd._status="unconnected"; //? this._initialized = false; this._cometd.init(this._cometd.url, this._cometd._props); }else if(this._cometd._status=="connected"){ var message = { channel: "/meta/connect", connectionType: this._connectionType, clientId: this._cometd.clientId, id: "" + this._cometd.messageId++ }; if(this._cometd.connectTimeout>=this._cometd.expectedNetworkDelay){ message.advice = { timeout: this._cometd.connectTimeout - this._cometd.expectedNetworkDelay }; } message = this._cometd._extendOut(message); this.openTunnelWith({ message: dojo.toJson([message]) }); } } this.deliver = function(message){ // Nothing to do } this.openTunnelWith = function(content, url){ this._cometd._polling = true; var post = { url: (url||this._cometd.url), content: content, handleAs: this._cometd.handleAs, load: dojo.hitch(this, function(data){ this._cometd._polling=false; this._cometd.deliver(data); this._cometd._backon(); this.tunnelCollapse(); }), error: dojo.hitch(this, function(err){ var metaMsg = { failure: true, error: err, advice: this._cometd._advice }; this._cometd._polling=false; this._cometd._publishMeta("connect",false, metaMsg); this._cometd._backoff(); this.tunnelCollapse(); }) }; var connectTimeout = this._cometd._connectTimeout(); if(connectTimeout > 0){ post.timeout = connectTimeout; } this._poll = dojo.xhrPost(post); } this.sendMessages = function(messages){ for(var i=0; i < messages.length; i++){ messages[i].clientId = this._cometd.clientId; messages[i].id = "" + this._cometd.messageId++; messages[i]= this._cometd._extendOut(messages[i]); } return dojo.xhrPost({ url: this._cometd.url||dojo.config["cometdRoot"], handleAs: this._cometd.handleAs, load: dojo.hitch(this._cometd, "deliver"), content: { message: dojo.toJson(messages) }, error: dojo.hitch(this, function(err){ this._cometd._publishMeta("publish",false,{messages:messages}); }), timeout: this._cometd.expectedNetworkDelay }); } this.startup = function(handshakeData){ if(this._cometd._status=="connected"){ return; } this.tunnelInit(); } this.disconnect = function(){ var message = { channel: "/meta/disconnect", clientId: this._cometd.clientId, id: "" + this._cometd.messageId++ }; message = this._cometd._extendOut(message); dojo.xhrPost({ url: this._cometd.url || dojo.config["cometdRoot"], handleAs: this._cometd.handleAs, content: { message: dojo.toJson([message]) } }); } this.cancelConnect = function(){ if(this._poll){ this._poll.cancel(); this._cometd._polling=false; this._cometd._publishMeta("connect",false,{cancel:true}); this._cometd._backoff(); this.disconnect(); this.tunnelCollapse(); } }";s:7:"summary";s:0:"";s:9:"classlike";b:1;}s:57:"dojox.cometd.longPollTransportFormEncoded._connectionType";a:3:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:7:"private";b:1;s:7:"summary";s:0:"";}s:49:"dojox.cometd.longPollTransportFormEncoded._cometd";a:3:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:7:"private";b:1;s:7:"summary";s:0:"";}s:47:"dojox.cometd.longPollTransportFormEncoded.check";a:5:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:5:"types";a:1:{s:4:"type";s:0:"";}s:7:"version";a:1:{s:4:"type";s:0:"";}s:7:"xdomain";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:66:" return ((!xdomain)&&(dojo.indexOf(types, "long-polling") >= 0));";s:7:"summary";s:0:"";}s:52:"dojox.cometd.longPollTransportFormEncoded.tunnelInit";a:4:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:4:"type";s:8:"Function";s:6:"source";s:271:" var message = { channel: "/meta/connect", clientId: this._cometd.clientId, connectionType: this._connectionType, id: "" + this._cometd.messageId++ }; message = this._cometd._extendOut(message); this.openTunnelWith({ message: dojo.toJson([message]) });";s:7:"summary";s:0:"";}s:56:"dojox.cometd.longPollTransportFormEncoded.tunnelCollapse";a:4:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:4:"type";s:8:"Function";s:6:"source";s:1282:"dojo.provide("dojox.cometd.longPollTransportFormEncoded"); dojo.require("dojox.cometd._base"); dojox.cometd.longPollTransportFormEncoded = new function(){ // This is an alternative implementation to that provided in logPollTransport.js that // form encodes all messages instead of sending them as text/json this._connectionType = "long-polling"; this._cometd = null; this.check = function(types, version, xdomain){ return ((!xdomain)&&(dojo.indexOf(types, "long-polling") >= 0)); } this.tunnelInit = function(){ var message = { channel: "/meta/connect", clientId: this._cometd.clientId, connectionType: this._connectionType, id: "" + this._cometd.messageId++ }; message = this._cometd._extendOut(message); this.openTunnelWith({ message: dojo.toJson([message]) }); } this.tunnelCollapse = function(){ // TODO handle transport specific advice if(!this._cometd._initialized){ return; } if(this._cometd._advice && this._cometd._advice["reconnect"]=="none"){ return; } var interval = this._cometd._interval(); if (this._cometd._status=="connected") { setTimeout(dojo.hitch(this, "_connect"), interval); }else{ setTimeout(dojo.hitch(this._cometd, function(){ this.init(this.url, this._props); }), interval); }";s:7:"summary";s:0:"";}s:57:"dojox.cometd.longPollTransportFormEncoded._cometd._status";a:4:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:7:"private";b:1;s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:50:"dojox.cometd.longPollTransportFormEncoded._connect";a:5:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:4:"type";s:8:"Function";s:6:"source";s:821:" if(!this._cometd._initialized){ return; } if(this._cometd._polling) { return; } if((this._cometd._advice) && (this._cometd._advice["reconnect"]=="handshake")){ this._cometd._status="unconnected"; //? this._initialized = false; this._cometd.init(this._cometd.url, this._cometd._props); }else if(this._cometd._status=="connected"){ var message = { channel: "/meta/connect", connectionType: this._connectionType, clientId: this._cometd.clientId, id: "" + this._cometd.messageId++ }; if(this._cometd.connectTimeout>=this._cometd.expectedNetworkDelay){ message.advice = { timeout: this._cometd.connectTimeout - this._cometd.expectedNetworkDelay }; } message = this._cometd._extendOut(message); this.openTunnelWith({ message: dojo.toJson([message]) }); }";s:7:"private";b:1;s:7:"summary";s:0:"";}s:54:"dojox.cometd.longPollTransportFormEncoded._initialized";a:3:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:7:"private";b:1;s:7:"summary";s:0:"";}s:49:"dojox.cometd.longPollTransportFormEncoded.deliver";a:5:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"message";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:2197:"dojo.provide("dojox.cometd.longPollTransportFormEncoded"); dojo.require("dojox.cometd._base"); dojox.cometd.longPollTransportFormEncoded = new function(){ // This is an alternative implementation to that provided in logPollTransport.js that // form encodes all messages instead of sending them as text/json this._connectionType = "long-polling"; this._cometd = null; this.check = function(types, version, xdomain){ return ((!xdomain)&&(dojo.indexOf(types, "long-polling") >= 0)); } this.tunnelInit = function(){ var message = { channel: "/meta/connect", clientId: this._cometd.clientId, connectionType: this._connectionType, id: "" + this._cometd.messageId++ }; message = this._cometd._extendOut(message); this.openTunnelWith({ message: dojo.toJson([message]) }); } this.tunnelCollapse = function(){ // TODO handle transport specific advice if(!this._cometd._initialized){ return; } if(this._cometd._advice && this._cometd._advice["reconnect"]=="none"){ return; } var interval = this._cometd._interval(); if (this._cometd._status=="connected") { setTimeout(dojo.hitch(this, "_connect"), interval); }else{ setTimeout(dojo.hitch(this._cometd, function(){ this.init(this.url, this._props); }), interval); } } this._connect = function(){ if(!this._cometd._initialized){ return; } if(this._cometd._polling) { return; } if((this._cometd._advice) && (this._cometd._advice["reconnect"]=="handshake")){ this._cometd._status="unconnected"; //? this._initialized = false; this._cometd.init(this._cometd.url, this._cometd._props); }else if(this._cometd._status=="connected"){ var message = { channel: "/meta/connect", connectionType: this._connectionType, clientId: this._cometd.clientId, id: "" + this._cometd.messageId++ }; if(this._cometd.connectTimeout>=this._cometd.expectedNetworkDelay){ message.advice = { timeout: this._cometd.connectTimeout - this._cometd.expectedNetworkDelay }; } message = this._cometd._extendOut(message); this.openTunnelWith({ message: dojo.toJson([message]) }); } } this.deliver = function(message){ // Nothing to do";s:7:"summary";s:0:"";}s:56:"dojox.cometd.longPollTransportFormEncoded.openTunnelWith";a:5:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:7:"content";a:1:{s:4:"type";s:0:"";}s:3:"url";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:760:" this._cometd._polling = true; var post = { url: (url||this._cometd.url), content: content, handleAs: this._cometd.handleAs, load: dojo.hitch(this, function(data){ this._cometd._polling=false; this._cometd.deliver(data); this._cometd._backon(); this.tunnelCollapse(); }), error: dojo.hitch(this, function(err){ var metaMsg = { failure: true, error: err, advice: this._cometd._advice }; this._cometd._polling=false; this._cometd._publishMeta("connect",false, metaMsg); this._cometd._backoff(); this.tunnelCollapse(); }) }; var connectTimeout = this._cometd._connectTimeout(); if(connectTimeout > 0){ post.timeout = connectTimeout; } this._poll = dojo.xhrPost(post);";s:7:"summary";s:0:"";}s:58:"dojox.cometd.longPollTransportFormEncoded._cometd._polling";a:4:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:7:"private";b:1;s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:47:"dojox.cometd.longPollTransportFormEncoded._poll";a:3:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:7:"private";b:1;s:7:"summary";s:0:"";}s:54:"dojox.cometd.longPollTransportFormEncoded.sendMessages";a:5:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:8:"messages";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:575:" for(var i=0; i < messages.length; i++){ messages[i].clientId = this._cometd.clientId; messages[i].id = "" + this._cometd.messageId++; messages[i]= this._cometd._extendOut(messages[i]); } return dojo.xhrPost({ url: this._cometd.url||dojo.config["cometdRoot"], handleAs: this._cometd.handleAs, load: dojo.hitch(this._cometd, "deliver"), content: { message: dojo.toJson(messages) }, error: dojo.hitch(this, function(err){ this._cometd._publishMeta("publish",false,{messages:messages}); }), timeout: this._cometd.expectedNetworkDelay });";s:7:"summary";s:0:"";}s:49:"dojox.cometd.longPollTransportFormEncoded.startup";a:5:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:13:"handshakeData";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:71:" if(this._cometd._status=="connected"){ return; } this.tunnelInit();";s:7:"summary";s:0:"";}s:52:"dojox.cometd.longPollTransportFormEncoded.disconnect";a:4:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:4:"type";s:8:"Function";s:6:"source";s:335:" var message = { channel: "/meta/disconnect", clientId: this._cometd.clientId, id: "" + this._cometd.messageId++ }; message = this._cometd._extendOut(message); dojo.xhrPost({ url: this._cometd.url || dojo.config["cometdRoot"], handleAs: this._cometd.handleAs, content: { message: dojo.toJson([message]) } });";s:7:"summary";s:0:"";}s:55:"dojox.cometd.longPollTransportFormEncoded.cancelConnect";a:4:{s:8:"instance";s:41:"dojox.cometd.longPollTransportFormEncoded";s:4:"type";s:8:"Function";s:6:"source";s:214:" if(this._poll){ this._poll.cancel(); this._cometd._polling=false; this._cometd._publishMeta("connect",false,{cancel:true}); this._cometd._backoff(); this.disconnect(); this.tunnelCollapse(); }";s:7:"summary";s:0:"";}s:30:"dojox.cometd.longPollTransport";a:1:{s:7:"summary";s:0:"";}s:12:"dojox.cometd";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}