From f6570c4883b596edb5c4111fad32439b8342c8ee Mon Sep 17 00:00:00 2001 From: fmoga Date: Sat, 14 Aug 2010 00:53:45 +0000 Subject: Modified sample name to a more general one as it was obsolete due to latest changes. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@985417 13f79535-47bb-0310-9956-ffa450edef68 --- ...org.apache.tuscany.sca.cometComponentContext.js | 55 ---------------------- 1 file changed, 55 deletions(-) delete mode 100644 sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/js/org.apache.tuscany.sca.cometComponentContext.js (limited to 'sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/js/org.apache.tuscany.sca.cometComponentContext.js') diff --git a/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/js/org.apache.tuscany.sca.cometComponentContext.js b/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/js/org.apache.tuscany.sca.cometComponentContext.js deleted file mode 100644 index c8dc19d15a..0000000000 --- a/sca-java-2.x/contrib/samples/stock-comet/src/main/webapp/js/org.apache.tuscany.sca.cometComponentContext.js +++ /dev/null @@ -1,55 +0,0 @@ -// TODO: Try isolating functional code one piece at a time by using it like in the inital version -var tuscanyComet = { - connectedEndpoint : null, - connect : function(transport) { - $.atmosphere.subscribe(document.location.toString() + 'tuscany-comet', - this.callback, - $.atmosphere.request = { - transport : transport - }); - this.connectedEndpoint = $.atmosphere.response; - }, - callAsync : function(url, callbackMethod) { - this.connectedEndpoint.push(document.location.toString() - + 'tuscany-comet/' + url, - null, - $.atmosphere.request = { - method : 'POST', - data : 'callback=' + callbackMethod.name - }); - }, - callback : function(response) { - var data = response.responseBody; - if (data.indexOf('#') != -1) { - var callbackMethod = data.substring(0, data.indexOf('#')); - data = data.substring(data.indexOf('#') + 1); - eval(callbackMethod + '("' + data + '");'); - } - } -}; - -// To be generated -var cometComponentContext = { - c1 : { - TemperatureService : { - getTemperatureCelsius : function(callbackMethod) { - tuscanyComet.callAsync('c1/TemperatureService/getTemperatureCelsius', callbackMethod); - }, - getTemperatureFahrenheit : function(callbackMethod) { - tuscanyComet.callAsync('c1/TemperatureService/getTemperatureFahrenheit', callbackMethod); - } - }, - HumidityService : { - getHumidity : function(callbackMethod) { - tuscanyComet.callAsync('c1/HumidityService/getHumidity', callbackMethod); - } - } - }, - c2 : { - PrecipitationService : { - getPrecipitation : function(callbackMethod) { - tuscanyComet.callAsync('c2/PrecipitationService/getPrecipitation', callbackMethod); - } - } - } -} \ No newline at end of file -- cgit v1.2.3