diff options
Diffstat (limited to 'java/src')
4 files changed, 19 insertions, 18 deletions
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); } |