error: function(){ this._cometd.connected = false; console.debug("tunnel opening failed"); }, url: (url||this._cometd.url), content: content, handleAs: this._cometd.handleAs, callbackParamName: "jsonp" }); this._cometd.connected = true; }  this.sendMessages = function(/*array*/ messages){ for(var i=messages.length;i-->0;){ messages[i].clientId = this._cometd.clientId; } var bindArgs = { url: this._cometd.url||djConfig["cometdRoot"], handleAs: this._cometd.handleAs, load: dojo.hitch(this._cometd, "deliver"), callbackParamName: "jsonp", content: { message: dojo.toJson( messages ) } }; return dojo.io.script.get(bindArgs); }  this.startup = function(handshakeData){ if(this._cometd.initialized){ return; } this.tunnelInit(); }  this.disconnect = dojox.cometd.longPollTransport.disconnect; } 
dojox.cometd.callbackPollTransport = new function(){	this._cometd=null;	this.lastTimestamp = null;	this.lastId = null;	this.check = function(types, version, xdomain){		// we handle x-domain!		return (dojo.indexOf(types, "callback-polling") >= 0);	}	this.tunnelInit = function(){		if(this._cometd.connected){ return; }		// FIXME: open up the connection here		this.openTunnelWith({			message: dojo.toJson([				{					channel:	"/meta/connect",					clientId:	this._cometd.clientId,					connectionType: "callback-polling"				}			])		});	}	this.tunnelCollapse = function(){		// TODO implement advice handling		if(!this._cometd.connected){			// try to restart the tunnel			this.openTunnelWith({				message: dojo.toJson([					{						channel:	"/meta/connect",						connectionType: "callback-polling",						clientId:	this._cometd.clientId,						timestamp:	this.lastTimestamp,						id:		this.lastId					}				])			});		}	}	// the logic appears to be the same	this.deliver = dojox.cometd.longPollTransport.deliver;	this.openTunnelWith = function(content, url){		// create a <script> element to generate the request		dojo.io.script.get({			load: dojo.hitch(this, function(data){				this._cometd.connected = false;				this._cometd.deliver(data);				this.tunnelCollapse();			}),			error: function(){				this._cometd.connected = false;				console.debug("tunnel opening failed");			},			url: (url||this._cometd.url),			content: content,			handleAs: this._cometd.handleAs,			callbackParamName: "jsonp"		});		this._cometd.connected = true;	}	this.sendMessages = function(/*array*/ messages){		for(var i=messages.length;i-->0;){			messages[i].clientId = this._cometd.clientId;		}		var bindArgs = {			url: this._cometd.url||djConfig["cometdRoot"],			handleAs: this._cometd.handleAs,			load: dojo.hitch(this._cometd, "deliver"),			callbackParamName: "jsonp",			content: { message: dojo.toJson( messages ) }		};		return dojo.io.script.get(bindArgs);	}	this.startup = function(handshakeData){		if(this._cometd.initialized){ return; }		this.tunnelInit();	}	this.disconnect = dojox.cometd.longPollTransport.disconnect;}
5168	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5168/4e0a83d4913f6df25977a9a7a3c67e0f1d35230a/cometd.js/clean/_cometd/cometd.js