diff options
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 26 | ||||
-rw-r--r-- | cpp/src/Ice/ProtocolInstance.cpp | 18 | ||||
-rw-r--r-- | cpp/src/Ice/ProtocolInstance.h | 11 | ||||
-rw-r--r-- | cpp/src/IceSSL/Instance.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IceSSL/PluginI.cpp | 9 | ||||
-rw-r--r-- | cs/src/Ice/Instance.cs | 13 | ||||
-rw-r--r-- | cs/src/Ice/ProtocolInstance.cs | 9 | ||||
-rw-r--r-- | cs/src/IceSSL/Instance.cs | 2 | ||||
-rw-r--r-- | cs/src/IceSSL/PluginI.cs | 2 | ||||
-rw-r--r-- | java/src/Ice/src/main/java/IceInternal/Instance.java | 12 | ||||
-rw-r--r-- | java/src/Ice/src/main/java/IceInternal/ProtocolInstance.java | 9 | ||||
-rw-r--r-- | java/src/Ice/src/main/java/IceSSL/Instance.java | 2 | ||||
-rw-r--r-- | java/src/Ice/src/main/java/IceSSL/PluginI.java | 14 | ||||
-rw-r--r-- | js/src/Ice/Instance.js | 8 | ||||
-rw-r--r-- | js/src/Ice/ProtocolInstance.js | 5 |
15 files changed, 76 insertions, 66 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 73189d1972c..47de1ec9a20 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -195,7 +195,7 @@ class Timer : public IceUtil::Timer { public: - Timer(int priority) : + Timer(int priority) : IceUtil::Timer(priority), _hasObserver(false) { @@ -1314,9 +1314,9 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi _locatorManager = new LocatorManager(_initData.properties); _referenceFactory = new ReferenceFactory(this, communicator); - + _requestHandlerFactory = new RequestHandlerFactory(this); - + _proxyFactory = new ProxyFactory(this); const bool isIPv6Supported = IceInternal::isIPv6Supported(); @@ -1344,28 +1344,28 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi _endpointFactoryManager = new EndpointFactoryManager(this); #ifndef ICE_OS_WINRT - ProtocolInstancePtr tcpProtocolInstance = new ProtocolInstance(this, TCPEndpointType, "tcp"); + ProtocolInstancePtr tcpProtocolInstance = new ProtocolInstance(this, TCPEndpointType, "tcp", false); EndpointFactoryPtr tcpEndpointFactory = new TcpEndpointFactory(tcpProtocolInstance); _endpointFactoryManager->add(tcpEndpointFactory); #else - ProtocolInstancePtr tcpProtocolInstance = new ProtocolInstance(this, TCPEndpointType, "tcp"); + ProtocolInstancePtr tcpProtocolInstance = new ProtocolInstance(this, TCPEndpointType, "tcp", false); EndpointFactoryPtr tcpEndpointFactory = new StreamEndpointFactory(tcpProtocolInstance); _endpointFactoryManager->add(tcpEndpointFactory); - ProtocolInstancePtr sslProtocolInstance = new ProtocolInstance(this, IceSSL::EndpointType, "ssl"); + ProtocolInstancePtr sslProtocolInstance = new ProtocolInstance(this, IceSSL::EndpointType, "ssl", true); EndpointFactoryPtr sslEndpointFactory = new StreamEndpointFactory(sslProtocolInstance); _endpointFactoryManager->add(sslEndpointFactory); - ProtocolInstancePtr wssProtocolInstance = new ProtocolInstance(this, WSSEndpointType, "wss"); + ProtocolInstancePtr wssProtocolInstance = new ProtocolInstance(this, WSSEndpointType, "wss", true); EndpointFactoryPtr wssEndpointFactory = new WSEndpointFactory(wssProtocolInstance, sslEndpointFactory->clone(wssProtocolInstance)); _endpointFactoryManager->add(wssEndpointFactory); #endif - ProtocolInstancePtr udpProtocolInstance = new ProtocolInstance(this, UDPEndpointType, "udp"); + ProtocolInstancePtr udpProtocolInstance = new ProtocolInstance(this, UDPEndpointType, "udp", false); EndpointFactoryPtr udpEndpointFactory = new UdpEndpointFactory(udpProtocolInstance); _endpointFactoryManager->add(udpEndpointFactory); - ProtocolInstancePtr wsProtocolInstance = new ProtocolInstance(this, WSEndpointType, "ws"); + ProtocolInstancePtr wsProtocolInstance = new ProtocolInstance(this, WSEndpointType, "ws", false); EndpointFactoryPtr wsEndpointFactory = new WSEndpointFactory(wsProtocolInstance, tcpEndpointFactory->clone(wsProtocolInstance)); @@ -1390,7 +1390,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi { _wstringConverter = new IceUtil::UnicodeWstringConverter; } - + __setNoDelete(false); } catch(...) @@ -1473,7 +1473,7 @@ IceInternal::Instance::finishSetup(int& argc, char* argv[], const Ice::Communica { _wstringConverter = new IceUtil::UnicodeWstringConverter; } - + // // Create Admin facets, if enabled. // @@ -1746,7 +1746,7 @@ IceInternal::Instance::destroy() // Now, destroy the thread pools. This must be done *only* after // all the connections are finished (the connections destruction // can require invoking callbacks with the thread pools). - // + // if(_serverThreadPool) { _serverThreadPool->destroy(); @@ -1781,7 +1781,7 @@ IceInternal::Instance::destroy() _endpointHostResolver->getThreadControl().join(); } #endif - + if(_servantFactoryManager) { _servantFactoryManager->destroy(); diff --git a/cpp/src/Ice/ProtocolInstance.cpp b/cpp/src/Ice/ProtocolInstance.cpp index c7f17a3d9c3..a376873af05 100644 --- a/cpp/src/Ice/ProtocolInstance.cpp +++ b/cpp/src/Ice/ProtocolInstance.cpp @@ -22,33 +22,31 @@ using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(ProtocolInstance* p) { return p; } -IceInternal::ProtocolInstance::ProtocolInstance(const CommunicatorPtr& com, Short type, const string& protocol) : +IceInternal::ProtocolInstance::ProtocolInstance(const CommunicatorPtr& com, Short type, const string& protocol, + bool secure) : _instance(getInstance(com)), _traceLevel(_instance->traceLevels()->network), _traceCategory(_instance->traceLevels()->networkCat), _properties(_instance->initializationData().properties), _protocol(protocol), - _type(type) + _type(type), + _secure(secure) { } -IceInternal::ProtocolInstance::ProtocolInstance(const InstancePtr& instance, Short type, const string& protocol) : +IceInternal::ProtocolInstance::ProtocolInstance(const InstancePtr& instance, Short type, const string& protocol, + bool secure) : _instance(instance), _traceLevel(_instance->traceLevels()->network), _traceCategory(_instance->traceLevels()->networkCat), _properties(_instance->initializationData().properties), _protocol(protocol), - _type(type) + _type(type), + _secure(secure) { } bool -IceInternal::ProtocolInstance::secure() const -{ - return _type == IceSSL::EndpointType || _type == WSSEndpointType; -} - -bool IceInternal::ProtocolInstance::preferIPv6() const { return _instance->preferIPv6(); diff --git a/cpp/src/Ice/ProtocolInstance.h b/cpp/src/Ice/ProtocolInstance.h index 3255f26f022..6500b09b52a 100644 --- a/cpp/src/Ice/ProtocolInstance.h +++ b/cpp/src/Ice/ProtocolInstance.h @@ -27,7 +27,7 @@ class ICE_API ProtocolInstance : public IceUtil::Shared { public: - ProtocolInstance(const Ice::CommunicatorPtr&, Ice::Short, const std::string&); + ProtocolInstance(const Ice::CommunicatorPtr&, Ice::Short, const std::string&, bool); int traceLevel() const { @@ -59,7 +59,11 @@ public: return _properties; } - bool secure() const; + bool secure() const + { + return _secure; + } + bool preferIPv6() const; ProtocolSupport protocolSupport() const; const std::string& defaultHost() const; @@ -74,7 +78,7 @@ public: private: - ProtocolInstance(const InstancePtr&, Ice::Short, const std::string&); + ProtocolInstance(const InstancePtr&, Ice::Short, const std::string&, bool); friend class Instance; const InstancePtr _instance; @@ -85,6 +89,7 @@ protected: const Ice::PropertiesPtr _properties; const std::string _protocol; const Ice::Short _type; + const bool _secure; }; } diff --git a/cpp/src/IceSSL/Instance.cpp b/cpp/src/IceSSL/Instance.cpp index c838566c942..d0380348f8d 100644 --- a/cpp/src/IceSSL/Instance.cpp +++ b/cpp/src/IceSSL/Instance.cpp @@ -22,7 +22,7 @@ using namespace IceSSL; IceUtil::Shared* IceSSL::upCast(IceSSL::Instance* p) { return p; } IceSSL::Instance::Instance(const SSLEnginePtr& engine, Short type, const string& protocol) : - ProtocolInstance(engine->communicator(), type, protocol), + ProtocolInstance(engine->communicator(), type, protocol, true), _engine(engine) { } diff --git a/cpp/src/IceSSL/PluginI.cpp b/cpp/src/IceSSL/PluginI.cpp index 5f35b0780d1..021f4007071 100644 --- a/cpp/src/IceSSL/PluginI.cpp +++ b/cpp/src/IceSSL/PluginI.cpp @@ -47,9 +47,9 @@ IceSSL::PluginI::PluginI(const Ice::CommunicatorPtr& communicator) #else _engine = new OpenSSLEngine(communicator); #endif - + IceInternal::ProtocolPluginFacadePtr facade = IceInternal::getProtocolPluginFacade(communicator); - + // // Register the endpoint factory. We have to do this now, rather // than in initialize, because the communicator may need to @@ -57,8 +57,9 @@ IceSSL::PluginI::PluginI(const Ice::CommunicatorPtr& communicator) // IceInternal::EndpointFactoryPtr sslFactory = new EndpointFactoryI(new Instance(_engine, EndpointType, "ssl")); facade->addEndpointFactory(sslFactory); - - IceInternal::ProtocolInstancePtr wss = new IceInternal::ProtocolInstance(communicator, WSSEndpointType, "wss"); + + IceInternal::ProtocolInstancePtr wss = + new IceInternal::ProtocolInstance(communicator, WSSEndpointType, "wss", true); facade->addEndpointFactory(new IceInternal::WSEndpointFactory(wss, sslFactory->clone(wss))); } diff --git a/cs/src/Ice/Instance.cs b/cs/src/Ice/Instance.cs index a5665c75583..e20c479a768 100644 --- a/cs/src/Ice/Instance.cs +++ b/cs/src/Ice/Instance.cs @@ -826,7 +826,7 @@ namespace IceInternal } } - if(_initData.properties.getProperty("Ice.BatchAutoFlushSize").Length == 0 && + if(_initData.properties.getProperty("Ice.BatchAutoFlushSize").Length == 0 && _initData.properties.getProperty("Ice.BatchAutoFlush").Length > 0) { if(_initData.properties.getPropertyAsInt("Ice.BatchAutoFlush") > 0) @@ -888,16 +888,17 @@ namespace IceInternal _networkProxy = createNetworkProxy(_initData.properties, _protocolSupport); _endpointFactoryManager = new EndpointFactoryManager(this); - ProtocolInstance tcpProtocolInstance = new ProtocolInstance(this, Ice.TCPEndpointType.value, "tcp"); + ProtocolInstance tcpProtocolInstance = + new ProtocolInstance(this, Ice.TCPEndpointType.value, "tcp", false); EndpointFactory tcpEndpointFactory = new TcpEndpointFactory(tcpProtocolInstance); _endpointFactoryManager.add(tcpEndpointFactory); ProtocolInstance udpProtocolInstance = - new ProtocolInstance(this, Ice.UDPEndpointType.value, "udp"); + new ProtocolInstance(this, Ice.UDPEndpointType.value, "udp", false); EndpointFactory udpEndpointFactory = new UdpEndpointFactory(udpProtocolInstance); _endpointFactoryManager.add(udpEndpointFactory); - ProtocolInstance wsProtocolInstance = new ProtocolInstance(this, Ice.WSEndpointType.value, "ws"); + ProtocolInstance wsProtocolInstance = new ProtocolInstance(this, Ice.WSEndpointType.value, "ws", false); _endpointFactoryManager.add(new WSEndpointFactory(wsProtocolInstance, tcpEndpointFactory.clone(wsProtocolInstance))); @@ -1138,7 +1139,7 @@ namespace IceInternal { Monitor.Wait(this); } - + if(_state == StateDestroyed) { return; @@ -1190,7 +1191,7 @@ namespace IceInternal // Now, destroy the thread pools. This must be done *only* after // all the connections are finished (the connections destruction // can require invoking callbacks with the thread pools). - // + // if(_serverThreadPool != null) { _serverThreadPool.destroy(); diff --git a/cs/src/Ice/ProtocolInstance.cs b/cs/src/Ice/ProtocolInstance.cs index 3b2e839bb7a..ca7c3b4824a 100644 --- a/cs/src/Ice/ProtocolInstance.cs +++ b/cs/src/Ice/ProtocolInstance.cs @@ -14,7 +14,7 @@ namespace IceInternal public class ProtocolInstance { - public ProtocolInstance(Ice.Communicator communicator, short type, string protocol) + public ProtocolInstance(Ice.Communicator communicator, short type, string protocol, bool secure) { instance_ = Util.getInstance(communicator); traceLevel_ = instance_.traceLevels().network; @@ -23,9 +23,10 @@ namespace IceInternal properties_ = instance_.initializationData().properties; type_ = type; protocol_ = protocol; + secure_ = secure; } - public ProtocolInstance(Instance instance, short type, string protocol) + public ProtocolInstance(Instance instance, short type, string protocol, bool secure) { instance_ = instance; traceLevel_ = instance_.traceLevels().network; @@ -34,6 +35,7 @@ namespace IceInternal properties_ = instance_.initializationData().properties; type_ = type; protocol_ = protocol; + secure_ = secure; } public int traceLevel() @@ -63,7 +65,7 @@ namespace IceInternal public bool secure() { - return type_ == 2 /*IceSSL.EndpointType.value*/ || type_ == Ice.WSSEndpointType.value; + return secure_; } public Ice.Properties properties() @@ -126,6 +128,7 @@ namespace IceInternal protected Ice.Properties properties_; protected string protocol_; protected short type_; + protected bool secure_; } } diff --git a/cs/src/IceSSL/Instance.cs b/cs/src/IceSSL/Instance.cs index c3b01d4bc4b..79b18435268 100644 --- a/cs/src/IceSSL/Instance.cs +++ b/cs/src/IceSSL/Instance.cs @@ -23,7 +23,7 @@ namespace IceSSL internal class Instance : IceInternal.ProtocolInstance { internal Instance(SSLEngine engine, short type, string protocol) : - base(engine.communicator(), type, protocol) + base(engine.communicator(), type, protocol, true) { _engine = engine; } diff --git a/cs/src/IceSSL/PluginI.cs b/cs/src/IceSSL/PluginI.cs index 1bdd4378c17..066ff59407b 100644 --- a/cs/src/IceSSL/PluginI.cs +++ b/cs/src/IceSSL/PluginI.cs @@ -50,7 +50,7 @@ namespace IceSSL facade.addEndpointFactory(sslEndpointFactory); IceInternal.ProtocolInstance wssProtocolInstance = - new IceInternal.ProtocolInstance(communicator, Ice.WSSEndpointType.value, "wss"); + new IceInternal.ProtocolInstance(communicator, Ice.WSSEndpointType.value, "wss", true); facade.addEndpointFactory(new IceInternal.WSEndpointFactory(wssProtocolInstance, sslEndpointFactory.clone(wssProtocolInstance))); } diff --git a/java/src/Ice/src/main/java/IceInternal/Instance.java b/java/src/Ice/src/main/java/IceInternal/Instance.java index c392c1d6772..0d31033fc80 100644 --- a/java/src/Ice/src/main/java/IceInternal/Instance.java +++ b/java/src/Ice/src/main/java/IceInternal/Instance.java @@ -911,7 +911,7 @@ public final class Instance } } - if(_initData.properties.getProperty("Ice.BatchAutoFlushSize").isEmpty() && + if(_initData.properties.getProperty("Ice.BatchAutoFlushSize").isEmpty() && !_initData.properties.getProperty("Ice.BatchAutoFlush").isEmpty()) { if(_initData.properties.getPropertyAsInt("Ice.BatchAutoFlush") > 0) @@ -976,15 +976,15 @@ public final class Instance _networkProxy = createNetworkProxy(_initData.properties, _protocolSupport); _endpointFactoryManager = new EndpointFactoryManager(this); - ProtocolInstance tcpProtocolInstance = new ProtocolInstance(this, Ice.TCPEndpointType.value, "tcp"); + ProtocolInstance tcpProtocolInstance = new ProtocolInstance(this, Ice.TCPEndpointType.value, "tcp", false); EndpointFactory tcpEndpointFactory = new TcpEndpointFactory(tcpProtocolInstance); _endpointFactoryManager.add(tcpEndpointFactory); - ProtocolInstance udpProtocolInstance = new ProtocolInstance(this, Ice.UDPEndpointType.value, "udp"); + ProtocolInstance udpProtocolInstance = new ProtocolInstance(this, Ice.UDPEndpointType.value, "udp", false); EndpointFactory udpEndpointFactory = new UdpEndpointFactory(udpProtocolInstance); _endpointFactoryManager.add(udpEndpointFactory); - ProtocolInstance wsProtocolInstance = new ProtocolInstance(this, Ice.WSEndpointType.value, "ws"); + ProtocolInstance wsProtocolInstance = new ProtocolInstance(this, Ice.WSEndpointType.value, "ws", false); EndpointFactory wsEndpointFactory = new WSEndpointFactory(wsProtocolInstance, tcpEndpointFactory.clone(wsProtocolInstance)); _endpointFactoryManager.add(wsEndpointFactory); @@ -1007,7 +1007,7 @@ public final class Instance // if(_initData.properties.getPropertyAsInt("Ice.ThreadInterruptSafe") > 0 || Util.isAndroid()) { - _queueExecutor = new QueueExecutor(_initData.properties, + _queueExecutor = new QueueExecutor(_initData.properties, Util.createThreadName(_initData.properties, "Ice.BackgroundIO")); _queueExecutorService = new QueueExecutorService(_queueExecutor); @@ -1313,7 +1313,7 @@ public final class Instance // Now, destroy the thread pools. This must be done *only* after // all the connections are finished (the connections destruction // can require invoking callbacks with the thread pools). - // + // if(_serverThreadPool != null) { _serverThreadPool.destroy(); diff --git a/java/src/Ice/src/main/java/IceInternal/ProtocolInstance.java b/java/src/Ice/src/main/java/IceInternal/ProtocolInstance.java index 99ebdb0e2ec..195a554892e 100644 --- a/java/src/Ice/src/main/java/IceInternal/ProtocolInstance.java +++ b/java/src/Ice/src/main/java/IceInternal/ProtocolInstance.java @@ -11,7 +11,7 @@ package IceInternal; public class ProtocolInstance { - public ProtocolInstance(Ice.Communicator communicator, short type, String protocol) + public ProtocolInstance(Ice.Communicator communicator, short type, String protocol, boolean secure) { _instance = Util.getInstance(communicator); _traceLevel = _instance.traceLevels().network; @@ -20,6 +20,7 @@ public class ProtocolInstance _properties = _instance.initializationData().properties; _type = type; _protocol = protocol; + _secure = secure; } public int traceLevel() @@ -49,7 +50,7 @@ public class ProtocolInstance public boolean secure() { - return _type == IceSSL.EndpointType.value || _type == Ice.WSSEndpointType.value; + return _secure; } public Ice.Properties properties() @@ -103,7 +104,7 @@ public class ProtocolInstance _instance.endpointHostResolver().resolve(host, port, type, endpt, callback); } - ProtocolInstance(Instance instance, short type, String protocol) + ProtocolInstance(Instance instance, short type, String protocol, boolean secure) { _instance = instance; _traceLevel = _instance.traceLevels().network; @@ -112,6 +113,7 @@ public class ProtocolInstance _properties = _instance.initializationData().properties; _type = type; _protocol = protocol; + _secure = secure; } protected Instance _instance; @@ -121,4 +123,5 @@ public class ProtocolInstance protected Ice.Properties _properties; protected String _protocol; protected short _type; + protected boolean _secure; } diff --git a/java/src/Ice/src/main/java/IceSSL/Instance.java b/java/src/Ice/src/main/java/IceSSL/Instance.java index 3a79712701d..d76b3f89bfd 100644 --- a/java/src/Ice/src/main/java/IceSSL/Instance.java +++ b/java/src/Ice/src/main/java/IceSSL/Instance.java @@ -13,7 +13,7 @@ class Instance extends IceInternal.ProtocolInstance { Instance(SSLEngine engine, short type, String protocol) { - super(engine.communicator(), type, protocol); + super(engine.communicator(), type, protocol, true); _engine = engine; } diff --git a/java/src/Ice/src/main/java/IceSSL/PluginI.java b/java/src/Ice/src/main/java/IceSSL/PluginI.java index 410004c36ac..d765f1fec55 100644 --- a/java/src/Ice/src/main/java/IceSSL/PluginI.java +++ b/java/src/Ice/src/main/java/IceSSL/PluginI.java @@ -23,15 +23,13 @@ class PluginI implements Plugin // proxies before the plug-in is fully initialized. // IceInternal.EndpointFactory sslEndpointFactory = - new EndpointFactoryI(new Instance(_engine, IceSSL.EndpointType.value, "ssl")); + new EndpointFactoryI(new Instance(_engine, IceSSL.EndpointType.value, "ssl")); facade.addEndpointFactory(sslEndpointFactory); - - - IceInternal.ProtocolInstance wssProtocolInstance = - new IceInternal.ProtocolInstance(communicator, Ice.WSSEndpointType.value, "wss"); - IceInternal.EndpointFactory wssEndpointFactory = - new IceInternal.WSEndpointFactory(wssProtocolInstance, - sslEndpointFactory.clone(wssProtocolInstance)); + + IceInternal.ProtocolInstance wssProtocolInstance = + new IceInternal.ProtocolInstance(communicator, Ice.WSSEndpointType.value, "wss", true); + IceInternal.EndpointFactory wssEndpointFactory = + new IceInternal.WSEndpointFactory(wssProtocolInstance, sslEndpointFactory.clone(wssProtocolInstance)); facade.addEndpointFactory(wssEndpointFactory); } diff --git a/js/src/Ice/Instance.js b/js/src/Ice/Instance.js index 177a6f87505..7a87146a74e 100644 --- a/js/src/Ice/Instance.js +++ b/js/src/Ice/Instance.js @@ -364,19 +364,19 @@ var Instance = Ice.Class({ this._endpointFactoryManager = new EndpointFactoryManager(this); - var tcpInstance = new Ice.ProtocolInstance(this, Ice.TCPEndpointType, "tcp"); + var tcpInstance = new Ice.ProtocolInstance(this, Ice.TCPEndpointType, "tcp", false); var tcpEndpointFactory = new Ice.TcpEndpointFactory(tcpInstance); this._endpointFactoryManager.add(tcpEndpointFactory); - var wsInstance = new Ice.ProtocolInstance(this, Ice.WSEndpointType, "ws"); + var wsInstance = new Ice.ProtocolInstance(this, Ice.WSEndpointType, "ws", false); var wsEndpointFactory = new Ice.WSEndpointFactory(wsInstance, tcpEndpointFactory.clone(wsInstance)); this._endpointFactoryManager.add(wsEndpointFactory); - var sslInstance = new Ice.ProtocolInstance(this, IceSSL.EndpointType, "ssl"); + var sslInstance = new Ice.ProtocolInstance(this, IceSSL.EndpointType, "ssl", true); var sslEndpointFactory = new Ice.TcpEndpointFactory(sslInstance); this._endpointFactoryManager.add(sslEndpointFactory); - var wssInstance = new Ice.ProtocolInstance(this, Ice.WSSEndpointType, "wss"); + var wssInstance = new Ice.ProtocolInstance(this, Ice.WSSEndpointType, "wss", true); var wssEndpointFactory = new Ice.WSEndpointFactory(wssInstance, sslEndpointFactory.clone(wssInstance)); this._endpointFactoryManager.add(wssEndpointFactory); diff --git a/js/src/Ice/ProtocolInstance.js b/js/src/Ice/ProtocolInstance.js index db8aa063e37..4f8345ae7c4 100644 --- a/js/src/Ice/ProtocolInstance.js +++ b/js/src/Ice/ProtocolInstance.js @@ -24,7 +24,7 @@ Ice.__M.require(module, ["../Ice/Class"]); // class bellow. // var ProtocolInstance = Ice.Class({ - __init__: function(instance, type, protocol) + __init__: function(instance, type, protocol, secure) { this._instance = instance; this._traceLevel = instance.traceLevels().network; @@ -33,6 +33,7 @@ var ProtocolInstance = Ice.Class({ this._properties = instance.initializationData().properties; this._type = type; this._protocol = protocol; + this._secure = secure; }, traceLevel: function() { @@ -56,7 +57,7 @@ var ProtocolInstance = Ice.Class({ }, secure: function() { - return this._type == IceSSL.EndpointType || this._type == Ice.WSSEndpointType; + return this._secure; }, properties: function() { |