diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2008-11-06 15:40:55 +0100 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2008-11-06 15:40:55 +0100 |
commit | d8b465e26599268b8eded0732e8f29062556997e (patch) | |
tree | f9ffd0443aa616eb4df1b461684f4aeeb53fb7b2 /qx08/source/class/tr/Server.js | |
parent | 996d9e92e597bc462d874b335865ff7844e2d332 (diff) | |
download | smokeping-d8b465e26599268b8eded0732e8f29062556997e.tar.gz smokeping-d8b465e26599268b8eded0732e8f29062556997e.tar.xz |
initial commit
Diffstat (limited to 'qx08/source/class/tr/Server.js')
-rw-r--r-- | qx08/source/class/tr/Server.js | 98 |
1 files changed, 52 insertions, 46 deletions
diff --git a/qx08/source/class/tr/Server.js b/qx08/source/class/tr/Server.js index 89496f1..c58ee53 100644 --- a/qx08/source/class/tr/Server.js +++ b/qx08/source/class/tr/Server.js @@ -3,70 +3,76 @@ ************************************************************************ */ /** - * A Tr specific rpc call which works + * A Tr specific rpc call which works */ +qx.Class.define('tr.Server', { + extend : qx.io.remote.Rpc, + type : "singleton", + + -qx.Class.define('Tr.Server', { - extend: qx.io.remote.Rpc, - type: "singleton", /* - ***************************************************************************** - CONSTRUCTOR - ***************************************************************************** - */ + ***************************************************************************** + CONSTRUCTOR + ***************************************************************************** + */ /** - * @param local_url {String} When running the application in file:// mode. - * where will we find our RPC server. - */ - construct: function (local_url) { + * @param local_url {String} When running the application in file:// mode. + * where will we find our RPC server. + */ + construct : function(local_url) { this.base(arguments); + this.set({ - timeout: 7000000, - url: 'tr.cgi', - serviceName: 'Tr', - crossDomain: true - }); - return this; + timeout : 60000, + url : 'tr.cgi', + serviceName : 'Tr', + crossDomain : true + }); + + return this; }, - /* - ***************************************************************************** - MEMBERS - ***************************************************************************** - */ - members : - { - /* - --------------------------------------------------------------------------- - CORE METHODS - --------------------------------------------------------------------------- - */ + + /* + ***************************************************************************** + MEMBERS + ***************************************************************************** + */ + + members : { + /* + --------------------------------------------------------------------------- + CORE METHODS + --------------------------------------------------------------------------- + */ /** * Tell about the BaseUrl we found. * * @type member - * - * @param {void} - * - * @return BaseUrl {Strings} - */ - - getBaseUrl: function(){ - return this.__base_url; + * @return {var} BaseUrl {Strings} + */ + getBaseUrl : function() { + return this.__base_url; }, - setLocalUrl: function(local_url){ - if ( document.location.host === '' ) { - with(this){ - setUrl(local_url+'tr.cgi'); - } - } - } + /** + * TODOC + * + * @type member + * @param local_url {var} TODOC + * @return {void} + */ + setLocalUrl : function(local_url) { + if (document.location.host === '') { + this.setUrl(local_url + 'tr.cgi'); + } + } } -}); +});
\ No newline at end of file |