summaryrefslogtreecommitdiff
path: root/js/src/Ice/TcpEndpointFactory.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/Ice/TcpEndpointFactory.js')
-rw-r--r--js/src/Ice/TcpEndpointFactory.js73
1 files changed, 34 insertions, 39 deletions
diff --git a/js/src/Ice/TcpEndpointFactory.js b/js/src/Ice/TcpEndpointFactory.js
index d459685efb5..b4c63644274 100644
--- a/js/src/Ice/TcpEndpointFactory.js
+++ b/js/src/Ice/TcpEndpointFactory.js
@@ -7,43 +7,38 @@
//
// **********************************************************************
-(function(global){
- require("Ice/Class");
- require("Ice/TcpEndpointI");
- require("Ice/Endpoint");
-
- var Ice = global.Ice || {};
-
- var TcpEndpointI = Ice.TcpEndpointI;
- var TCPEndpointType = Ice.TCPEndpointType;
+var Ice = require("../Ice/ModuleRegistry").Ice;
+Ice.__M.require(module, "Ice", ["../Ice/Class", "../Ice/TcpEndpointI", "../Ice/Endpoint"]);
- var TcpEndpointFactory = Ice.Class({
- __init__: function(instance)
- {
- this._instance = instance;
- },
- type: function()
- {
- return TCPEndpointType;
- },
- protocol: function()
- {
- return "tcp";
- },
- create: function(str, oaEndpoint)
- {
- return TcpEndpointI.fromString(this._instance, str, oaEndpoint);
- },
- read: function(s)
- {
- return TcpEndpointI.fromStream(s);
- },
- destroy: function()
- {
- this._instance = null;
- }
- });
-
- Ice.TcpEndpointFactory = TcpEndpointFactory;
- global.Ice = Ice;
-}(typeof (global) === "undefined" ? window : global));
+var TcpEndpointI = Ice.TcpEndpointI;
+var TCPEndpointType = Ice.TCPEndpointType;
+
+var TcpEndpointFactory = Ice.Class({
+ __init__: function(instance)
+ {
+ this._instance = instance;
+ },
+ type: function()
+ {
+ return TCPEndpointType;
+ },
+ protocol: function()
+ {
+ return "tcp";
+ },
+ create: function(str, oaEndpoint)
+ {
+ return TcpEndpointI.fromString(this._instance, str, oaEndpoint);
+ },
+ read: function(s)
+ {
+ return TcpEndpointI.fromStream(s);
+ },
+ destroy: function()
+ {
+ this._instance = null;
+ }
+});
+
+Ice.TcpEndpointFactory = TcpEndpointFactory;
+module.exports.Ice = Ice;