d.addErrback(function(e){ console.debug("handshake error!:", e); }); 
dojox.cometd.longPollTransport = new function(){ this.connected = false;  this.authToken = null; this.lastTimestamp = null; this.lastId = null; this.backlog = [];  this.check = function(types, version, xdomain){ return ((!xdomain)&&(dojo.indexOf(types, "long-polling") >= 0)); }  this.tunnelInit = function(){ if(this.connected){ return; }  this.openTunnelWith({ message: dojo.toJson([ { channel:	"/meta/connect", clientId:	dojox.cometd.clientId, connectionType: "long-polling"   } ]) }); this.connected = true; }  this.tunnelCollapse = function(){ if(!this.connected){  this.connected = false;     if(dojox.cometd["advice"]){ if(dojox.cometd.advice["reconnect"]=="none"){ return; }  if(	(dojox.cometd.advice["interval"])&& (dojox.cometd.advice.interval>0) ){ setTimeout(function(){ dojox.cometd.currentTransport._reconnect(); }, dojox.cometd.advice.interval); }else{ this._reconnect(); } }else{ this._reconnect(); } } }  this._reconnect = function(){ if(	(dojox.cometd["advice"])&& (dojox.cometd.advice["reconnect"]=="handshake") ){ dojox.cometd.init(null,dojox.cometd.url); }else{ this.openTunnelWith({ message: dojo.toJson([ { channel:	"/meta/reconnect", connectionType: "long-polling", clientId:	dojox.cometd.clientId, timestamp:	this.lastTimestamp, id:			this.lastId  } ]) }); } }  this.deliver = function(message){     if(message["timestamp"]){ this.lastTimestamp = message.timestamp; } if(message["id"]){ this.lastId = message.id; }   if(	(message.channel.length > 5)&& (message.channel.substr(0, 5) == "/meta")){  switch(message.channel){ case "/meta/connect": if(!message.successful){ console.debug("cometd connection error:", message.error); return; } this.connected = true; this.processBacklog(); break; case "/meta/reconnect": if(!message.successful){ console.debug("cometd reconnection error:", message.error); return; } this.connected = true; break; case "/meta/subscribe": if(!message.successful){ console.debug("cometd subscription error for channel", message.channel, ":", message.error); return; } dojox.cometd.subscribed(message.channel);  break; } } }  this.openTunnelWith = function(content, url){  var d = dojo.xhrPost({ url: (url||dojox.cometd.url), content: content,  handleAs: dojox.cometd.handleAs, load: dojo.hitch(this, function(data){   dojox.cometd.deliver(data); this.connected = false; this.tunnelCollapse(); }), error: function(err){ console.debug("tunnel opening failed:", err);   } }); this.connected = true; }  this.processBacklog = function(){ while(this.backlog.length > 0){ this.sendMessage(this.backlog.shift(), true); } }  this.sendMessage = function(message, bypassBacklog){  if((bypassBacklog)||(this.connected)){ message.clientId = dojox.cometd.clientId;  return dojo.xhrPost({ url: dojox.cometd.url||djConfig["cometdRoot"], handleAs: dojox.cometd.handleAs, load: dojo.hitch(dojox.cometd, "deliver"), content: { message: dojo.toJson([ message ]) } }); }else{ this.backlog.push(message); } }  this.startup = function(handshakeData){ if(this.connected){ return; } this.tunnelInit(); } } 
		d.addErrback(function(e){ console.debug("handshake error!:", e); });
5168	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5168/f73f50f64ea1a8aa2e6d83818f687af6272462c1/cometd.js/clean/_cometd/cometd.js