zeroc-ice 3.7.11 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/dist/IceRuby/Communicator.cpp +159 -376
- data/dist/IceRuby/Communicator.h +8 -9
- data/dist/IceRuby/Config.h +23 -89
- data/dist/IceRuby/Connection.cpp +111 -219
- data/dist/IceRuby/Connection.h +8 -12
- data/dist/IceRuby/DefaultSliceLoader.cpp +45 -0
- data/dist/IceRuby/DefaultSliceLoader.h +25 -0
- data/dist/IceRuby/Endpoint.cpp +63 -65
- data/dist/IceRuby/Endpoint.h +7 -11
- data/dist/IceRuby/ImplicitContext.cpp +26 -31
- data/dist/IceRuby/ImplicitContext.h +6 -10
- data/dist/IceRuby/Init.cpp +27 -40
- data/dist/IceRuby/Logger.cpp +23 -28
- data/dist/IceRuby/Logger.h +8 -12
- data/dist/IceRuby/Operation.cpp +177 -219
- data/dist/IceRuby/Operation.h +15 -18
- data/dist/IceRuby/Properties.cpp +133 -89
- data/dist/IceRuby/Properties.h +6 -10
- data/dist/IceRuby/Proxy.cpp +179 -649
- data/dist/IceRuby/Proxy.h +11 -12
- data/dist/IceRuby/RubySliceLoader.cpp +39 -0
- data/dist/IceRuby/RubySliceLoader.h +27 -0
- data/dist/IceRuby/Slice.cpp +88 -94
- data/dist/IceRuby/Slice.h +3 -7
- data/dist/IceRuby/Types.cpp +987 -1190
- data/dist/IceRuby/Types.h +390 -461
- data/dist/IceRuby/Util.cpp +214 -473
- data/dist/IceRuby/Util.h +378 -479
- data/dist/ice/cpp/include/Ice/AsyncResponseHandler.h +85 -0
- data/dist/ice/cpp/include/Ice/BatchRequest.h +39 -0
- data/dist/ice/cpp/include/Ice/BatchRequestQueueF.h +4 -10
- data/dist/ice/cpp/include/Ice/Buffer.h +116 -111
- data/dist/ice/cpp/include/Ice/Communicator.h +411 -0
- data/dist/ice/cpp/include/Ice/CommunicatorF.h +16 -0
- data/dist/ice/cpp/include/Ice/Config.h +46 -62
- data/dist/ice/cpp/include/Ice/Connection.h +410 -0
- data/dist/ice/cpp/include/Ice/ConnectionF.h +36 -0
- data/dist/ice/cpp/include/Ice/ConnectionIF.h +6 -28
- data/dist/ice/cpp/include/Ice/CtrlCHandler.h +56 -0
- data/dist/ice/cpp/include/Ice/Current.h +60 -0
- data/dist/ice/cpp/include/Ice/DefaultSliceLoader.h +160 -0
- data/dist/ice/cpp/include/Ice/Demangle.h +17 -0
- data/dist/ice/cpp/include/Ice/Endpoint.h +298 -0
- data/dist/ice/cpp/include/Ice/EndpointF.h +44 -0
- data/dist/ice/cpp/include/Ice/EndpointSelectionType.h +21 -0
- data/dist/ice/cpp/include/Ice/Exception.h +46 -151
- data/dist/ice/cpp/include/Ice/FacetMap.h +16 -0
- data/dist/ice/cpp/include/Ice/Format.h +11 -27
- data/dist/ice/cpp/include/Ice/Ice.h +53 -48
- data/dist/ice/cpp/include/Ice/IconvStringConverter.h +165 -326
- data/dist/ice/cpp/include/Ice/ImplicitContext.h +76 -0
- data/dist/ice/cpp/include/Ice/IncomingRequest.h +75 -0
- data/dist/ice/cpp/include/Ice/Initialize.h +113 -927
- data/dist/ice/cpp/include/Ice/InputStream.h +748 -1320
- data/dist/ice/cpp/include/Ice/InstanceF.h +4 -10
- data/dist/ice/cpp/include/Ice/Instrumentation.h +319 -0
- data/dist/ice/cpp/include/Ice/LocalException.h +58 -0
- data/dist/ice/cpp/include/Ice/LocalExceptions.h +870 -0
- data/dist/ice/cpp/include/Ice/Logger.h +62 -0
- data/dist/ice/cpp/include/Ice/LoggerUtil.h +124 -147
- data/dist/ice/cpp/include/Ice/MarshaledResult.h +50 -0
- data/dist/ice/cpp/include/Ice/NativePropertiesAdmin.h +41 -71
- data/dist/ice/cpp/include/Ice/Object.h +151 -490
- data/dist/ice/cpp/include/Ice/ObjectAdapter.h +324 -0
- data/dist/ice/cpp/include/Ice/ObjectAdapterF.h +16 -0
- data/dist/ice/cpp/include/Ice/ObjectF.h +5 -19
- data/dist/ice/cpp/include/Ice/ObserverHelper.h +115 -132
- data/dist/ice/cpp/include/Ice/OutgoingAsync.h +392 -748
- data/dist/ice/cpp/include/Ice/OutgoingResponse.h +129 -0
- data/dist/ice/cpp/include/Ice/OutputStream.h +756 -956
- data/dist/ice/cpp/include/Ice/Plugin.h +73 -0
- data/dist/ice/cpp/include/Ice/PluginFactory.h +77 -0
- data/dist/ice/cpp/include/{IceUtil → Ice}/PopDisableWarnings.h +8 -6
- data/dist/ice/cpp/include/Ice/Properties.h +307 -0
- data/dist/ice/cpp/include/Ice/PropertiesF.h +19 -0
- data/dist/ice/cpp/include/Ice/Proxy.h +665 -5094
- data/dist/ice/cpp/include/Ice/ProxyF.h +2 -44
- data/dist/ice/cpp/include/Ice/ProxyFunctions.h +209 -0
- data/dist/ice/cpp/include/Ice/PushDisableWarnings.h +29 -0
- data/dist/ice/cpp/include/Ice/ReferenceF.h +4 -19
- data/dist/ice/cpp/include/Ice/RequestHandlerF.h +8 -18
- data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +276 -0
- data/dist/ice/cpp/include/Ice/SSL/Config.h +54 -0
- data/dist/ice/cpp/include/Ice/SSL/ConnectionInfo.h +107 -0
- data/dist/ice/cpp/include/Ice/SSL/ConnectionInfoF.h +39 -0
- data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +40 -0
- data/dist/ice/cpp/include/Ice/SSL/SSLException.h +32 -0
- data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +286 -0
- data/dist/ice/cpp/include/Ice/ServantLocator.h +51 -0
- data/dist/ice/cpp/include/Ice/Service.h +182 -342
- data/dist/ice/cpp/include/Ice/SliceLoader.h +67 -0
- data/dist/ice/cpp/include/Ice/SlicedData.h +113 -160
- data/dist/ice/cpp/include/Ice/SlicedDataF.h +17 -27
- data/dist/ice/cpp/include/Ice/StreamHelpers.h +532 -1070
- data/dist/ice/cpp/include/Ice/StreamableTraits.h +291 -0
- data/dist/ice/cpp/include/Ice/StringConverter.h +152 -63
- data/dist/ice/cpp/include/Ice/StringUtil.h +114 -0
- data/dist/ice/cpp/include/Ice/TimerTask.h +24 -0
- data/dist/ice/cpp/include/Ice/TupleCompare.h +103 -0
- data/dist/ice/cpp/include/Ice/UUID.h +6 -9
- data/dist/ice/cpp/include/Ice/UserException.h +46 -0
- data/dist/ice/cpp/include/Ice/UserExceptionFactory.h +4 -79
- data/dist/ice/cpp/include/Ice/Value.h +103 -115
- data/dist/ice/cpp/include/Ice/ValueF.h +6 -11
- data/dist/ice/cpp/include/IceDiscovery/IceDiscovery.h +16 -1877
- data/dist/ice/cpp/include/IceLocatorDiscovery/IceLocatorDiscovery.h +16 -1185
- data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +46 -146
- data/dist/ice/cpp/include/generated/Ice/Context.h +40 -0
- data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +49 -93
- data/dist/ice/cpp/include/generated/Ice/Identity.h +70 -226
- data/dist/ice/cpp/include/generated/Ice/Locator.h +494 -3850
- data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +443 -0
- data/dist/ice/cpp/include/generated/Ice/Metrics.h +937 -4603
- data/dist/ice/cpp/include/generated/Ice/OperationMode.h +73 -0
- data/dist/ice/cpp/include/generated/Ice/Process.h +197 -929
- data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +249 -1301
- data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +39 -0
- data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +637 -2620
- data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +94 -0
- data/dist/ice/cpp/include/generated/Ice/Router.h +429 -1783
- data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +18 -65
- data/dist/ice/cpp/include/generated/Ice/Version.h +73 -318
- data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +498 -0
- data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +387 -0
- data/dist/ice/cpp/src/Ice/Acceptor.h +28 -24
- data/dist/ice/cpp/src/Ice/AcceptorF.h +6 -14
- data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories.h +16 -0
- data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +43 -0
- data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_min.cpp +17 -0
- data/dist/ice/cpp/src/Ice/ArgVector.cpp +17 -18
- data/dist/ice/cpp/src/Ice/ArgVector.h +19 -25
- data/dist/ice/cpp/src/Ice/Base64.cpp +66 -66
- data/dist/ice/cpp/src/Ice/Base64.h +14 -19
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +70 -121
- data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +37 -47
- data/dist/ice/cpp/src/Ice/Buffer.cpp +73 -41
- data/dist/ice/cpp/src/Ice/CheckIdentity.h +21 -0
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +215 -249
- data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +38 -60
- data/dist/ice/cpp/src/Ice/Communicator.cpp +399 -0
- data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +140 -0
- data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.h +39 -0
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +63 -184
- data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +30 -51
- data/dist/ice/cpp/src/Ice/ConnectRequestHandlerF.h +4 -14
- data/dist/ice/cpp/src/Ice/Connection.cpp +44 -0
- data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +578 -792
- data/dist/ice/cpp/src/Ice/ConnectionFactory.h +200 -200
- data/dist/ice/cpp/src/Ice/ConnectionFactoryF.h +6 -19
- data/dist/ice/cpp/src/Ice/ConnectionI.cpp +1674 -1782
- data/dist/ice/cpp/src/Ice/ConnectionI.h +333 -293
- data/dist/ice/cpp/src/Ice/ConnectionOptions.h +22 -0
- data/dist/ice/cpp/src/Ice/Connector.h +25 -19
- data/dist/ice/cpp/src/Ice/ConnectorF.h +4 -11
- data/dist/ice/cpp/src/{IceUtil → Ice}/ConsoleUtil.cpp +32 -53
- data/dist/ice/cpp/src/Ice/ConsoleUtil.h +79 -0
- data/dist/ice/cpp/src/Ice/CtrlCHandler.cpp +189 -0
- data/dist/ice/cpp/src/Ice/Current.cpp +29 -0
- data/dist/ice/cpp/src/Ice/DLLMain.cpp +25 -35
- data/dist/ice/cpp/src/Ice/DefaultSliceLoader.cpp +39 -0
- data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +41 -119
- data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.h +27 -41
- data/dist/ice/cpp/src/Ice/DefaultsAndOverridesF.h +4 -11
- data/dist/ice/cpp/src/Ice/Demangle.cpp +26 -0
- data/dist/ice/cpp/src/Ice/DisableWarnings.h +31 -0
- data/dist/ice/cpp/src/Ice/DynamicLibrary.cpp +44 -112
- data/dist/ice/cpp/src/Ice/DynamicLibrary.h +91 -0
- data/dist/ice/cpp/src/Ice/Endian.h +40 -0
- data/dist/ice/cpp/src/Ice/EndpointFactory.cpp +35 -59
- data/dist/ice/cpp/src/Ice/EndpointFactory.h +82 -103
- data/dist/ice/cpp/src/Ice/EndpointFactoryF.h +4 -11
- data/dist/ice/cpp/src/Ice/EndpointFactoryManager.cpp +54 -87
- data/dist/ice/cpp/src/Ice/EndpointFactoryManager.h +28 -33
- data/dist/ice/cpp/src/Ice/EndpointFactoryManagerF.h +4 -11
- data/dist/ice/cpp/src/Ice/EndpointI.cpp +53 -23
- data/dist/ice/cpp/src/Ice/EndpointI.h +132 -200
- data/dist/ice/cpp/src/Ice/EndpointIF.h +11 -39
- data/dist/ice/cpp/src/Ice/EventHandler.cpp +3 -26
- data/dist/ice/cpp/src/Ice/EventHandler.h +46 -56
- data/dist/ice/cpp/src/Ice/EventHandlerF.h +4 -14
- data/dist/ice/cpp/src/Ice/Exception.cpp +3 -816
- data/dist/ice/cpp/src/Ice/FileUtil.cpp +476 -0
- data/dist/ice/cpp/src/Ice/FileUtil.h +152 -0
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +34 -0
- data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +29 -0
- data/dist/ice/cpp/src/Ice/HashUtil.h +46 -32
- data/dist/ice/cpp/src/Ice/HttpParser.cpp +431 -431
- data/dist/ice/cpp/src/Ice/HttpParser.h +95 -100
- data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +207 -324
- data/dist/ice/cpp/src/Ice/IPEndpointI.h +80 -126
- data/dist/ice/cpp/src/Ice/IPEndpointIF.h +6 -17
- data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +172 -0
- data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.h +89 -0
- data/dist/ice/cpp/src/Ice/ImplicitContext.cpp +109 -0
- data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +66 -0
- data/dist/ice/cpp/src/Ice/Initialize.cpp +48 -542
- data/dist/ice/cpp/src/Ice/InputStream.cpp +848 -1385
- data/dist/ice/cpp/src/Ice/Instance.cpp +816 -827
- data/dist/ice/cpp/src/Ice/Instance.h +202 -212
- data/dist/ice/cpp/src/Ice/InstrumentationI.cpp +526 -661
- data/dist/ice/cpp/src/Ice/InstrumentationI.h +171 -192
- data/dist/ice/cpp/src/Ice/LocalException.cpp +518 -0
- data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +577 -0
- data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +291 -329
- data/dist/ice/cpp/src/Ice/LocatorInfo.h +144 -157
- data/dist/ice/cpp/src/Ice/LocatorInfoF.h +8 -17
- data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +561 -743
- data/dist/ice/cpp/src/Ice/LoggerAdminI.h +18 -28
- data/dist/ice/cpp/src/Ice/LoggerI.cpp +66 -91
- data/dist/ice/cpp/src/Ice/LoggerI.h +36 -41
- data/dist/ice/cpp/src/Ice/LoggerMiddleware.cpp +176 -0
- data/dist/ice/cpp/src/Ice/LoggerMiddleware.h +42 -0
- data/dist/ice/cpp/src/Ice/LoggerUtil.cpp +14 -38
- data/dist/ice/cpp/src/Ice/MarshaledResult.cpp +20 -0
- data/dist/ice/cpp/src/Ice/MetricsAdminI.cpp +194 -280
- data/dist/ice/cpp/src/Ice/MetricsAdminI.h +600 -0
- data/dist/ice/cpp/src/Ice/MetricsFunctional.h +92 -0
- data/dist/ice/cpp/src/Ice/MetricsObserverI.h +587 -0
- data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +185 -0
- data/dist/ice/cpp/src/Ice/Network.cpp +595 -917
- data/dist/ice/cpp/src/Ice/Network.h +189 -213
- data/dist/ice/cpp/src/Ice/NetworkF.h +2 -10
- data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +99 -104
- data/dist/ice/cpp/src/Ice/NetworkProxy.h +49 -54
- data/dist/ice/cpp/src/Ice/NetworkProxyF.h +4 -11
- data/dist/ice/cpp/src/Ice/OSLogLoggerI.cpp +16 -18
- data/dist/ice/cpp/src/Ice/OSLogLoggerI.h +22 -27
- data/dist/ice/cpp/src/Ice/Object.cpp +152 -338
- data/dist/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +170 -113
- data/dist/ice/cpp/src/Ice/ObjectAdapterFactory.h +41 -41
- data/dist/ice/cpp/src/Ice/ObjectAdapterFactoryF.h +4 -15
- data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +580 -727
- data/dist/ice/cpp/src/Ice/ObjectAdapterI.h +149 -145
- data/dist/ice/cpp/src/Ice/ObserverHelper.cpp +36 -17
- data/dist/ice/cpp/src/Ice/ObserverMiddleware.cpp +96 -0
- data/dist/ice/cpp/src/Ice/ObserverMiddleware.h +25 -0
- data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +147 -187
- data/dist/ice/cpp/src/Ice/OpaqueEndpointI.h +56 -64
- data/dist/ice/cpp/src/{IceUtil → Ice}/Options.cpp +187 -258
- data/dist/ice/cpp/src/Ice/Options.h +119 -0
- data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +516 -732
- data/dist/ice/cpp/src/Ice/OutgoingResponse.cpp +276 -0
- data/dist/ice/cpp/src/Ice/OutputStream.cpp +610 -543
- data/dist/ice/cpp/src/Ice/OutputUtil.cpp +344 -0
- data/dist/ice/cpp/src/Ice/OutputUtil.h +173 -0
- data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +118 -277
- data/dist/ice/cpp/src/Ice/PluginManagerI.h +41 -48
- data/dist/ice/cpp/src/Ice/Properties.cpp +931 -0
- data/dist/ice/cpp/src/Ice/PropertyNames.cpp +519 -1341
- data/dist/ice/cpp/src/Ice/PropertyNames.h +49 -64
- data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +103 -0
- data/dist/ice/cpp/src/Ice/PropertyUtil.h +31 -0
- data/dist/ice/cpp/src/Ice/Protocol.cpp +129 -94
- data/dist/ice/cpp/src/Ice/Protocol.h +116 -0
- data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +117 -62
- data/dist/ice/cpp/src/Ice/ProtocolInstance.h +63 -82
- data/dist/ice/cpp/src/Ice/ProtocolInstanceF.h +4 -11
- data/dist/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +10 -32
- data/dist/ice/cpp/src/Ice/ProtocolPluginFacade.h +25 -54
- data/dist/ice/cpp/src/Ice/Proxy.cpp +294 -1357
- data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +684 -0
- data/dist/ice/cpp/src/Ice/ProxyFunctions.cpp +90 -0
- data/dist/ice/cpp/src/Ice/PushDisableDeprecatedWarnings.h +15 -0
- data/dist/ice/cpp/src/Ice/Random.cpp +29 -0
- data/dist/ice/cpp/src/Ice/Random.h +23 -0
- data/dist/ice/cpp/src/Ice/Reference.cpp +635 -1097
- data/dist/ice/cpp/src/Ice/Reference.h +314 -298
- data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +320 -378
- data/dist/ice/cpp/src/Ice/ReferenceFactory.h +48 -66
- data/dist/ice/cpp/src/Ice/ReferenceFactoryF.h +4 -9
- data/dist/ice/cpp/src/Ice/RequestHandler.cpp +15 -24
- data/dist/ice/cpp/src/Ice/RequestHandler.h +43 -68
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +76 -0
- data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +33 -0
- data/dist/ice/cpp/src/Ice/ResourceConfig.h +27 -0
- data/dist/ice/cpp/src/Ice/RetryQueue.cpp +51 -57
- data/dist/ice/cpp/src/Ice/RetryQueue.h +39 -46
- data/dist/ice/cpp/src/Ice/RetryQueueF.h +4 -9
- data/dist/ice/cpp/src/Ice/RouterInfo.cpp +97 -201
- data/dist/ice/cpp/src/Ice/RouterInfo.h +61 -118
- data/dist/ice/cpp/src/Ice/RouterInfoF.h +6 -14
- data/dist/ice/cpp/src/Ice/SHA1.cpp +86 -60
- data/dist/ice/cpp/src/Ice/SHA1.h +35 -0
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +89 -0
- data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +87 -0
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +521 -0
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.h +40 -0
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngineF.h +13 -0
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +646 -0
- data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +80 -0
- data/dist/ice/cpp/src/{IceSSL → Ice/SSL}/RFC2253.cpp +85 -88
- data/dist/ice/cpp/src/Ice/SSL/RFC2253.h +58 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLAcceptorI.cpp +124 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLAcceptorI.h +52 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLConnectorI.cpp +92 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLConnectorI.h +38 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.cpp +377 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.h +84 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLEngine.cpp +115 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLEngine.h +69 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLEngineF.h +14 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLException.cpp +18 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLInstance.cpp +27 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLInstance.h +26 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLInstanceF.h +19 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +673 -0
- data/dist/ice/cpp/src/Ice/SSL/SSLUtil.h +118 -0
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +1449 -0
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.h +58 -0
- data/dist/ice/cpp/src/Ice/SSL/SchannelEngineF.h +18 -0
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +1088 -0
- data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +118 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +825 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.h +44 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngineF.h +18 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +621 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.h +91 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +1048 -0
- data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +40 -0
- data/dist/ice/cpp/src/Ice/SSL/TrustManager.cpp +233 -0
- data/dist/ice/cpp/src/Ice/SSL/TrustManager.h +42 -0
- data/dist/ice/cpp/src/Ice/SSL/TrustManagerF.h +14 -0
- data/dist/ice/cpp/src/Ice/ScannerConfig.h +35 -0
- data/dist/ice/cpp/src/Ice/Selector.cpp +341 -606
- data/dist/ice/cpp/src/Ice/Selector.h +167 -224
- data/dist/ice/cpp/src/Ice/ServantManager.cpp +195 -128
- data/dist/ice/cpp/src/Ice/ServantManager.h +52 -55
- data/dist/ice/cpp/src/Ice/ServantManagerF.h +14 -0
- data/dist/ice/cpp/src/Ice/Service.cpp +548 -641
- data/dist/ice/cpp/src/Ice/SharedContext.h +13 -26
- data/dist/ice/cpp/src/Ice/SliceLoader.cpp +53 -0
- data/dist/ice/cpp/src/Ice/SlicedData.cpp +17 -96
- data/dist/ice/cpp/src/Ice/StreamSocket.cpp +104 -151
- data/dist/ice/cpp/src/Ice/StreamSocket.h +48 -60
- data/dist/ice/cpp/src/Ice/StringConverter.cpp +586 -0
- data/dist/ice/cpp/src/Ice/StringUtil.cpp +1137 -0
- data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +41 -47
- data/dist/ice/cpp/src/Ice/SysLoggerI.h +24 -27
- data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +16 -17
- data/dist/ice/cpp/src/Ice/SystemdJournalI.h +19 -25
- data/dist/ice/cpp/src/Ice/TargetCompare.h +96 -0
- data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +67 -88
- data/dist/ice/cpp/src/Ice/TcpAcceptor.h +34 -40
- data/dist/ice/cpp/src/Ice/TcpConnector.cpp +42 -41
- data/dist/ice/cpp/src/Ice/TcpConnector.h +26 -35
- data/dist/ice/cpp/src/Ice/TcpEndpointI.cpp +172 -146
- data/dist/ice/cpp/src/Ice/TcpEndpointI.h +76 -80
- data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +38 -26
- data/dist/ice/cpp/src/Ice/TcpTransceiver.h +40 -45
- data/dist/ice/cpp/src/Ice/ThreadPool.cpp +333 -515
- data/dist/ice/cpp/src/Ice/ThreadPool.h +202 -290
- data/dist/ice/cpp/src/Ice/ThreadPoolF.h +14 -0
- data/dist/ice/cpp/src/Ice/TimeUtil.cpp +47 -0
- data/dist/ice/cpp/src/Ice/TimeUtil.h +21 -0
- data/dist/ice/cpp/src/Ice/Timer.cpp +73 -167
- data/dist/ice/cpp/src/Ice/Timer.h +212 -0
- data/dist/ice/cpp/src/Ice/TraceLevels.cpp +11 -29
- data/dist/ice/cpp/src/Ice/TraceLevels.h +22 -28
- data/dist/ice/cpp/src/Ice/TraceLevelsF.h +4 -11
- data/dist/ice/cpp/src/Ice/TraceUtil.cpp +136 -215
- data/dist/ice/cpp/src/Ice/TraceUtil.h +27 -16
- data/dist/ice/cpp/src/Ice/Transceiver.cpp +3 -7
- data/dist/ice/cpp/src/Ice/Transceiver.h +35 -32
- data/dist/ice/cpp/src/Ice/TransceiverF.h +10 -20
- data/dist/ice/cpp/src/Ice/UUID.cpp +79 -0
- data/dist/ice/cpp/src/Ice/UdpConnector.cpp +39 -39
- data/dist/ice/cpp/src/Ice/UdpConnector.h +27 -36
- data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +178 -213
- data/dist/ice/cpp/src/Ice/UdpEndpointI.h +82 -85
- data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +201 -221
- data/dist/ice/cpp/src/Ice/UdpTransceiver.h +68 -74
- data/dist/ice/cpp/{include/IceUtil → src/Ice}/UndefSysMacros.h +12 -12
- data/dist/ice/cpp/src/Ice/UniqueRef.h +77 -0
- data/dist/ice/cpp/src/Ice/UserException.cpp +58 -0
- data/dist/ice/cpp/src/Ice/Value.cpp +107 -38
- data/dist/ice/cpp/src/Ice/WSAcceptor.cpp +10 -15
- data/dist/ice/cpp/src/Ice/WSAcceptor.h +31 -37
- data/dist/ice/cpp/src/Ice/WSConnector.cpp +25 -40
- data/dist/ice/cpp/src/Ice/WSConnector.h +26 -33
- data/dist/ice/cpp/src/Ice/WSEndpoint.cpp +164 -217
- data/dist/ice/cpp/src/Ice/WSEndpoint.h +72 -83
- data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +469 -458
- data/dist/ice/cpp/src/Ice/WSTransceiver.h +117 -123
- data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +20 -29
- data/dist/ice/cpp/src/Ice/generated/Context.cpp +40 -0
- data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +20 -31
- data/dist/ice/cpp/src/Ice/generated/Identity.cpp +24 -34
- data/dist/ice/cpp/src/Ice/generated/Locator.cpp +454 -1744
- data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +577 -0
- data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +824 -1971
- data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +56 -0
- data/dist/ice/cpp/src/Ice/generated/Process.cpp +190 -331
- data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +289 -449
- data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +40 -0
- data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +547 -867
- data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +70 -0
- data/dist/ice/cpp/src/Ice/generated/Router.cpp +406 -723
- data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +19 -29
- data/dist/ice/cpp/src/Ice/generated/Version.cpp +28 -31
- data/dist/ice/cpp/src/IceDiscovery/LocatorI.cpp +76 -139
- data/dist/ice/cpp/src/IceDiscovery/LocatorI.h +55 -96
- data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +190 -303
- data/dist/ice/cpp/src/IceDiscovery/LookupI.h +126 -185
- data/dist/ice/cpp/src/IceDiscovery/PluginI.cpp +56 -77
- data/dist/ice/cpp/src/IceDiscovery/PluginI.h +20 -25
- data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +638 -0
- data/dist/ice/cpp/src/IceLocatorDiscovery/Plugin.h +14 -37
- data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +411 -649
- data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +468 -0
- data/dist/ice/cpp/src/Slice/DeprecationReporter.cpp +172 -0
- data/dist/ice/cpp/src/Slice/DeprecationReporter.h +14 -0
- data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +736 -0
- data/dist/ice/cpp/src/Slice/DocCommentParser.h +61 -0
- data/dist/ice/cpp/src/Slice/FileTracker.cpp +25 -75
- data/dist/ice/cpp/src/Slice/FileTracker.h +35 -56
- data/dist/ice/cpp/src/Slice/Grammar.cpp +2711 -3382
- data/dist/ice/cpp/src/Slice/Grammar.h +95 -75
- data/dist/ice/cpp/src/Slice/GrammarUtil.h +117 -217
- data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +486 -0
- data/dist/ice/cpp/src/Slice/MetadataValidation.h +106 -0
- data/dist/ice/cpp/src/Slice/Parser.cpp +3068 -5223
- data/dist/ice/cpp/src/Slice/Parser.h +1086 -1065
- data/dist/ice/cpp/src/Slice/Preprocessor.cpp +97 -599
- data/dist/ice/cpp/src/Slice/Preprocessor.h +26 -42
- data/dist/ice/cpp/src/Slice/Scanner.cpp +1562 -924
- data/dist/ice/cpp/src/Slice/SliceUtil.cpp +517 -113
- data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +254 -269
- data/dist/ice/cpp/src/Slice/Util.h +126 -35
- data/dist/ice/cpp/src/slice2rb/Main.cpp +13 -15
- data/dist/ice/cpp/src/slice2rb/Ruby.cpp +250 -0
- data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +1197 -0
- data/dist/ice/cpp/src/slice2rb/RubyUtil.h +56 -0
- data/dist/ice/slice/Glacier2/Metrics.ice +34 -75
- data/dist/ice/slice/Glacier2/PermissionsVerifier.ice +42 -98
- data/dist/ice/slice/Glacier2/Router.ice +80 -173
- data/dist/ice/slice/Glacier2/SSLInfo.ice +23 -40
- data/dist/ice/slice/Glacier2/Session.ice +120 -261
- data/dist/ice/slice/Ice/BuiltinSequences.ice +33 -38
- data/dist/ice/slice/Ice/Context.ice +24 -0
- data/dist/ice/slice/Ice/EndpointTypes.ice +35 -33
- data/dist/ice/slice/Ice/Identity.ice +24 -63
- data/dist/ice/slice/Ice/Locator.ice +61 -226
- data/dist/ice/slice/Ice/LocatorRegistry.ice +77 -0
- data/dist/ice/slice/Ice/Metrics.ice +189 -424
- data/dist/ice/slice/Ice/OperationMode.ice +38 -0
- data/dist/ice/slice/Ice/Process.ice +16 -52
- data/dist/ice/slice/Ice/PropertiesAdmin.ice +25 -75
- data/dist/ice/slice/Ice/PropertyDict.ice +23 -0
- data/dist/ice/slice/Ice/RemoteLogger.ice +113 -213
- data/dist/ice/slice/Ice/ReplyStatus.ice +65 -0
- data/dist/ice/slice/Ice/Router.ice +42 -91
- data/dist/ice/slice/Ice/SliceChecksumDict.ice +7 -25
- data/dist/ice/slice/Ice/Version.ice +31 -39
- data/dist/ice/slice/IceBox/ServiceManager.ice +79 -0
- data/dist/ice/slice/IceGrid/Admin.ice +942 -1918
- data/dist/ice/slice/IceGrid/Descriptor.ice +476 -1051
- data/dist/ice/slice/IceGrid/Exception.ice +86 -384
- data/dist/ice/slice/IceGrid/FileParser.ice +23 -59
- data/dist/ice/slice/IceGrid/Registry.ice +117 -256
- data/dist/ice/slice/IceGrid/Session.ice +46 -110
- data/dist/ice/slice/IceGrid/UserAccountMapper.ice +22 -57
- data/dist/ice/slice/IceStorm/IceStorm.ice +173 -401
- data/dist/ice/slice/IceStorm/Metrics.ice +28 -70
- data/dist/lib/Glacier2/Metrics.rb +16 -31
- data/dist/lib/Glacier2/PermissionsVerifier.rb +18 -50
- data/dist/lib/Glacier2/Router.rb +20 -42
- data/dist/lib/Glacier2/SSLInfo.rb +14 -22
- data/dist/lib/Glacier2/Session.rb +53 -113
- data/dist/lib/Glacier2.rb +6 -6
- data/dist/lib/Ice/BuiltinSequences.rb +14 -26
- data/dist/lib/Ice/CompressBatch.rb +50 -0
- data/dist/lib/Ice/Context.rb +12 -0
- data/dist/lib/Ice/EndpointSelectionType.rb +49 -0
- data/dist/lib/Ice/EndpointTypes.rb +14 -55
- data/dist/lib/Ice/Exception.rb +20 -0
- data/dist/lib/Ice/Identity.rb +10 -26
- data/dist/lib/Ice/IdentitySpaceship.rb +16 -0
- data/dist/lib/Ice/InitializationData.rb +12 -0
- data/dist/lib/Ice/LocalExceptions.rb +168 -0
- data/dist/lib/Ice/Locator.rb +21 -134
- data/dist/lib/Ice/LocatorRegistry.rb +73 -0
- data/dist/lib/Ice/Metrics.rb +85 -132
- data/dist/lib/Ice/OperationMode.rb +58 -0
- data/dist/lib/Ice/Process.rb +12 -31
- data/dist/lib/Ice/PropertiesAdmin.rb +12 -36
- data/dist/lib/Ice/PropertyDict.rb +12 -0
- data/dist/lib/Ice/Proxy.rb +85 -0
- data/dist/lib/Ice/ProxyFunctions.rb +69 -0
- data/dist/lib/Ice/RemoteLogger.rb +29 -60
- data/dist/lib/Ice/ReplyStatus.rb +65 -0
- data/dist/lib/Ice/Router.rb +19 -47
- data/dist/lib/Ice/SliceChecksumDict.rb +5 -17
- data/dist/lib/Ice/SliceUtil.rb +41 -0
- data/dist/lib/Ice/Struct.rb +11 -0
- data/dist/lib/Ice/ToStringMode.rb +50 -0
- data/dist/lib/Ice/Value.rb +93 -0
- data/dist/lib/Ice/Version.rb +12 -24
- data/dist/lib/Ice.rb +29 -665
- data/dist/lib/IceBox/ServiceManager.rb +104 -0
- data/dist/lib/IceBox.rb +2 -4
- data/dist/lib/IceGrid/Admin.rb +303 -291
- data/dist/lib/IceGrid/Descriptor.rb +147 -192
- data/dist/lib/IceGrid/Exception.rb +26 -257
- data/dist/lib/IceGrid/FileParser.rb +12 -36
- data/dist/lib/IceGrid/Registry.rb +35 -76
- data/dist/lib/IceGrid/Session.rb +19 -34
- data/dist/lib/IceGrid/UserAccountMapper.rb +11 -34
- data/dist/lib/IceGrid.rb +3 -3
- data/dist/lib/IceStorm/IceStorm.rb +51 -132
- data/dist/lib/IceStorm/Metrics.rb +19 -37
- data/dist/lib/IceStorm.rb +3 -5
- data/extconf.rb +6 -8
- data/ice.gemspec +3 -3
- data/scripts/slice2rb +1 -3
- metadata +206 -386
- data/dist/IceRuby/ValueFactoryManager.cpp +0 -445
- data/dist/IceRuby/ValueFactoryManager.h +0 -95
- data/dist/ice/cpp/include/Ice/Application.h +0 -326
- data/dist/ice/cpp/include/Ice/AsyncResult.h +0 -155
- data/dist/ice/cpp/include/Ice/AsyncResultF.h +0 -23
- data/dist/ice/cpp/include/Ice/BatchRequestInterceptor.h +0 -75
- data/dist/ice/cpp/include/Ice/CommunicatorAsync.h +0 -154
- data/dist/ice/cpp/include/Ice/Comparable.h +0 -205
- data/dist/ice/cpp/include/Ice/ConnectionAsync.h +0 -302
- data/dist/ice/cpp/include/Ice/ConsoleUtil.h +0 -23
- data/dist/ice/cpp/include/Ice/DefaultValueFactory.h +0 -57
- data/dist/ice/cpp/include/Ice/DispatchInterceptor.h +0 -41
- data/dist/ice/cpp/include/Ice/Dispatcher.h +0 -67
- data/dist/ice/cpp/include/Ice/DynamicLibrary.h +0 -102
- data/dist/ice/cpp/include/Ice/DynamicLibraryF.h +0 -24
- data/dist/ice/cpp/include/Ice/ExceptionHelpers.h +0 -74
- data/dist/ice/cpp/include/Ice/FactoryTable.h +0 -73
- data/dist/ice/cpp/include/Ice/FactoryTableInit.h +0 -84
- data/dist/ice/cpp/include/Ice/Functional.h +0 -140
- data/dist/ice/cpp/include/Ice/GCObject.h +0 -76
- data/dist/ice/cpp/include/Ice/Handle.h +0 -182
- data/dist/ice/cpp/include/Ice/Incoming.h +0 -225
- data/dist/ice/cpp/include/Ice/IncomingAsync.h +0 -186
- data/dist/ice/cpp/include/Ice/IncomingAsyncF.h +0 -36
- data/dist/ice/cpp/include/Ice/InterfaceByValue.h +0 -57
- data/dist/ice/cpp/include/Ice/LocalObject.h +0 -35
- data/dist/ice/cpp/include/Ice/LocalObjectF.h +0 -21
- data/dist/ice/cpp/include/Ice/MetricsAdminI.h +0 -715
- data/dist/ice/cpp/include/Ice/MetricsFunctional.h +0 -159
- data/dist/ice/cpp/include/Ice/MetricsObserverI.h +0 -669
- data/dist/ice/cpp/include/Ice/Optional.h +0 -1114
- data/dist/ice/cpp/include/Ice/OutgoingAsyncF.h +0 -39
- data/dist/ice/cpp/include/Ice/Protocol.h +0 -274
- data/dist/ice/cpp/include/Ice/ProxyFactoryF.h +0 -21
- data/dist/ice/cpp/include/Ice/ProxyHandle.h +0 -318
- data/dist/ice/cpp/include/Ice/RegisterPlugins.h +0 -127
- data/dist/ice/cpp/include/Ice/ResponseHandlerF.h +0 -25
- data/dist/ice/cpp/include/Ice/SHA1.h +0 -40
- data/dist/ice/cpp/include/Ice/ServantManagerF.h +0 -21
- data/dist/ice/cpp/include/Ice/SliceChecksums.h +0 -33
- data/dist/ice/cpp/include/Ice/ThreadPoolF.h +0 -23
- data/dist/ice/cpp/include/Ice/UniquePtr.h +0 -95
- data/dist/ice/cpp/include/Ice/UniqueRef.h +0 -97
- data/dist/ice/cpp/include/IceSSL/Config.h +0 -21
- data/dist/ice/cpp/include/IceSSL/IceSSL.h +0 -24
- data/dist/ice/cpp/include/IceSSL/OpenSSL.h +0 -147
- data/dist/ice/cpp/include/IceSSL/Plugin.h +0 -712
- data/dist/ice/cpp/include/IceSSL/SChannel.h +0 -72
- data/dist/ice/cpp/include/IceSSL/SecureTransport.h +0 -72
- data/dist/ice/cpp/include/IceUtil/Atomic.h +0 -179
- data/dist/ice/cpp/include/IceUtil/Cond.h +0 -317
- data/dist/ice/cpp/include/IceUtil/Config.h +0 -392
- data/dist/ice/cpp/include/IceUtil/ConsoleUtil.h +0 -92
- data/dist/ice/cpp/include/IceUtil/CountDownLatch.h +0 -45
- data/dist/ice/cpp/include/IceUtil/CtrlCHandler.h +0 -96
- data/dist/ice/cpp/include/IceUtil/DisableWarnings.h +0 -44
- data/dist/ice/cpp/include/IceUtil/Exception.h +0 -394
- data/dist/ice/cpp/include/IceUtil/FileUtil.h +0 -140
- data/dist/ice/cpp/include/IceUtil/Functional.h +0 -389
- data/dist/ice/cpp/include/IceUtil/Handle.h +0 -261
- data/dist/ice/cpp/include/IceUtil/IceUtil.h +0 -40
- data/dist/ice/cpp/include/IceUtil/InputUtil.h +0 -42
- data/dist/ice/cpp/include/IceUtil/Iterator.h +0 -31
- data/dist/ice/cpp/include/IceUtil/Lock.h +0 -128
- data/dist/ice/cpp/include/IceUtil/Monitor.h +0 -243
- data/dist/ice/cpp/include/IceUtil/Mutex.h +0 -349
- data/dist/ice/cpp/include/IceUtil/MutexProtocol.h +0 -23
- data/dist/ice/cpp/include/IceUtil/MutexPtrLock.h +0 -78
- data/dist/ice/cpp/include/IceUtil/MutexPtrTryLock.h +0 -77
- data/dist/ice/cpp/include/IceUtil/Optional.h +0 -433
- data/dist/ice/cpp/include/IceUtil/Options.h +0 -135
- data/dist/ice/cpp/include/IceUtil/OutputUtil.h +0 -383
- data/dist/ice/cpp/include/IceUtil/PushDisableWarnings.h +0 -33
- data/dist/ice/cpp/include/IceUtil/Random.h +0 -55
- data/dist/ice/cpp/include/IceUtil/RecMutex.h +0 -107
- data/dist/ice/cpp/include/IceUtil/ResourceConfig.h +0 -37
- data/dist/ice/cpp/include/IceUtil/ScannerConfig.h +0 -40
- data/dist/ice/cpp/include/IceUtil/ScopedArray.h +0 -98
- data/dist/ice/cpp/include/IceUtil/Shared.h +0 -127
- data/dist/ice/cpp/include/IceUtil/StopWatch.h +0 -49
- data/dist/ice/cpp/include/IceUtil/StringConverter.h +0 -195
- data/dist/ice/cpp/include/IceUtil/StringUtil.h +0 -97
- data/dist/ice/cpp/include/IceUtil/Thread.h +0 -160
- data/dist/ice/cpp/include/IceUtil/ThreadException.h +0 -94
- data/dist/ice/cpp/include/IceUtil/Time.h +0 -205
- data/dist/ice/cpp/include/IceUtil/Timer.h +0 -153
- data/dist/ice/cpp/include/IceUtil/UUID.h +0 -21
- data/dist/ice/cpp/include/generated/Glacier2/Metrics.h +0 -475
- data/dist/ice/cpp/include/generated/Glacier2/PermissionsVerifier.h +0 -1430
- data/dist/ice/cpp/include/generated/Glacier2/PermissionsVerifierF.h +0 -147
- data/dist/ice/cpp/include/generated/Glacier2/Router.h +0 -3260
- data/dist/ice/cpp/include/generated/Glacier2/RouterF.h +0 -125
- data/dist/ice/cpp/include/generated/Glacier2/SSLInfo.h +0 -223
- data/dist/ice/cpp/include/generated/Glacier2/Session.h +0 -5894
- data/dist/ice/cpp/include/generated/Ice/Communicator.h +0 -1162
- data/dist/ice/cpp/include/generated/Ice/CommunicatorF.h +0 -101
- data/dist/ice/cpp/include/generated/Ice/Connection.h +0 -1703
- data/dist/ice/cpp/include/generated/Ice/ConnectionF.h +0 -119
- data/dist/ice/cpp/include/generated/Ice/Current.h +0 -322
- data/dist/ice/cpp/include/generated/Ice/Endpoint.h +0 -979
- data/dist/ice/cpp/include/generated/Ice/EndpointF.h +0 -166
- data/dist/ice/cpp/include/generated/Ice/FacetMap.h +0 -80
- data/dist/ice/cpp/include/generated/Ice/ImplicitContext.h +0 -284
- data/dist/ice/cpp/include/generated/Ice/ImplicitContextF.h +0 -101
- data/dist/ice/cpp/include/generated/Ice/Instrumentation.h +0 -1203
- data/dist/ice/cpp/include/generated/Ice/InstrumentationF.h +0 -128
- data/dist/ice/cpp/include/generated/Ice/LocalException.h +0 -7437
- data/dist/ice/cpp/include/generated/Ice/LocatorF.h +0 -147
- data/dist/ice/cpp/include/generated/Ice/Logger.h +0 -237
- data/dist/ice/cpp/include/generated/Ice/LoggerF.h +0 -101
- data/dist/ice/cpp/include/generated/Ice/ObjectAdapter.h +0 -1181
- data/dist/ice/cpp/include/generated/Ice/ObjectAdapterF.h +0 -101
- data/dist/ice/cpp/include/generated/Ice/ObjectFactory.h +0 -203
- data/dist/ice/cpp/include/generated/Ice/Plugin.h +0 -318
- data/dist/ice/cpp/include/generated/Ice/PluginF.h +0 -110
- data/dist/ice/cpp/include/generated/Ice/ProcessF.h +0 -125
- data/dist/ice/cpp/include/generated/Ice/Properties.h +0 -452
- data/dist/ice/cpp/include/generated/Ice/PropertiesF.h +0 -134
- data/dist/ice/cpp/include/generated/Ice/RouterF.h +0 -125
- data/dist/ice/cpp/include/generated/Ice/ServantLocator.h +0 -305
- data/dist/ice/cpp/include/generated/Ice/ServantLocatorF.h +0 -101
- data/dist/ice/cpp/include/generated/Ice/ValueFactory.h +0 -330
- data/dist/ice/cpp/include/generated/IceBox/IceBox.h +0 -3269
- data/dist/ice/cpp/include/generated/IceGrid/Admin.h +0 -33773
- data/dist/ice/cpp/include/generated/IceGrid/Descriptor.h +0 -5254
- data/dist/ice/cpp/include/generated/IceGrid/Exception.h +0 -2834
- data/dist/ice/cpp/include/generated/IceGrid/FileParser.h +0 -824
- data/dist/ice/cpp/include/generated/IceGrid/PluginFacade.h +0 -635
- data/dist/ice/cpp/include/generated/IceGrid/Registry.h +0 -5089
- data/dist/ice/cpp/include/generated/IceGrid/Session.h +0 -2240
- data/dist/ice/cpp/include/generated/IceGrid/UserAccountMapper.h +0 -800
- data/dist/ice/cpp/include/generated/IcePatch2/FileInfo.h +0 -325
- data/dist/ice/cpp/include/generated/IcePatch2/FileServer.h +0 -2891
- data/dist/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +0 -228
- data/dist/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +0 -101
- data/dist/ice/cpp/include/generated/IceSSL/EndpointInfo.h +0 -186
- data/dist/ice/cpp/include/generated/IceStorm/IceStorm.h +0 -6627
- data/dist/ice/cpp/include/generated/IceStorm/Metrics.h +0 -665
- data/dist/ice/cpp/src/Ice/ACM.cpp +0 -380
- data/dist/ice/cpp/src/Ice/ACM.h +0 -119
- data/dist/ice/cpp/src/Ice/ACMF.h +0 -30
- data/dist/ice/cpp/src/Ice/Acceptor.cpp +0 -16
- data/dist/ice/cpp/src/Ice/Application.cpp +0 -661
- data/dist/ice/cpp/src/Ice/AsyncResult.cpp +0 -70
- data/dist/ice/cpp/src/Ice/CommunicatorI.cpp +0 -586
- data/dist/ice/cpp/src/Ice/CommunicatorI.h +0 -167
- data/dist/ice/cpp/src/Ice/Cond.cpp +0 -381
- data/dist/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +0 -73
- data/dist/ice/cpp/src/Ice/ConnectionRequestHandler.h +0 -41
- data/dist/ice/cpp/src/Ice/Connector.cpp +0 -16
- data/dist/ice/cpp/src/Ice/CountDownLatch.cpp +0 -171
- data/dist/ice/cpp/src/Ice/DispatchInterceptor.cpp +0 -37
- data/dist/ice/cpp/src/Ice/FactoryTable.cpp +0 -162
- data/dist/ice/cpp/src/Ice/FactoryTableInit.cpp +0 -88
- data/dist/ice/cpp/src/Ice/GCObject.cpp +0 -442
- data/dist/ice/cpp/src/Ice/IconvStringConverter.cpp +0 -51
- data/dist/ice/cpp/src/Ice/ImplicitContextI.cpp +0 -655
- data/dist/ice/cpp/src/Ice/ImplicitContextI.h +0 -48
- data/dist/ice/cpp/src/Ice/Incoming.cpp +0 -795
- data/dist/ice/cpp/src/Ice/IncomingAsync.cpp +0 -230
- data/dist/ice/cpp/src/Ice/IncomingRequest.h +0 -33
- data/dist/ice/cpp/src/Ice/LocalObject.cpp +0 -23
- data/dist/ice/cpp/src/Ice/MetricsObserverI.cpp +0 -8
- data/dist/ice/cpp/src/Ice/PropertiesAdminI.cpp +0 -265
- data/dist/ice/cpp/src/Ice/PropertiesAdminI.h +0 -64
- data/dist/ice/cpp/src/Ice/PropertiesI.cpp +0 -739
- data/dist/ice/cpp/src/Ice/PropertiesI.h +0 -70
- data/dist/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +0 -21
- data/dist/ice/cpp/src/Ice/ProxyFactory.cpp +0 -300
- data/dist/ice/cpp/src/Ice/ProxyFactory.h +0 -57
- data/dist/ice/cpp/src/Ice/RegisterPluginsInit.cpp +0 -38
- data/dist/ice/cpp/src/Ice/RegisterPluginsInit.h +0 -20
- data/dist/ice/cpp/src/Ice/ReplyStatus.h +0 -24
- data/dist/ice/cpp/src/Ice/RequestHandlerFactory.cpp +0 -77
- data/dist/ice/cpp/src/Ice/RequestHandlerFactory.h +0 -37
- data/dist/ice/cpp/src/Ice/ResponseHandler.cpp +0 -12
- data/dist/ice/cpp/src/Ice/ResponseHandler.h +0 -43
- data/dist/ice/cpp/src/Ice/SliceChecksums.cpp +0 -75
- data/dist/ice/cpp/src/Ice/StringConverterPlugin.cpp +0 -192
- data/dist/ice/cpp/src/Ice/StringUtil.h +0 -30
- data/dist/ice/cpp/src/Ice/Thread.cpp +0 -569
- data/dist/ice/cpp/src/Ice/ValueFactoryManagerI.cpp +0 -61
- data/dist/ice/cpp/src/Ice/ValueFactoryManagerI.h +0 -37
- data/dist/ice/cpp/src/Ice/VirtualShared.h +0 -38
- data/dist/ice/cpp/src/Ice/generated/Communicator.cpp +0 -79
- data/dist/ice/cpp/src/Ice/generated/CommunicatorF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/Connection.cpp +0 -155
- data/dist/ice/cpp/src/Ice/generated/ConnectionF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/Current.cpp +0 -62
- data/dist/ice/cpp/src/Ice/generated/Endpoint.cpp +0 -147
- data/dist/ice/cpp/src/Ice/generated/EndpointF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/FacetMap.cpp +0 -49
- data/dist/ice/cpp/src/Ice/generated/ImplicitContext.cpp +0 -75
- data/dist/ice/cpp/src/Ice/generated/ImplicitContextF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/Instrumentation.cpp +0 -188
- data/dist/ice/cpp/src/Ice/generated/InstrumentationF.cpp +0 -66
- data/dist/ice/cpp/src/Ice/generated/LocalException.cpp +0 -3262
- data/dist/ice/cpp/src/Ice/generated/LocatorF.cpp +0 -63
- data/dist/ice/cpp/src/Ice/generated/Logger.cpp +0 -73
- data/dist/ice/cpp/src/Ice/generated/LoggerF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/ObjectAdapter.cpp +0 -79
- data/dist/ice/cpp/src/Ice/generated/ObjectAdapterF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/ObjectFactory.cpp +0 -75
- data/dist/ice/cpp/src/Ice/generated/Plugin.cpp +0 -87
- data/dist/ice/cpp/src/Ice/generated/PluginF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/ProcessF.cpp +0 -63
- data/dist/ice/cpp/src/Ice/generated/Properties.cpp +0 -78
- data/dist/ice/cpp/src/Ice/generated/PropertiesF.cpp +0 -63
- data/dist/ice/cpp/src/Ice/generated/RouterF.cpp +0 -63
- data/dist/ice/cpp/src/Ice/generated/ServantLocator.cpp +0 -75
- data/dist/ice/cpp/src/Ice/generated/ServantLocatorF.cpp +0 -61
- data/dist/ice/cpp/src/Ice/generated/ValueFactory.cpp +0 -83
- data/dist/ice/cpp/src/Ice/ios/StreamAcceptor.cpp +0 -154
- data/dist/ice/cpp/src/Ice/ios/StreamAcceptor.h +0 -49
- data/dist/ice/cpp/src/Ice/ios/StreamConnector.cpp +0 -146
- data/dist/ice/cpp/src/Ice/ios/StreamConnector.h +0 -52
- data/dist/ice/cpp/src/Ice/ios/StreamEndpointI.cpp +0 -477
- data/dist/ice/cpp/src/Ice/ios/StreamEndpointI.h +0 -156
- data/dist/ice/cpp/src/Ice/ios/StreamTransceiver.cpp +0 -570
- data/dist/ice/cpp/src/Ice/ios/StreamTransceiver.h +0 -93
- data/dist/ice/cpp/src/IceDiscovery/generated/IceDiscovery/IceDiscovery.h +0 -1889
- data/dist/ice/cpp/src/IceDiscovery/generated/IceDiscovery.cpp +0 -915
- data/dist/ice/cpp/src/IceLocatorDiscovery/generated/IceLocatorDiscovery/IceLocatorDiscovery.h +0 -1197
- data/dist/ice/cpp/src/IceLocatorDiscovery/generated/IceLocatorDiscovery.cpp +0 -730
- data/dist/ice/cpp/src/IceSSL/AcceptorI.cpp +0 -105
- data/dist/ice/cpp/src/IceSSL/AcceptorI.h +0 -52
- data/dist/ice/cpp/src/IceSSL/CertificateI.cpp +0 -301
- data/dist/ice/cpp/src/IceSSL/CertificateI.h +0 -64
- data/dist/ice/cpp/src/IceSSL/ConnectorI.cpp +0 -102
- data/dist/ice/cpp/src/IceSSL/ConnectorI.h +0 -44
- data/dist/ice/cpp/src/IceSSL/EndpointI.cpp +0 -372
- data/dist/ice/cpp/src/IceSSL/EndpointI.h +0 -100
- data/dist/ice/cpp/src/IceSSL/Instance.cpp +0 -28
- data/dist/ice/cpp/src/IceSSL/Instance.h +0 -37
- data/dist/ice/cpp/src/IceSSL/InstanceF.h +0 -33
- data/dist/ice/cpp/src/IceSSL/OpenSSLCertificateI.cpp +0 -688
- data/dist/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +0 -1147
- data/dist/ice/cpp/src/IceSSL/OpenSSLEngine.h +0 -59
- data/dist/ice/cpp/src/IceSSL/OpenSSLEngineF.h +0 -27
- data/dist/ice/cpp/src/IceSSL/OpenSSLPluginI.cpp +0 -127
- data/dist/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +0 -1092
- data/dist/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +0 -90
- data/dist/ice/cpp/src/IceSSL/OpenSSLUtil.cpp +0 -288
- data/dist/ice/cpp/src/IceSSL/OpenSSLUtil.h +0 -58
- data/dist/ice/cpp/src/IceSSL/PluginI.cpp +0 -246
- data/dist/ice/cpp/src/IceSSL/PluginI.h +0 -67
- data/dist/ice/cpp/src/IceSSL/RFC2253.h +0 -62
- data/dist/ice/cpp/src/IceSSL/SChannelCertificateI.cpp +0 -721
- data/dist/ice/cpp/src/IceSSL/SChannelEngine.cpp +0 -1283
- data/dist/ice/cpp/src/IceSSL/SChannelEngine.h +0 -123
- data/dist/ice/cpp/src/IceSSL/SChannelEngineF.h +0 -31
- data/dist/ice/cpp/src/IceSSL/SChannelPluginI.cpp +0 -73
- data/dist/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +0 -1174
- data/dist/ice/cpp/src/IceSSL/SChannelTransceiverI.h +0 -133
- data/dist/ice/cpp/src/IceSSL/SSLEngine.cpp +0 -313
- data/dist/ice/cpp/src/IceSSL/SSLEngine.h +0 -100
- data/dist/ice/cpp/src/IceSSL/SSLEngineF.h +0 -21
- data/dist/ice/cpp/src/IceSSL/SecureTransportCertificateI.cpp +0 -999
- data/dist/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +0 -1308
- data/dist/ice/cpp/src/IceSSL/SecureTransportEngine.h +0 -59
- data/dist/ice/cpp/src/IceSSL/SecureTransportEngineF.h +0 -29
- data/dist/ice/cpp/src/IceSSL/SecureTransportPluginI.cpp +0 -75
- data/dist/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +0 -719
- data/dist/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +0 -92
- data/dist/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +0 -868
- data/dist/ice/cpp/src/IceSSL/SecureTransportUtil.h +0 -45
- data/dist/ice/cpp/src/IceSSL/TrustManager.cpp +0 -236
- data/dist/ice/cpp/src/IceSSL/TrustManager.h +0 -46
- data/dist/ice/cpp/src/IceSSL/TrustManagerF.h +0 -21
- data/dist/ice/cpp/src/IceSSL/Util.cpp +0 -192
- data/dist/ice/cpp/src/IceSSL/Util.h +0 -99
- data/dist/ice/cpp/src/IceSSL/generated/ConnectionInfo.cpp +0 -75
- data/dist/ice/cpp/src/IceSSL/generated/ConnectionInfoF.cpp +0 -61
- data/dist/ice/cpp/src/IceSSL/generated/EndpointInfo.cpp +0 -75
- data/dist/ice/cpp/src/IceUtil/ConvertUTF.cpp +0 -472
- data/dist/ice/cpp/src/IceUtil/ConvertUTF.h +0 -147
- data/dist/ice/cpp/src/IceUtil/CtrlCHandler.cpp +0 -259
- data/dist/ice/cpp/src/IceUtil/FileUtil.cpp +0 -471
- data/dist/ice/cpp/src/IceUtil/InputUtil.cpp +0 -36
- data/dist/ice/cpp/src/IceUtil/MutexProtocol.cpp +0 -19
- data/dist/ice/cpp/src/IceUtil/OutputUtil.cpp +0 -609
- data/dist/ice/cpp/src/IceUtil/Random.cpp +0 -180
- data/dist/ice/cpp/src/IceUtil/RecMutex.cpp +0 -238
- data/dist/ice/cpp/src/IceUtil/Shared.cpp +0 -71
- data/dist/ice/cpp/src/IceUtil/StringConverter.cpp +0 -690
- data/dist/ice/cpp/src/IceUtil/StringUtil.cpp +0 -1135
- data/dist/ice/cpp/src/IceUtil/ThreadException.cpp +0 -130
- data/dist/ice/cpp/src/IceUtil/Time.cpp +0 -307
- data/dist/ice/cpp/src/IceUtil/UUID.cpp +0 -165
- data/dist/ice/cpp/src/IceUtil/Unicode.cpp +0 -183
- data/dist/ice/cpp/src/IceUtil/Unicode.h +0 -43
- data/dist/ice/cpp/src/IceUtil/UtilException.cpp +0 -839
- data/dist/ice/cpp/src/Slice/CPlusPlusUtil.cpp +0 -1810
- data/dist/ice/cpp/src/Slice/CPlusPlusUtil.h +0 -72
- data/dist/ice/cpp/src/Slice/Checksum.cpp +0 -447
- data/dist/ice/cpp/src/Slice/Checksum.h +0 -21
- data/dist/ice/cpp/src/Slice/JavaUtil.cpp +0 -5183
- data/dist/ice/cpp/src/Slice/JavaUtil.h +0 -407
- data/dist/ice/cpp/src/Slice/MD5.cpp +0 -52
- data/dist/ice/cpp/src/Slice/MD5.h +0 -39
- data/dist/ice/cpp/src/Slice/MD5I.cpp +0 -393
- data/dist/ice/cpp/src/Slice/MD5I.h +0 -91
- data/dist/ice/cpp/src/Slice/PHPUtil.cpp +0 -157
- data/dist/ice/cpp/src/Slice/PHPUtil.h +0 -36
- data/dist/ice/cpp/src/Slice/Python.cpp +0 -830
- data/dist/ice/cpp/src/Slice/PythonUtil.cpp +0 -3439
- data/dist/ice/cpp/src/Slice/PythonUtil.h +0 -70
- data/dist/ice/cpp/src/Slice/Ruby.cpp +0 -350
- data/dist/ice/cpp/src/Slice/RubyUtil.cpp +0 -1571
- data/dist/ice/cpp/src/Slice/RubyUtil.h +0 -49
- data/dist/ice/slice/Glacier2/PermissionsVerifierF.ice +0 -30
- data/dist/ice/slice/Glacier2/RouterF.ice +0 -29
- data/dist/ice/slice/Ice/Communicator.ice +0 -676
- data/dist/ice/slice/Ice/CommunicatorF.ice +0 -31
- data/dist/ice/slice/Ice/Connection.ice +0 -516
- data/dist/ice/slice/Ice/ConnectionF.ice +0 -33
- data/dist/ice/slice/Ice/Current.ice +0 -170
- data/dist/ice/slice/Ice/Endpoint.ice +0 -291
- data/dist/ice/slice/Ice/EndpointF.ice +0 -43
- data/dist/ice/slice/Ice/FacetMap.ice +0 -36
- data/dist/ice/slice/Ice/ImplicitContext.ice +0 -119
- data/dist/ice/slice/Ice/ImplicitContextF.ice +0 -30
- data/dist/ice/slice/Ice/Instrumentation.ice +0 -509
- data/dist/ice/slice/Ice/InstrumentationF.ice +0 -38
- data/dist/ice/slice/Ice/LocalException.ice +0 -1040
- data/dist/ice/slice/Ice/LocatorF.ice +0 -32
- data/dist/ice/slice/Ice/Logger.ice +0 -99
- data/dist/ice/slice/Ice/LoggerF.ice +0 -31
- data/dist/ice/slice/Ice/ObjectAdapter.ice +0 -710
- data/dist/ice/slice/Ice/ObjectAdapterF.ice +0 -31
- data/dist/ice/slice/Ice/ObjectFactory.ice +0 -71
- data/dist/ice/slice/Ice/Plugin.ice +0 -131
- data/dist/ice/slice/Ice/PluginF.ice +0 -36
- data/dist/ice/slice/Ice/ProcessF.ice +0 -31
- data/dist/ice/slice/Ice/Properties.ice +0 -244
- data/dist/ice/slice/Ice/PropertiesF.ice +0 -32
- data/dist/ice/slice/Ice/RouterF.ice +0 -31
- data/dist/ice/slice/Ice/ServantLocator.ice +0 -136
- data/dist/ice/slice/Ice/ServantLocatorF.ice +0 -31
- data/dist/ice/slice/Ice/ValueFactory.ice +0 -133
- data/dist/ice/slice/IceBox/IceBox.ice +0 -216
- data/dist/ice/slice/IceGrid/PluginFacade.ice +0 -329
- data/dist/ice/slice/IcePatch2/FileInfo.ice +0 -85
- data/dist/ice/slice/IcePatch2/FileServer.ice +0 -191
- data/dist/lib/Glacier2/PermissionsVerifierF.rb +0 -30
- data/dist/lib/Glacier2/RouterF.rb +0 -25
- data/dist/lib/Ice/Communicator.rb +0 -87
- data/dist/lib/Ice/CommunicatorF.rb +0 -24
- data/dist/lib/Ice/Connection.rb +0 -413
- data/dist/lib/Ice/ConnectionF.rb +0 -32
- data/dist/lib/Ice/Current.rb +0 -141
- data/dist/lib/Ice/Endpoint.rb +0 -187
- data/dist/lib/Ice/EndpointF.rb +0 -48
- data/dist/lib/Ice/FacetMap.rb +0 -24
- data/dist/lib/Ice/ImplicitContext.rb +0 -26
- data/dist/lib/Ice/ImplicitContextF.rb +0 -24
- data/dist/lib/Ice/Instrumentation.rb +0 -169
- data/dist/lib/Ice/InstrumentationF.rb +0 -31
- data/dist/lib/Ice/LocalException.rb +0 -1031
- data/dist/lib/Ice/LocatorF.rb +0 -30
- data/dist/lib/Ice/Logger.rb +0 -24
- data/dist/lib/Ice/LoggerF.rb +0 -24
- data/dist/lib/Ice/ObjectAdapter.rb +0 -29
- data/dist/lib/Ice/ObjectAdapterF.rb +0 -24
- data/dist/lib/Ice/ObjectFactory.rb +0 -24
- data/dist/lib/Ice/Plugin.rb +0 -30
- data/dist/lib/Ice/PluginF.rb +0 -28
- data/dist/lib/Ice/ProcessF.rb +0 -25
- data/dist/lib/Ice/Properties.rb +0 -25
- data/dist/lib/Ice/PropertiesF.rb +0 -29
- data/dist/lib/Ice/RouterF.rb +0 -25
- data/dist/lib/Ice/ServantLocator.rb +0 -26
- data/dist/lib/Ice/ServantLocatorF.rb +0 -24
- data/dist/lib/Ice/ValueFactory.rb +0 -28
- data/dist/lib/IceBox/IceBox.rb +0 -164
- data/dist/lib/IceGrid/PluginFacade.rb +0 -35
- data/dist/lib/IcePatch2/FileInfo.rb +0 -115
- data/dist/lib/IcePatch2/FileServer.rb +0 -123
- data/dist/lib/IcePatch2.rb +0 -5
|
@@ -1,271 +1,295 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
#include
|
|
6
|
-
#include
|
|
7
|
-
#include
|
|
8
|
-
#include
|
|
9
|
-
#include
|
|
10
|
-
#include
|
|
11
|
-
#include
|
|
12
|
-
#include
|
|
13
|
-
#include
|
|
14
|
-
#include
|
|
15
|
-
#include
|
|
16
|
-
#include
|
|
17
|
-
#include
|
|
18
|
-
#include
|
|
19
|
-
#include
|
|
20
|
-
#include
|
|
21
|
-
#include
|
|
22
|
-
#include
|
|
23
|
-
#include
|
|
24
|
-
#include
|
|
25
|
-
#include
|
|
26
|
-
#include
|
|
27
|
-
#include
|
|
28
|
-
#include
|
|
29
|
-
#include
|
|
30
|
-
#include
|
|
31
|
-
#include
|
|
32
|
-
#include
|
|
33
|
-
#include
|
|
34
|
-
#include
|
|
35
|
-
#include
|
|
36
|
-
#include
|
|
37
|
-
#include
|
|
38
|
-
|
|
39
|
-
#include
|
|
40
|
-
|
|
41
|
-
#include <
|
|
42
|
-
|
|
43
|
-
#include <IceUtil/DisableWarnings.h>
|
|
44
|
-
#include <IceUtil/FileUtil.h>
|
|
45
|
-
#include <IceUtil/StringUtil.h>
|
|
46
|
-
#include <Ice/UUID.h>
|
|
47
|
-
#include <IceUtil/Mutex.h>
|
|
48
|
-
#include <IceUtil/MutexPtrLock.h>
|
|
49
|
-
#include <IceUtil/Atomic.h>
|
|
50
|
-
|
|
51
|
-
#include <stdio.h>
|
|
1
|
+
// Copyright (c) ZeroC, Inc.
|
|
2
|
+
|
|
3
|
+
#include "Instance.h"
|
|
4
|
+
#include "AddDefaultPluginFactories.h"
|
|
5
|
+
#include "CheckIdentity.h"
|
|
6
|
+
#include "ConnectionFactory.h"
|
|
7
|
+
#include "ConsoleUtil.h"
|
|
8
|
+
#include "DefaultsAndOverrides.h"
|
|
9
|
+
#include "EndpointFactoryManager.h"
|
|
10
|
+
#include "FileUtil.h"
|
|
11
|
+
#include "IPEndpointI.h" // For EndpointHostResolver
|
|
12
|
+
#include "Ice/Communicator.h"
|
|
13
|
+
#include "Ice/DefaultSliceLoader.h"
|
|
14
|
+
#include "Ice/Initialize.h"
|
|
15
|
+
#include "Ice/LocalExceptions.h"
|
|
16
|
+
#include "Ice/Locator.h"
|
|
17
|
+
#include "Ice/LoggerUtil.h"
|
|
18
|
+
#include "Ice/NativePropertiesAdmin.h"
|
|
19
|
+
#include "Ice/ObserverHelper.h"
|
|
20
|
+
#include "Ice/Properties.h"
|
|
21
|
+
#include "Ice/Router.h"
|
|
22
|
+
#include "Ice/StringUtil.h"
|
|
23
|
+
#include "Ice/UUID.h"
|
|
24
|
+
#include "InstrumentationI.h"
|
|
25
|
+
#include "LocatorInfo.h"
|
|
26
|
+
#include "LoggerAdminI.h"
|
|
27
|
+
#include "LoggerI.h"
|
|
28
|
+
#include "NetworkProxy.h"
|
|
29
|
+
#include "ObjectAdapterFactory.h"
|
|
30
|
+
#include "PluginManagerI.h"
|
|
31
|
+
#include "ReferenceFactory.h"
|
|
32
|
+
#include "RetryQueue.h"
|
|
33
|
+
#include "RouterInfo.h"
|
|
34
|
+
#include "SSL/SSLEngine.h"
|
|
35
|
+
#include "ThreadPool.h"
|
|
36
|
+
#include "TimeUtil.h"
|
|
37
|
+
#include "TraceLevels.h"
|
|
38
|
+
|
|
39
|
+
#include "DisableWarnings.h"
|
|
40
|
+
|
|
41
|
+
#include <cstdio>
|
|
52
42
|
#include <list>
|
|
43
|
+
#include <mutex>
|
|
44
|
+
#if defined(_WIN32)
|
|
45
|
+
# include "SSL/SchannelEngine.h"
|
|
46
|
+
#elif defined(__APPLE__)
|
|
47
|
+
# include "SSL/SecureTransportEngine.h"
|
|
48
|
+
#else
|
|
49
|
+
# include "SSL/OpenSSLEngine.h"
|
|
50
|
+
#endif
|
|
53
51
|
|
|
54
52
|
#ifdef __APPLE__
|
|
55
|
-
#
|
|
53
|
+
# include "OSLogLoggerI.h"
|
|
54
|
+
# if TARGET_OS_IPHONE == 0
|
|
55
|
+
# include <libproc.h> // For proc_pidpath
|
|
56
|
+
# endif
|
|
56
57
|
#endif
|
|
57
58
|
|
|
58
59
|
#ifndef _WIN32
|
|
59
|
-
#
|
|
60
|
-
#
|
|
60
|
+
# if !defined(__APPLE__) || TARGET_OS_IPHONE == 0
|
|
61
|
+
# include "SysLoggerI.h"
|
|
62
|
+
# endif
|
|
61
63
|
|
|
62
|
-
#
|
|
63
|
-
|
|
64
|
-
#
|
|
65
|
-
#
|
|
64
|
+
# include "SystemdJournalI.h"
|
|
65
|
+
|
|
66
|
+
# include <csignal>
|
|
67
|
+
# include <pwd.h>
|
|
68
|
+
# include <sys/types.h>
|
|
69
|
+
# include <syslog.h>
|
|
66
70
|
#endif
|
|
67
71
|
|
|
68
|
-
#if defined(__linux__) || defined(
|
|
69
|
-
#
|
|
72
|
+
#if defined(__linux__) || defined(__GLIBC__)
|
|
73
|
+
# include <grp.h> // for initgroups
|
|
70
74
|
#endif
|
|
71
75
|
|
|
72
76
|
using namespace std;
|
|
73
77
|
using namespace Ice;
|
|
74
78
|
using namespace IceInternal;
|
|
75
79
|
|
|
76
|
-
namespace IceUtilInternal
|
|
77
|
-
{
|
|
78
|
-
|
|
79
|
-
extern bool nullHandleAbort;
|
|
80
|
-
extern bool printStackTraces;
|
|
81
|
-
|
|
82
|
-
};
|
|
83
|
-
|
|
84
80
|
namespace
|
|
85
81
|
{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
std::list<IceInternal::Instance*>* instanceList = 0;
|
|
82
|
+
mutex staticMutex;
|
|
83
|
+
bool oneOffDone = false;
|
|
84
|
+
std::list<IceInternal::Instance*>* instanceList = nullptr;
|
|
90
85
|
|
|
91
86
|
#ifndef _WIN32
|
|
92
|
-
struct sigaction oldAction;
|
|
87
|
+
struct sigaction oldAction;
|
|
93
88
|
#endif
|
|
94
|
-
bool printProcessIdDone = false;
|
|
95
|
-
string identForOpenlog;
|
|
89
|
+
bool printProcessIdDone = false;
|
|
90
|
+
string identForOpenlog;
|
|
96
91
|
|
|
97
|
-
//
|
|
98
|
-
// Should be called with staticMutex locked
|
|
99
|
-
//
|
|
100
|
-
size_t instanceCount()
|
|
101
|
-
{
|
|
102
|
-
if(instanceList == 0)
|
|
92
|
+
//
|
|
93
|
+
// Should be called with staticMutex locked
|
|
94
|
+
//
|
|
95
|
+
size_t instanceCount()
|
|
103
96
|
{
|
|
104
|
-
|
|
97
|
+
if (instanceList == nullptr)
|
|
98
|
+
{
|
|
99
|
+
return 0;
|
|
100
|
+
}
|
|
101
|
+
else
|
|
102
|
+
{
|
|
103
|
+
return instanceList->size();
|
|
104
|
+
}
|
|
105
105
|
}
|
|
106
|
-
|
|
106
|
+
|
|
107
|
+
string getProgramName()
|
|
107
108
|
{
|
|
108
|
-
|
|
109
|
+
string programName;
|
|
110
|
+
#if defined(__APPLE__) && TARGET_OS_IPHONE == 0
|
|
111
|
+
vector<char> buffer(PATH_MAX);
|
|
112
|
+
int len = proc_pidpath(getpid(), buffer.data(), static_cast<uint32_t>(buffer.size()));
|
|
113
|
+
if (len > 0)
|
|
114
|
+
{
|
|
115
|
+
programName = string{buffer.data(), static_cast<size_t>(len)};
|
|
116
|
+
}
|
|
117
|
+
#elif defined(__linux__)
|
|
118
|
+
vector<char> buffer(PATH_MAX);
|
|
119
|
+
ssize_t len = readlink("/proc/self/exe", buffer.data(), buffer.size());
|
|
120
|
+
if (len > 0)
|
|
121
|
+
{
|
|
122
|
+
programName = string{buffer.data(), static_cast<size_t>(len)};
|
|
123
|
+
}
|
|
124
|
+
#elif defined(_WIN32)
|
|
125
|
+
vector<char> buffer(MAX_PATH);
|
|
126
|
+
DWORD len = GetModuleFileNameA(NULL, buffer.data(), static_cast<DWORD>(buffer.size()));
|
|
127
|
+
if (len > 0)
|
|
128
|
+
{
|
|
129
|
+
programName = string{buffer.data(), static_cast<size_t>(len)};
|
|
130
|
+
}
|
|
131
|
+
#endif
|
|
132
|
+
size_t pos = programName.find_last_of("/\\");
|
|
133
|
+
if (pos != string::npos)
|
|
134
|
+
{
|
|
135
|
+
programName = programName.substr(pos + 1);
|
|
136
|
+
}
|
|
137
|
+
return programName;
|
|
109
138
|
}
|
|
110
|
-
}
|
|
111
139
|
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
public:
|
|
115
|
-
|
|
116
|
-
Init()
|
|
140
|
+
void checkPrintStackTraces(const InitializationData& initData) noexcept
|
|
117
141
|
{
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
//
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
142
|
+
#ifdef NDEBUG
|
|
143
|
+
// Release build
|
|
144
|
+
if (initData.properties->getIcePropertyAsInt("Ice.PrintStackTraces") > 0)
|
|
145
|
+
#else
|
|
146
|
+
// Debug build
|
|
147
|
+
if (initData.properties->getPropertyAsIntWithDefault("Ice.PrintStackTraces", 1) > 0)
|
|
148
|
+
#endif
|
|
149
|
+
{
|
|
150
|
+
try
|
|
151
|
+
{
|
|
152
|
+
LocalException::ice_enableStackTraceCollection();
|
|
153
|
+
}
|
|
154
|
+
catch (const std::exception& ex)
|
|
155
|
+
{
|
|
156
|
+
Warning out(initData.logger);
|
|
157
|
+
out << "Cannot enable stack trace collection:\n" << ex;
|
|
158
|
+
out << "\nYou can turn off this warning by setting Ice.PrintStackTraces=0";
|
|
159
|
+
}
|
|
160
|
+
}
|
|
126
161
|
}
|
|
127
162
|
|
|
128
|
-
|
|
163
|
+
class Init
|
|
129
164
|
{
|
|
165
|
+
public:
|
|
166
|
+
Init() noexcept
|
|
130
167
|
{
|
|
131
|
-
|
|
132
|
-
|
|
168
|
+
// Although probably not necessary here, we consistently lock
|
|
169
|
+
// staticMutex before accessing instanceList.
|
|
170
|
+
lock_guard lock(staticMutex);
|
|
171
|
+
instanceList = new std::list<IceInternal::Instance*>;
|
|
172
|
+
}
|
|
133
173
|
|
|
134
|
-
|
|
135
|
-
|
|
174
|
+
~Init()
|
|
175
|
+
{
|
|
136
176
|
{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
notDestroyedCount++;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
177
|
+
lock_guard lock(staticMutex);
|
|
178
|
+
int notDestroyedCount = 0;
|
|
142
179
|
|
|
143
|
-
|
|
144
|
-
{
|
|
145
|
-
consoleErr << "!! " << IceUtil::Time::now().toDateTime() << " error: ";
|
|
146
|
-
if(notDestroyedCount == 1)
|
|
180
|
+
for (const auto& p : *instanceList)
|
|
147
181
|
{
|
|
148
|
-
|
|
182
|
+
if (!p->destroyed())
|
|
183
|
+
{
|
|
184
|
+
notDestroyedCount++;
|
|
185
|
+
}
|
|
149
186
|
}
|
|
150
|
-
|
|
187
|
+
|
|
188
|
+
if (notDestroyedCount > 0)
|
|
151
189
|
{
|
|
152
|
-
consoleErr <<
|
|
190
|
+
consoleErr << "!! " << timePointToDateTimeString(chrono::system_clock::now()) << " error: ";
|
|
191
|
+
if (notDestroyedCount == 1)
|
|
192
|
+
{
|
|
193
|
+
consoleErr << "communicator ";
|
|
194
|
+
}
|
|
195
|
+
else
|
|
196
|
+
{
|
|
197
|
+
consoleErr << notDestroyedCount << " communicators ";
|
|
198
|
+
}
|
|
199
|
+
consoleErr << "not destroyed during global destruction.";
|
|
153
200
|
}
|
|
154
|
-
consoleErr << "not destroyed during global destruction.";
|
|
155
|
-
}
|
|
156
201
|
|
|
157
|
-
|
|
158
|
-
|
|
202
|
+
delete instanceList;
|
|
203
|
+
instanceList = nullptr;
|
|
204
|
+
}
|
|
159
205
|
}
|
|
160
|
-
|
|
161
|
-
staticMutex = 0;
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
Init init;
|
|
166
|
-
|
|
167
|
-
//
|
|
168
|
-
// Static initializer to register plugins.
|
|
169
|
-
//
|
|
170
|
-
IceInternal::RegisterPluginsInit initPlugins;
|
|
206
|
+
};
|
|
171
207
|
|
|
208
|
+
Init init;
|
|
172
209
|
}
|
|
173
210
|
|
|
174
211
|
namespace IceInternal // Required because ObserverUpdaterI is a friend of Instance
|
|
175
212
|
{
|
|
176
|
-
|
|
177
|
-
class ObserverUpdaterI : public Ice::Instrumentation::ObserverUpdater
|
|
178
|
-
{
|
|
179
|
-
public:
|
|
180
|
-
|
|
181
|
-
ObserverUpdaterI(const InstancePtr&);
|
|
182
|
-
|
|
183
|
-
virtual void updateConnectionObservers();
|
|
184
|
-
virtual void updateThreadObservers();
|
|
185
|
-
|
|
186
|
-
private:
|
|
187
|
-
|
|
188
|
-
const InstancePtr _instance;
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
//
|
|
192
|
-
// Timer specialization which supports the thread observer
|
|
193
|
-
//
|
|
194
|
-
class Timer : public IceUtil::Timer
|
|
195
|
-
{
|
|
196
|
-
public:
|
|
197
|
-
|
|
198
|
-
Timer(int priority) :
|
|
199
|
-
IceUtil::Timer(priority),
|
|
200
|
-
_hasObserver(0)
|
|
201
|
-
{
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
Timer() :
|
|
205
|
-
_hasObserver(0)
|
|
213
|
+
class ObserverUpdaterI : public Ice::Instrumentation::ObserverUpdater
|
|
206
214
|
{
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
void updateObserver(const Ice::Instrumentation::CommunicatorObserverPtr&);
|
|
215
|
+
public:
|
|
216
|
+
ObserverUpdaterI(InstancePtr);
|
|
210
217
|
|
|
211
|
-
|
|
218
|
+
void updateConnectionObservers() override;
|
|
219
|
+
void updateThreadObservers() override;
|
|
212
220
|
|
|
213
|
-
|
|
221
|
+
private:
|
|
222
|
+
const InstancePtr _instance;
|
|
223
|
+
};
|
|
214
224
|
|
|
215
|
-
IceUtil::Mutex _mutex;
|
|
216
225
|
//
|
|
217
|
-
//
|
|
218
|
-
// available.
|
|
226
|
+
// Timer specialization which supports the thread observer
|
|
219
227
|
//
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
228
|
+
class ThreadObserverTimer final : public IceInternal::Timer
|
|
229
|
+
{
|
|
230
|
+
public:
|
|
231
|
+
ThreadObserverTimer() : _hasObserver(false) {}
|
|
232
|
+
|
|
233
|
+
void updateObserver(const Ice::Instrumentation::CommunicatorObserverPtr&);
|
|
223
234
|
|
|
235
|
+
private:
|
|
236
|
+
void runTimerTask(const TimerTaskPtr&) final;
|
|
237
|
+
|
|
238
|
+
std::mutex _mutex;
|
|
239
|
+
std::atomic<bool> _hasObserver;
|
|
240
|
+
ObserverHelperT<Ice::Instrumentation::ThreadObserver> _observer;
|
|
241
|
+
};
|
|
224
242
|
}
|
|
225
243
|
|
|
226
244
|
void
|
|
227
|
-
|
|
245
|
+
ThreadObserverTimer::updateObserver(const Ice::Instrumentation::CommunicatorObserverPtr& obsv)
|
|
228
246
|
{
|
|
229
|
-
|
|
247
|
+
lock_guard lock(_mutex);
|
|
230
248
|
assert(obsv);
|
|
231
|
-
_observer.attach(obsv->getThreadObserver(
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
249
|
+
_observer.attach(obsv->getThreadObserver(
|
|
250
|
+
"Communicator",
|
|
251
|
+
"Ice.Timer",
|
|
252
|
+
Instrumentation::ThreadState::ThreadStateIdle,
|
|
253
|
+
_observer.get()));
|
|
254
|
+
_hasObserver.exchange(_observer);
|
|
236
255
|
}
|
|
237
256
|
|
|
238
257
|
void
|
|
239
|
-
|
|
258
|
+
ThreadObserverTimer::runTimerTask(const TimerTaskPtr& task)
|
|
240
259
|
{
|
|
241
|
-
if(_hasObserver
|
|
260
|
+
if (_hasObserver)
|
|
242
261
|
{
|
|
243
262
|
Ice::Instrumentation::ThreadObserverPtr threadObserver;
|
|
244
263
|
{
|
|
245
|
-
|
|
264
|
+
lock_guard lock(_mutex);
|
|
246
265
|
threadObserver = _observer.get();
|
|
247
266
|
}
|
|
248
|
-
if(threadObserver)
|
|
267
|
+
if (threadObserver)
|
|
249
268
|
{
|
|
250
|
-
threadObserver->stateChanged(
|
|
251
|
-
|
|
269
|
+
threadObserver->stateChanged(
|
|
270
|
+
Instrumentation::ThreadState::ThreadStateIdle,
|
|
271
|
+
Instrumentation::ThreadState::ThreadStateInUseForOther);
|
|
252
272
|
}
|
|
253
273
|
try
|
|
254
274
|
{
|
|
255
275
|
task->runTimerTask();
|
|
256
276
|
}
|
|
257
|
-
catch(...)
|
|
277
|
+
catch (...)
|
|
258
278
|
{
|
|
259
|
-
if(threadObserver)
|
|
279
|
+
if (threadObserver)
|
|
260
280
|
{
|
|
261
|
-
threadObserver->stateChanged(
|
|
262
|
-
|
|
281
|
+
threadObserver->stateChanged(
|
|
282
|
+
Instrumentation::ThreadState::ThreadStateInUseForOther,
|
|
283
|
+
Instrumentation::ThreadState::ThreadStateIdle);
|
|
263
284
|
}
|
|
285
|
+
throw;
|
|
264
286
|
}
|
|
265
|
-
|
|
287
|
+
|
|
288
|
+
if (threadObserver)
|
|
266
289
|
{
|
|
267
|
-
threadObserver->stateChanged(
|
|
268
|
-
|
|
290
|
+
threadObserver->stateChanged(
|
|
291
|
+
Instrumentation::ThreadState::ThreadStateInUseForOther,
|
|
292
|
+
Instrumentation::ThreadState::ThreadStateIdle);
|
|
269
293
|
}
|
|
270
294
|
}
|
|
271
295
|
else
|
|
@@ -274,11 +298,7 @@ Timer::runTimerTask(const IceUtil::TimerTaskPtr& task)
|
|
|
274
298
|
}
|
|
275
299
|
}
|
|
276
300
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
IceInternal::ObserverUpdaterI::ObserverUpdaterI(const InstancePtr& instance) : _instance(instance)
|
|
280
|
-
{
|
|
281
|
-
}
|
|
301
|
+
IceInternal::ObserverUpdaterI::ObserverUpdaterI(InstancePtr instance) : _instance(std::move(instance)) {}
|
|
282
302
|
|
|
283
303
|
void
|
|
284
304
|
IceInternal::ObserverUpdaterI::updateConnectionObservers()
|
|
@@ -295,7 +315,7 @@ IceInternal::ObserverUpdaterI::updateThreadObservers()
|
|
|
295
315
|
bool
|
|
296
316
|
IceInternal::Instance::destroyed() const
|
|
297
317
|
{
|
|
298
|
-
|
|
318
|
+
lock_guard lock(_mutex);
|
|
299
319
|
return _state == StateDestroyed;
|
|
300
320
|
}
|
|
301
321
|
|
|
@@ -318,9 +338,9 @@ IceInternal::Instance::defaultsAndOverrides() const
|
|
|
318
338
|
RouterManagerPtr
|
|
319
339
|
IceInternal::Instance::routerManager() const
|
|
320
340
|
{
|
|
321
|
-
|
|
341
|
+
lock_guard lock(_mutex);
|
|
322
342
|
|
|
323
|
-
if(_state == StateDestroyed)
|
|
343
|
+
if (_state == StateDestroyed)
|
|
324
344
|
{
|
|
325
345
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
326
346
|
}
|
|
@@ -332,9 +352,9 @@ IceInternal::Instance::routerManager() const
|
|
|
332
352
|
LocatorManagerPtr
|
|
333
353
|
IceInternal::Instance::locatorManager() const
|
|
334
354
|
{
|
|
335
|
-
|
|
355
|
+
lock_guard lock(_mutex);
|
|
336
356
|
|
|
337
|
-
if(_state == StateDestroyed)
|
|
357
|
+
if (_state == StateDestroyed)
|
|
338
358
|
{
|
|
339
359
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
340
360
|
}
|
|
@@ -346,9 +366,9 @@ IceInternal::Instance::locatorManager() const
|
|
|
346
366
|
ReferenceFactoryPtr
|
|
347
367
|
IceInternal::Instance::referenceFactory() const
|
|
348
368
|
{
|
|
349
|
-
|
|
369
|
+
lock_guard lock(_mutex);
|
|
350
370
|
|
|
351
|
-
if(_state == StateDestroyed)
|
|
371
|
+
if (_state == StateDestroyed)
|
|
352
372
|
{
|
|
353
373
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
354
374
|
}
|
|
@@ -357,40 +377,12 @@ IceInternal::Instance::referenceFactory() const
|
|
|
357
377
|
return _referenceFactory;
|
|
358
378
|
}
|
|
359
379
|
|
|
360
|
-
RequestHandlerFactoryPtr
|
|
361
|
-
IceInternal::Instance::requestHandlerFactory() const
|
|
362
|
-
{
|
|
363
|
-
Lock sync(*this);
|
|
364
|
-
|
|
365
|
-
if(_state == StateDestroyed)
|
|
366
|
-
{
|
|
367
|
-
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
assert(_requestHandlerFactory);
|
|
371
|
-
return _requestHandlerFactory;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
ProxyFactoryPtr
|
|
375
|
-
IceInternal::Instance::proxyFactory() const
|
|
376
|
-
{
|
|
377
|
-
Lock sync(*this);
|
|
378
|
-
|
|
379
|
-
if(_state == StateDestroyed)
|
|
380
|
-
{
|
|
381
|
-
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
assert(_proxyFactory);
|
|
385
|
-
return _proxyFactory;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
380
|
OutgoingConnectionFactoryPtr
|
|
389
381
|
IceInternal::Instance::outgoingConnectionFactory() const
|
|
390
382
|
{
|
|
391
|
-
|
|
383
|
+
lock_guard lock(_mutex);
|
|
392
384
|
|
|
393
|
-
if(_state == StateDestroyed)
|
|
385
|
+
if (_state == StateDestroyed)
|
|
394
386
|
{
|
|
395
387
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
396
388
|
}
|
|
@@ -402,9 +394,9 @@ IceInternal::Instance::outgoingConnectionFactory() const
|
|
|
402
394
|
ObjectAdapterFactoryPtr
|
|
403
395
|
IceInternal::Instance::objectAdapterFactory() const
|
|
404
396
|
{
|
|
405
|
-
|
|
397
|
+
lock_guard lock(_mutex);
|
|
406
398
|
|
|
407
|
-
if(_state == StateDestroyed)
|
|
399
|
+
if (_state == StateDestroyed)
|
|
408
400
|
{
|
|
409
401
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
410
402
|
}
|
|
@@ -434,9 +426,9 @@ IceInternal::Instance::networkProxy() const
|
|
|
434
426
|
ThreadPoolPtr
|
|
435
427
|
IceInternal::Instance::clientThreadPool()
|
|
436
428
|
{
|
|
437
|
-
|
|
429
|
+
lock_guard lock(_mutex);
|
|
438
430
|
|
|
439
|
-
if(_state == StateDestroyed)
|
|
431
|
+
if (_state == StateDestroyed)
|
|
440
432
|
{
|
|
441
433
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
442
434
|
}
|
|
@@ -448,21 +440,21 @@ IceInternal::Instance::clientThreadPool()
|
|
|
448
440
|
ThreadPoolPtr
|
|
449
441
|
IceInternal::Instance::serverThreadPool()
|
|
450
442
|
{
|
|
451
|
-
|
|
443
|
+
lock_guard lock(_mutex);
|
|
452
444
|
|
|
453
|
-
if(_state == StateDestroyed)
|
|
445
|
+
if (_state == StateDestroyed)
|
|
454
446
|
{
|
|
455
447
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
456
448
|
}
|
|
457
449
|
|
|
458
|
-
if(!_serverThreadPool) // Lazy initialization.
|
|
450
|
+
if (!_serverThreadPool) // Lazy initialization.
|
|
459
451
|
{
|
|
460
|
-
if(_state == StateDestroyInProgress)
|
|
452
|
+
if (_state == StateDestroyInProgress)
|
|
461
453
|
{
|
|
462
454
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
463
455
|
}
|
|
464
|
-
int timeout = _initData.properties->
|
|
465
|
-
_serverThreadPool =
|
|
456
|
+
int timeout = _initData.properties->getIcePropertyAsInt("Ice.ServerIdleTime");
|
|
457
|
+
_serverThreadPool = ThreadPool::create(shared_from_this(), "Ice.ThreadPool.Server", timeout);
|
|
466
458
|
}
|
|
467
459
|
|
|
468
460
|
return _serverThreadPool;
|
|
@@ -471,9 +463,9 @@ IceInternal::Instance::serverThreadPool()
|
|
|
471
463
|
EndpointHostResolverPtr
|
|
472
464
|
IceInternal::Instance::endpointHostResolver()
|
|
473
465
|
{
|
|
474
|
-
|
|
466
|
+
lock_guard lock(_mutex);
|
|
475
467
|
|
|
476
|
-
if(_state == StateDestroyed)
|
|
468
|
+
if (_state == StateDestroyed)
|
|
477
469
|
{
|
|
478
470
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
479
471
|
}
|
|
@@ -485,9 +477,9 @@ IceInternal::Instance::endpointHostResolver()
|
|
|
485
477
|
RetryQueuePtr
|
|
486
478
|
IceInternal::Instance::retryQueue()
|
|
487
479
|
{
|
|
488
|
-
|
|
480
|
+
lock_guard lock(_mutex);
|
|
489
481
|
|
|
490
|
-
if(_state == StateDestroyed)
|
|
482
|
+
if (_state == StateDestroyed)
|
|
491
483
|
{
|
|
492
484
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
493
485
|
}
|
|
@@ -496,12 +488,12 @@ IceInternal::Instance::retryQueue()
|
|
|
496
488
|
return _retryQueue;
|
|
497
489
|
}
|
|
498
490
|
|
|
499
|
-
|
|
491
|
+
IceInternal::TimerPtr
|
|
500
492
|
IceInternal::Instance::timer()
|
|
501
493
|
{
|
|
502
|
-
|
|
494
|
+
lock_guard lock(_mutex);
|
|
503
495
|
|
|
504
|
-
if(_state == StateDestroyed)
|
|
496
|
+
if (_state == StateDestroyed)
|
|
505
497
|
{
|
|
506
498
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
507
499
|
}
|
|
@@ -512,9 +504,9 @@ IceInternal::Instance::timer()
|
|
|
512
504
|
EndpointFactoryManagerPtr
|
|
513
505
|
IceInternal::Instance::endpointFactoryManager() const
|
|
514
506
|
{
|
|
515
|
-
|
|
507
|
+
lock_guard lock(_mutex);
|
|
516
508
|
|
|
517
|
-
if(_state == StateDestroyed)
|
|
509
|
+
if (_state == StateDestroyed)
|
|
518
510
|
{
|
|
519
511
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
520
512
|
}
|
|
@@ -523,26 +515,12 @@ IceInternal::Instance::endpointFactoryManager() const
|
|
|
523
515
|
return _endpointFactoryManager;
|
|
524
516
|
}
|
|
525
517
|
|
|
526
|
-
DynamicLibraryListPtr
|
|
527
|
-
IceInternal::Instance::dynamicLibraryList() const
|
|
528
|
-
{
|
|
529
|
-
Lock sync(*this);
|
|
530
|
-
|
|
531
|
-
if(_state == StateDestroyed)
|
|
532
|
-
{
|
|
533
|
-
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
assert(_dynamicLibraryList);
|
|
537
|
-
return _dynamicLibraryList;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
518
|
PluginManagerPtr
|
|
541
519
|
IceInternal::Instance::pluginManager() const
|
|
542
520
|
{
|
|
543
|
-
|
|
521
|
+
lock_guard lock(_mutex);
|
|
544
522
|
|
|
545
|
-
if(_state == StateDestroyed)
|
|
523
|
+
if (_state == StateDestroyed)
|
|
546
524
|
{
|
|
547
525
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
548
526
|
}
|
|
@@ -551,53 +529,73 @@ IceInternal::Instance::pluginManager() const
|
|
|
551
529
|
return _pluginManager;
|
|
552
530
|
}
|
|
553
531
|
|
|
554
|
-
|
|
555
|
-
IceInternal::Instance::
|
|
532
|
+
ConnectionOptions
|
|
533
|
+
IceInternal::Instance::serverConnectionOptions(const string& adapterName) const
|
|
556
534
|
{
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
}
|
|
535
|
+
assert(!adapterName.empty());
|
|
536
|
+
string propertyPrefix = adapterName + ".Connection";
|
|
560
537
|
|
|
561
|
-
const
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
538
|
+
const PropertiesPtr& properties = _initData.properties;
|
|
539
|
+
|
|
540
|
+
ConnectionOptions connectionOptions;
|
|
541
|
+
|
|
542
|
+
connectionOptions.connectTimeout = chrono::seconds(properties->getPropertyAsIntWithDefault(
|
|
543
|
+
propertyPrefix + ".ConnectTimeout",
|
|
544
|
+
static_cast<int>(_serverConnectionOptions.connectTimeout.count())));
|
|
545
|
+
|
|
546
|
+
connectionOptions.closeTimeout = chrono::seconds(properties->getPropertyAsIntWithDefault(
|
|
547
|
+
propertyPrefix + ".CloseTimeout",
|
|
548
|
+
static_cast<int>(_serverConnectionOptions.closeTimeout.count())));
|
|
549
|
+
|
|
550
|
+
connectionOptions.idleTimeout = chrono::seconds(properties->getPropertyAsIntWithDefault(
|
|
551
|
+
propertyPrefix + ".IdleTimeout",
|
|
552
|
+
static_cast<int>(_serverConnectionOptions.idleTimeout.count())));
|
|
553
|
+
|
|
554
|
+
connectionOptions.enableIdleCheck = properties->getPropertyAsIntWithDefault(
|
|
555
|
+
propertyPrefix + ".EnableIdleCheck",
|
|
556
|
+
_serverConnectionOptions.enableIdleCheck ? 1 : 0) > 0;
|
|
557
|
+
|
|
558
|
+
connectionOptions.inactivityTimeout = chrono::seconds(properties->getPropertyAsIntWithDefault(
|
|
559
|
+
propertyPrefix + ".InactivityTimeout",
|
|
560
|
+
static_cast<int>(_serverConnectionOptions.inactivityTimeout.count())));
|
|
561
|
+
|
|
562
|
+
connectionOptions.maxDispatches = properties->getPropertyAsIntWithDefault(
|
|
563
|
+
propertyPrefix + ".MaxDispatches",
|
|
564
|
+
_serverConnectionOptions.maxDispatches);
|
|
565
|
+
|
|
566
|
+
return connectionOptions;
|
|
566
567
|
}
|
|
567
568
|
|
|
568
|
-
Ice::
|
|
569
|
+
Ice::ObjectPrx
|
|
569
570
|
IceInternal::Instance::createAdmin(const ObjectAdapterPtr& adminAdapter, const Identity& adminIdentity)
|
|
570
571
|
{
|
|
571
572
|
ObjectAdapterPtr adapter = adminAdapter;
|
|
572
573
|
bool createAdapter = !adminAdapter;
|
|
573
574
|
|
|
574
|
-
|
|
575
|
+
unique_lock lock(_mutex);
|
|
575
576
|
|
|
576
|
-
if(_state == StateDestroyed)
|
|
577
|
+
if (_state == StateDestroyed)
|
|
577
578
|
{
|
|
578
579
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
579
580
|
}
|
|
580
581
|
|
|
581
|
-
|
|
582
|
-
{
|
|
583
|
-
throw Ice::IllegalIdentityException(__FILE__, __LINE__, adminIdentity);
|
|
584
|
-
}
|
|
582
|
+
checkIdentity(adminIdentity, __FILE__, __LINE__);
|
|
585
583
|
|
|
586
|
-
if(_adminAdapter)
|
|
584
|
+
if (_adminAdapter)
|
|
587
585
|
{
|
|
588
586
|
throw InitializationException(__FILE__, __LINE__, "Admin already created");
|
|
589
587
|
}
|
|
590
588
|
|
|
591
|
-
if(!_adminEnabled)
|
|
589
|
+
if (!_adminEnabled)
|
|
592
590
|
{
|
|
593
591
|
throw InitializationException(__FILE__, __LINE__, "Admin is disabled");
|
|
594
592
|
}
|
|
595
593
|
|
|
596
|
-
if(createAdapter)
|
|
594
|
+
if (createAdapter)
|
|
597
595
|
{
|
|
598
|
-
if(_initData.properties->
|
|
596
|
+
if (_initData.properties->getIceProperty("Ice.Admin.Endpoints") != "")
|
|
599
597
|
{
|
|
600
|
-
adapter = _objectAdapterFactory->createObjectAdapter("Ice.Admin",
|
|
598
|
+
adapter = _objectAdapterFactory->createObjectAdapter("Ice.Admin", nullopt, nullopt);
|
|
601
599
|
}
|
|
602
600
|
else
|
|
603
601
|
{
|
|
@@ -608,15 +606,15 @@ IceInternal::Instance::createAdmin(const ObjectAdapterPtr& adminAdapter, const I
|
|
|
608
606
|
_adminIdentity = adminIdentity;
|
|
609
607
|
_adminAdapter = adapter;
|
|
610
608
|
addAllAdminFacets();
|
|
611
|
-
|
|
609
|
+
lock.unlock();
|
|
612
610
|
|
|
613
|
-
if(createAdapter)
|
|
611
|
+
if (createAdapter)
|
|
614
612
|
{
|
|
615
613
|
try
|
|
616
614
|
{
|
|
617
615
|
adapter->activate();
|
|
618
616
|
}
|
|
619
|
-
catch(...)
|
|
617
|
+
catch (...)
|
|
620
618
|
{
|
|
621
619
|
//
|
|
622
620
|
// We clean it up, even through this error is not recoverable
|
|
@@ -624,8 +622,8 @@ IceInternal::Instance::createAdmin(const ObjectAdapterPtr& adminAdapter, const I
|
|
|
624
622
|
// in the adapter are lost)
|
|
625
623
|
//
|
|
626
624
|
adapter->destroy();
|
|
627
|
-
|
|
628
|
-
_adminAdapter =
|
|
625
|
+
lock.lock();
|
|
626
|
+
_adminAdapter = nullptr;
|
|
629
627
|
throw;
|
|
630
628
|
}
|
|
631
629
|
}
|
|
@@ -633,36 +631,36 @@ IceInternal::Instance::createAdmin(const ObjectAdapterPtr& adminAdapter, const I
|
|
|
633
631
|
return adapter->createProxy(adminIdentity);
|
|
634
632
|
}
|
|
635
633
|
|
|
636
|
-
|
|
634
|
+
std::optional<ObjectPrx>
|
|
637
635
|
IceInternal::Instance::getAdmin()
|
|
638
636
|
{
|
|
639
|
-
|
|
637
|
+
unique_lock lock(_mutex);
|
|
640
638
|
|
|
641
|
-
if(_state == StateDestroyed)
|
|
639
|
+
if (_state == StateDestroyed)
|
|
642
640
|
{
|
|
643
641
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
644
642
|
}
|
|
645
643
|
|
|
646
|
-
if(_adminAdapter)
|
|
644
|
+
if (_adminAdapter)
|
|
647
645
|
{
|
|
648
646
|
return _adminAdapter->createProxy(_adminIdentity);
|
|
649
647
|
}
|
|
650
|
-
else if(_adminEnabled)
|
|
648
|
+
else if (_adminEnabled)
|
|
651
649
|
{
|
|
652
650
|
ObjectAdapterPtr adapter;
|
|
653
|
-
if(_initData.properties->
|
|
651
|
+
if (_initData.properties->getIceProperty("Ice.Admin.Endpoints") != "")
|
|
654
652
|
{
|
|
655
|
-
adapter = _objectAdapterFactory->createObjectAdapter("Ice.Admin",
|
|
653
|
+
adapter = _objectAdapterFactory->createObjectAdapter("Ice.Admin", nullopt, nullopt);
|
|
656
654
|
}
|
|
657
655
|
else
|
|
658
656
|
{
|
|
659
|
-
return
|
|
657
|
+
return nullopt;
|
|
660
658
|
}
|
|
661
659
|
|
|
662
660
|
Identity adminIdentity;
|
|
663
661
|
adminIdentity.name = "admin";
|
|
664
|
-
adminIdentity.category = _initData.properties->
|
|
665
|
-
if(adminIdentity.category.empty())
|
|
662
|
+
adminIdentity.category = _initData.properties->getIceProperty("Ice.Admin.InstanceName");
|
|
663
|
+
if (adminIdentity.category.empty())
|
|
666
664
|
{
|
|
667
665
|
adminIdentity.category = Ice::generateUUID();
|
|
668
666
|
}
|
|
@@ -670,12 +668,12 @@ IceInternal::Instance::getAdmin()
|
|
|
670
668
|
_adminIdentity = adminIdentity;
|
|
671
669
|
_adminAdapter = adapter;
|
|
672
670
|
addAllAdminFacets();
|
|
673
|
-
|
|
671
|
+
lock.unlock();
|
|
674
672
|
try
|
|
675
673
|
{
|
|
676
674
|
adapter->activate();
|
|
677
675
|
}
|
|
678
|
-
catch(...)
|
|
676
|
+
catch (...)
|
|
679
677
|
{
|
|
680
678
|
//
|
|
681
679
|
// We clean it up, even through this error is not recoverable
|
|
@@ -683,8 +681,8 @@ IceInternal::Instance::getAdmin()
|
|
|
683
681
|
// in the adapter are lost)
|
|
684
682
|
//
|
|
685
683
|
adapter->destroy();
|
|
686
|
-
|
|
687
|
-
_adminAdapter =
|
|
684
|
+
lock.lock();
|
|
685
|
+
_adminAdapter = nullptr;
|
|
688
686
|
throw;
|
|
689
687
|
}
|
|
690
688
|
|
|
@@ -693,7 +691,7 @@ IceInternal::Instance::getAdmin()
|
|
|
693
691
|
}
|
|
694
692
|
else
|
|
695
693
|
{
|
|
696
|
-
return
|
|
694
|
+
return nullopt;
|
|
697
695
|
}
|
|
698
696
|
}
|
|
699
697
|
|
|
@@ -707,15 +705,15 @@ IceInternal::Instance::addAllAdminFacets()
|
|
|
707
705
|
//
|
|
708
706
|
FacetMap filteredFacets;
|
|
709
707
|
|
|
710
|
-
for(
|
|
708
|
+
for (const auto& adminFacet : _adminFacets)
|
|
711
709
|
{
|
|
712
|
-
if(_adminFacetFilter.empty() || _adminFacetFilter.find(
|
|
710
|
+
if (_adminFacetFilter.empty() || _adminFacetFilter.find(adminFacet.first) != _adminFacetFilter.end())
|
|
713
711
|
{
|
|
714
|
-
_adminAdapter->addFacet(
|
|
712
|
+
_adminAdapter->addFacet(adminFacet.second, _adminIdentity, adminFacet.first);
|
|
715
713
|
}
|
|
716
714
|
else
|
|
717
715
|
{
|
|
718
|
-
filteredFacets[
|
|
716
|
+
filteredFacets[adminFacet.first] = adminFacet.second;
|
|
719
717
|
}
|
|
720
718
|
}
|
|
721
719
|
_adminFacets.swap(filteredFacets);
|
|
@@ -724,12 +722,12 @@ IceInternal::Instance::addAllAdminFacets()
|
|
|
724
722
|
void
|
|
725
723
|
IceInternal::Instance::setServerProcessProxy(const ObjectAdapterPtr& adminAdapter, const Identity& adminIdentity)
|
|
726
724
|
{
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
const string serverId = _initData.properties->
|
|
730
|
-
if(locator && serverId != "")
|
|
725
|
+
ObjectPrx admin = adminAdapter->createProxy(adminIdentity);
|
|
726
|
+
optional<LocatorPrx> locator = adminAdapter->getLocator();
|
|
727
|
+
const string serverId = _initData.properties->getIceProperty("Ice.Admin.ServerId");
|
|
728
|
+
if (locator && serverId != "")
|
|
731
729
|
{
|
|
732
|
-
|
|
730
|
+
auto process = admin->ice_facet<ProcessPrx>("Process");
|
|
733
731
|
try
|
|
734
732
|
{
|
|
735
733
|
//
|
|
@@ -738,77 +736,81 @@ IceInternal::Instance::setServerProcessProxy(const ObjectAdapterPtr& adminAdapte
|
|
|
738
736
|
//
|
|
739
737
|
locator->getRegistry()->setServerProcessProxy(serverId, process);
|
|
740
738
|
}
|
|
741
|
-
catch(const ServerNotFoundException&)
|
|
739
|
+
catch (const ServerNotFoundException&)
|
|
742
740
|
{
|
|
743
|
-
if(_traceLevels->location >= 1)
|
|
741
|
+
if (_traceLevels->location >= 1)
|
|
744
742
|
{
|
|
745
743
|
Trace out(_initData.logger, _traceLevels->locationCat);
|
|
746
|
-
out << "couldn't register server
|
|
744
|
+
out << "couldn't register server '" + serverId + "' with the locator registry:\n";
|
|
747
745
|
out << "the server is not known to the locator registry";
|
|
748
746
|
}
|
|
749
747
|
|
|
750
|
-
throw InitializationException(
|
|
751
|
-
|
|
748
|
+
throw InitializationException(
|
|
749
|
+
__FILE__,
|
|
750
|
+
__LINE__,
|
|
751
|
+
"Locator '" + locator->ice_toString() + "' knows nothing about server '" + serverId + "'");
|
|
752
752
|
}
|
|
753
|
-
catch(const LocalException& ex)
|
|
753
|
+
catch (const LocalException& ex)
|
|
754
754
|
{
|
|
755
|
-
if(_traceLevels->location >= 1)
|
|
755
|
+
if (_traceLevels->location >= 1)
|
|
756
756
|
{
|
|
757
757
|
Trace out(_initData.logger, _traceLevels->locationCat);
|
|
758
|
-
out << "couldn't register server
|
|
758
|
+
out << "couldn't register server '" + serverId + "' with the locator registry:\n" << ex;
|
|
759
759
|
}
|
|
760
760
|
throw;
|
|
761
761
|
}
|
|
762
762
|
|
|
763
|
-
if(_traceLevels->location >= 1)
|
|
763
|
+
if (_traceLevels->location >= 1)
|
|
764
764
|
{
|
|
765
765
|
Trace out(_initData.logger, _traceLevels->locationCat);
|
|
766
|
-
out << "registered server
|
|
766
|
+
out << "registered server '" + serverId + "' with the locator registry";
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
770
|
|
|
771
771
|
void
|
|
772
|
-
IceInternal::Instance::addAdminFacet(
|
|
772
|
+
IceInternal::Instance::addAdminFacet(ObjectPtr servant, string facet)
|
|
773
773
|
{
|
|
774
|
-
|
|
774
|
+
lock_guard lock(_mutex);
|
|
775
775
|
|
|
776
|
-
if(_state == StateDestroyed)
|
|
776
|
+
if (_state == StateDestroyed)
|
|
777
777
|
{
|
|
778
778
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
779
779
|
}
|
|
780
780
|
|
|
781
|
-
if(_adminAdapter ==
|
|
781
|
+
if (_adminAdapter == nullptr ||
|
|
782
|
+
(!_adminFacetFilter.empty() && _adminFacetFilter.find(facet) == _adminFacetFilter.end()))
|
|
782
783
|
{
|
|
783
|
-
if(_adminFacets.insert(FacetMap::value_type(facet, servant)).second == false)
|
|
784
|
+
if (_adminFacets.insert(FacetMap::value_type(facet, servant)).second == false)
|
|
784
785
|
{
|
|
785
786
|
throw AlreadyRegisteredException(__FILE__, __LINE__, "facet", facet);
|
|
786
787
|
}
|
|
787
788
|
}
|
|
788
789
|
else
|
|
789
790
|
{
|
|
790
|
-
_adminAdapter->addFacet(servant, _adminIdentity, facet);
|
|
791
|
+
_adminAdapter->addFacet(std::move(servant), _adminIdentity, std::move(facet));
|
|
791
792
|
}
|
|
792
793
|
}
|
|
793
794
|
|
|
794
|
-
|
|
795
|
-
IceInternal::Instance::removeAdminFacet(
|
|
795
|
+
ObjectPtr
|
|
796
|
+
IceInternal::Instance::removeAdminFacet(string_view facet)
|
|
796
797
|
{
|
|
797
|
-
|
|
798
|
+
lock_guard lock(_mutex);
|
|
798
799
|
|
|
799
|
-
if(_state == StateDestroyed)
|
|
800
|
+
if (_state == StateDestroyed)
|
|
800
801
|
{
|
|
801
802
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
802
803
|
}
|
|
803
804
|
|
|
804
805
|
ObjectPtr result;
|
|
805
806
|
|
|
806
|
-
if(_adminAdapter ==
|
|
807
|
+
if (_adminAdapter == nullptr ||
|
|
808
|
+
(!_adminFacetFilter.empty() && _adminFacetFilter.find(facet) == _adminFacetFilter.end()))
|
|
807
809
|
{
|
|
808
|
-
|
|
809
|
-
if(p == _adminFacets.end())
|
|
810
|
+
auto p = _adminFacets.find(facet);
|
|
811
|
+
if (p == _adminFacets.end())
|
|
810
812
|
{
|
|
811
|
-
throw NotRegisteredException(__FILE__, __LINE__, "facet", facet);
|
|
813
|
+
throw NotRegisteredException(__FILE__, __LINE__, "facet", string{facet});
|
|
812
814
|
}
|
|
813
815
|
else
|
|
814
816
|
{
|
|
@@ -824,12 +826,12 @@ IceInternal::Instance::removeAdminFacet(const string& facet)
|
|
|
824
826
|
return result;
|
|
825
827
|
}
|
|
826
828
|
|
|
827
|
-
|
|
828
|
-
IceInternal::Instance::findAdminFacet(
|
|
829
|
+
ObjectPtr
|
|
830
|
+
IceInternal::Instance::findAdminFacet(string_view facet)
|
|
829
831
|
{
|
|
830
|
-
|
|
832
|
+
lock_guard lock(_mutex);
|
|
831
833
|
|
|
832
|
-
if(_state == StateDestroyed)
|
|
834
|
+
if (_state == StateDestroyed)
|
|
833
835
|
{
|
|
834
836
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
835
837
|
}
|
|
@@ -839,10 +841,10 @@ IceInternal::Instance::findAdminFacet(const string& facet)
|
|
|
839
841
|
//
|
|
840
842
|
// If the _adminAdapter was not yet created, or this facet is filtered out, we check _adminFacets
|
|
841
843
|
//
|
|
842
|
-
if(!_adminAdapter || (!_adminFacetFilter.empty() && _adminFacetFilter.find(facet) == _adminFacetFilter.end()))
|
|
844
|
+
if (!_adminAdapter || (!_adminFacetFilter.empty() && _adminFacetFilter.find(facet) == _adminFacetFilter.end()))
|
|
843
845
|
{
|
|
844
|
-
|
|
845
|
-
if(p != _adminFacets.end())
|
|
846
|
+
auto p = _adminFacets.find(facet);
|
|
847
|
+
if (p != _adminFacets.end())
|
|
846
848
|
{
|
|
847
849
|
result = p->second;
|
|
848
850
|
}
|
|
@@ -859,21 +861,21 @@ IceInternal::Instance::findAdminFacet(const string& facet)
|
|
|
859
861
|
FacetMap
|
|
860
862
|
IceInternal::Instance::findAllAdminFacets()
|
|
861
863
|
{
|
|
862
|
-
|
|
864
|
+
lock_guard lock(_mutex);
|
|
863
865
|
|
|
864
|
-
if(_state == StateDestroyed)
|
|
866
|
+
if (_state == StateDestroyed)
|
|
865
867
|
{
|
|
866
868
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
867
869
|
}
|
|
868
870
|
|
|
869
|
-
if(!_adminAdapter)
|
|
871
|
+
if (!_adminAdapter)
|
|
870
872
|
{
|
|
871
873
|
return _adminFacets;
|
|
872
874
|
}
|
|
873
875
|
else
|
|
874
876
|
{
|
|
875
877
|
FacetMap result = _adminAdapter->findAllFacets(_adminIdentity);
|
|
876
|
-
if(!_adminFacets.empty())
|
|
878
|
+
if (!_adminFacets.empty())
|
|
877
879
|
{
|
|
878
880
|
// Also returns filtered facets
|
|
879
881
|
result.insert(_adminFacets.begin(), _adminFacets.end());
|
|
@@ -883,11 +885,11 @@ IceInternal::Instance::findAllAdminFacets()
|
|
|
883
885
|
}
|
|
884
886
|
|
|
885
887
|
void
|
|
886
|
-
IceInternal::Instance::setDefaultLocator(const
|
|
888
|
+
IceInternal::Instance::setDefaultLocator(const optional<LocatorPrx>& defaultLocator)
|
|
887
889
|
{
|
|
888
|
-
|
|
890
|
+
lock_guard lock(_mutex);
|
|
889
891
|
|
|
890
|
-
if(_state == StateDestroyed)
|
|
892
|
+
if (_state == StateDestroyed)
|
|
891
893
|
{
|
|
892
894
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
893
895
|
}
|
|
@@ -896,11 +898,11 @@ IceInternal::Instance::setDefaultLocator(const Ice::LocatorPrxPtr& defaultLocato
|
|
|
896
898
|
}
|
|
897
899
|
|
|
898
900
|
void
|
|
899
|
-
IceInternal::Instance::setDefaultRouter(const
|
|
901
|
+
IceInternal::Instance::setDefaultRouter(const optional<RouterPrx>& defaultRouter)
|
|
900
902
|
{
|
|
901
|
-
|
|
903
|
+
lock_guard lock(_mutex);
|
|
902
904
|
|
|
903
|
-
if(_state == StateDestroyed)
|
|
905
|
+
if (_state == StateDestroyed)
|
|
904
906
|
{
|
|
905
907
|
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
|
906
908
|
}
|
|
@@ -917,147 +919,102 @@ IceInternal::Instance::setLogger(const Ice::LoggerPtr& logger)
|
|
|
917
919
|
_initData.logger = logger;
|
|
918
920
|
}
|
|
919
921
|
|
|
920
|
-
#ifdef ICE_CPP11_MAPPING
|
|
921
922
|
void
|
|
922
923
|
IceInternal::Instance::setThreadHook(function<void()> threadStart, function<void()> threadStop)
|
|
923
924
|
{
|
|
924
925
|
_initData.threadStart = std::move(threadStart);
|
|
925
926
|
_initData.threadStop = std::move(threadStop);
|
|
926
927
|
}
|
|
927
|
-
|
|
928
|
-
void
|
|
929
|
-
IceInternal::Instance::setThreadHook(const Ice::ThreadNotificationPtr& threadHook)
|
|
928
|
+
namespace
|
|
930
929
|
{
|
|
931
|
-
|
|
932
|
-
// No locking, as it can only be called during plug-in loading
|
|
933
|
-
//
|
|
934
|
-
_initData.threadHook = threadHook;
|
|
930
|
+
bool logStdErrConvert = true;
|
|
935
931
|
}
|
|
936
|
-
#endif
|
|
937
932
|
|
|
938
|
-
|
|
933
|
+
InstancePtr
|
|
934
|
+
IceInternal::Instance::create(const Ice::CommunicatorPtr& communicator, Ice::InitializationData initData)
|
|
939
935
|
{
|
|
936
|
+
auto instance = shared_ptr<Instance>(new Instance(std::move(initData)));
|
|
937
|
+
instance->initialize(communicator);
|
|
938
|
+
return instance;
|
|
939
|
+
}
|
|
940
940
|
|
|
941
|
-
|
|
942
|
-
|
|
941
|
+
IceInternal::Instance::Instance(InitializationData initData)
|
|
942
|
+
: _initData(std::move(initData)),
|
|
943
|
+
_stringConverter(Ice::getProcessStringConverter()),
|
|
944
|
+
_wstringConverter(Ice::getProcessWstringConverter()),
|
|
945
|
+
_applicationSliceLoader(make_shared<CompositeSliceLoader>())
|
|
946
|
+
{
|
|
947
|
+
#if defined(ICE_USE_SCHANNEL)
|
|
948
|
+
if (_initData.clientAuthenticationOptions && _initData.clientAuthenticationOptions->trustedRootCertificates)
|
|
949
|
+
{
|
|
950
|
+
CertDuplicateStore(_initData.clientAuthenticationOptions->trustedRootCertificates);
|
|
951
|
+
}
|
|
952
|
+
#elif defined(ICE_USE_SECURE_TRANSPORT)
|
|
953
|
+
if (_initData.clientAuthenticationOptions && _initData.clientAuthenticationOptions->trustedRootCertificates)
|
|
954
|
+
{
|
|
955
|
+
CFRetain(_initData.clientAuthenticationOptions->trustedRootCertificates);
|
|
956
|
+
}
|
|
957
|
+
#endif
|
|
943
958
|
}
|
|
944
959
|
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
_initData(initData),
|
|
948
|
-
_messageSizeMax(0),
|
|
949
|
-
_batchAutoFlushSize(0),
|
|
950
|
-
_classGraphDepthMax(0),
|
|
951
|
-
_collectObjects(false),
|
|
952
|
-
_toStringMode(ICE_ENUM(ToStringMode, Unicode)),
|
|
953
|
-
_acceptClassCycles(false),
|
|
954
|
-
_implicitContext(0),
|
|
955
|
-
_stringConverter(Ice::getProcessStringConverter()),
|
|
956
|
-
_wstringConverter(Ice::getProcessWstringConverter()),
|
|
957
|
-
_adminEnabled(false)
|
|
960
|
+
void
|
|
961
|
+
IceInternal::Instance::initialize(const Ice::CommunicatorPtr& communicator)
|
|
958
962
|
{
|
|
959
963
|
try
|
|
960
964
|
{
|
|
961
|
-
|
|
965
|
+
if (!_initData.properties)
|
|
962
966
|
{
|
|
963
|
-
|
|
964
|
-
|
|
967
|
+
// Plain empty properties, in particular, no ICE_CONFIG properties.
|
|
968
|
+
_initData.properties = make_shared<Ice::Properties>();
|
|
969
|
+
}
|
|
965
970
|
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
971
|
+
string programName = _initData.properties->getIceProperty("Ice.ProgramName");
|
|
972
|
+
|
|
973
|
+
if (programName.empty())
|
|
974
|
+
{
|
|
975
|
+
programName = getProgramName();
|
|
976
|
+
_initData.properties->setProperty("Ice.ProgramName", programName);
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
{
|
|
980
|
+
lock_guard lock(staticMutex);
|
|
981
|
+
instanceList->push_back(this);
|
|
970
982
|
|
|
971
|
-
if(!
|
|
983
|
+
if (!oneOffDone)
|
|
972
984
|
{
|
|
973
985
|
//
|
|
974
986
|
// StdOut and StdErr redirection
|
|
975
987
|
//
|
|
976
|
-
string stdOutFilename = _initData.properties->
|
|
977
|
-
string stdErrFilename = _initData.properties->
|
|
988
|
+
string stdOutFilename = _initData.properties->getIceProperty("Ice.StdOut");
|
|
989
|
+
string stdErrFilename = _initData.properties->getIceProperty("Ice.StdErr");
|
|
978
990
|
|
|
979
|
-
if(stdOutFilename != "")
|
|
991
|
+
if (stdOutFilename != "")
|
|
980
992
|
{
|
|
981
|
-
FILE* file =
|
|
982
|
-
if(file ==
|
|
993
|
+
FILE* file = IceInternal::freopen(stdOutFilename, "a", stdout);
|
|
994
|
+
if (file == nullptr)
|
|
983
995
|
{
|
|
984
|
-
throw FileException(__FILE__, __LINE__,
|
|
996
|
+
throw FileException(__FILE__, __LINE__, stdOutFilename);
|
|
985
997
|
}
|
|
986
998
|
}
|
|
987
999
|
|
|
988
|
-
if(stdErrFilename != "")
|
|
1000
|
+
if (stdErrFilename != "")
|
|
989
1001
|
{
|
|
990
|
-
FILE* file =
|
|
991
|
-
if(file ==
|
|
1002
|
+
FILE* file = IceInternal::freopen(stdErrFilename, "a", stderr);
|
|
1003
|
+
if (file == nullptr)
|
|
992
1004
|
{
|
|
993
|
-
throw FileException(__FILE__, __LINE__,
|
|
1005
|
+
throw FileException(__FILE__, __LINE__, stdErrFilename);
|
|
994
1006
|
}
|
|
995
1007
|
}
|
|
996
1008
|
|
|
997
|
-
|
|
998
|
-
{
|
|
999
|
-
IceUtilInternal::nullHandleAbort = true;
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
#ifdef NDEBUG
|
|
1003
|
-
if(_initData.properties->getPropertyAsIntWithDefault("Ice.PrintStackTraces", 0) > 0)
|
|
1004
|
-
{
|
|
1005
|
-
IceUtilInternal::printStackTraces = true;
|
|
1006
|
-
}
|
|
1007
|
-
#else
|
|
1008
|
-
if(_initData.properties->getPropertyAsIntWithDefault("Ice.PrintStackTraces", 1) == 0)
|
|
1009
|
-
{
|
|
1010
|
-
IceUtilInternal::printStackTraces = false;
|
|
1011
|
-
}
|
|
1012
|
-
#endif
|
|
1013
|
-
|
|
1014
|
-
#ifndef _WIN32
|
|
1015
|
-
string newUser = _initData.properties->getProperty("Ice.ChangeUser");
|
|
1016
|
-
if(!newUser.empty())
|
|
1017
|
-
{
|
|
1018
|
-
struct passwd pwbuf;
|
|
1019
|
-
vector<char> buffer(4096); // 4KB initial buffer
|
|
1020
|
-
struct passwd *pw;
|
|
1021
|
-
int err;
|
|
1022
|
-
while((err = getpwnam_r(newUser.c_str(), &pwbuf, &buffer[0], buffer.size(), &pw)) == ERANGE &&
|
|
1023
|
-
buffer.size() < 1024 * 1024) // Limit buffer to 1M
|
|
1024
|
-
{
|
|
1025
|
-
buffer.resize(buffer.size() * 2);
|
|
1026
|
-
}
|
|
1027
|
-
if(err != 0)
|
|
1028
|
-
{
|
|
1029
|
-
throw Ice::SyscallException(__FILE__, __LINE__, err);
|
|
1030
|
-
}
|
|
1031
|
-
else if(pw == 0)
|
|
1032
|
-
{
|
|
1033
|
-
throw InitializationException(__FILE__, __LINE__, "unknown user account `" + newUser + "'");
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
if(setgid(pw->pw_gid) == -1)
|
|
1037
|
-
{
|
|
1038
|
-
throw SyscallException(__FILE__, __LINE__, getSystemErrno());
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
if(initgroups(pw->pw_name, static_cast<int>(pw->pw_gid)) == -1)
|
|
1042
|
-
{
|
|
1043
|
-
throw SyscallException(__FILE__, __LINE__, getSystemErrno());
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
if(setuid(pw->pw_uid) == -1)
|
|
1047
|
-
{
|
|
1048
|
-
throw SyscallException(__FILE__, __LINE__, getSystemErrno());
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
#endif
|
|
1052
|
-
oneOfDone = true;
|
|
1009
|
+
oneOffDone = true;
|
|
1053
1010
|
}
|
|
1054
1011
|
|
|
1055
|
-
if(instanceCount() == 1)
|
|
1012
|
+
if (instanceCount() == 1)
|
|
1056
1013
|
{
|
|
1057
1014
|
#if defined(_WIN32)
|
|
1058
1015
|
WORD version = MAKEWORD(1, 1);
|
|
1059
1016
|
WSADATA data;
|
|
1060
|
-
if(WSAStartup(version, &data) != 0)
|
|
1017
|
+
if (WSAStartup(version, &data) != 0)
|
|
1061
1018
|
{
|
|
1062
1019
|
throw SocketException(__FILE__, __LINE__, getSocketErrno());
|
|
1063
1020
|
}
|
|
@@ -1069,192 +1026,205 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
|
|
|
1069
1026
|
sigemptyset(&action.sa_mask);
|
|
1070
1027
|
action.sa_flags = 0;
|
|
1071
1028
|
sigaction(SIGPIPE, &action, &oldAction);
|
|
1072
|
-
if(_initData.properties->
|
|
1029
|
+
if (_initData.properties->getIcePropertyAsInt("Ice.UseSyslog") > 0)
|
|
1073
1030
|
{
|
|
1074
|
-
identForOpenlog =
|
|
1075
|
-
if(identForOpenlog.empty())
|
|
1031
|
+
identForOpenlog = programName;
|
|
1032
|
+
if (identForOpenlog.empty())
|
|
1076
1033
|
{
|
|
1077
1034
|
identForOpenlog = "<Unknown Ice Program>";
|
|
1078
1035
|
}
|
|
1079
1036
|
openlog(identForOpenlog.c_str(), LOG_PID, LOG_USER);
|
|
1080
1037
|
}
|
|
1081
1038
|
#else
|
|
1082
|
-
logStdErrConvert =
|
|
1083
|
-
|
|
1084
|
-
_initData.properties->getProperty("Ice.StdErr").empty();
|
|
1039
|
+
logStdErrConvert = _initData.properties->getIcePropertyAsInt("Ice.LogStdErr.Convert") > 0 &&
|
|
1040
|
+
_initData.properties->getIceProperty("Ice.StdErr").empty();
|
|
1085
1041
|
#endif
|
|
1086
1042
|
}
|
|
1087
1043
|
}
|
|
1088
1044
|
|
|
1089
|
-
if(!_initData.logger)
|
|
1045
|
+
if (!_initData.logger)
|
|
1090
1046
|
{
|
|
1091
|
-
string logfile = _initData.properties->
|
|
1092
|
-
#
|
|
1093
|
-
if(_initData.properties->
|
|
1047
|
+
string logfile = _initData.properties->getIceProperty("Ice.LogFile");
|
|
1048
|
+
#if !defined(_WIN32) && (!defined(__APPLE__) || TARGET_OS_IPHONE == 0)
|
|
1049
|
+
if (_initData.properties->getIcePropertyAsInt("Ice.UseSyslog") > 0)
|
|
1094
1050
|
{
|
|
1095
|
-
if(!logfile.empty())
|
|
1051
|
+
if (!logfile.empty())
|
|
1096
1052
|
{
|
|
1097
1053
|
throw InitializationException(__FILE__, __LINE__, "Both syslog and file logger cannot be enabled.");
|
|
1098
1054
|
}
|
|
1099
1055
|
|
|
1100
|
-
_initData.logger =
|
|
1101
|
-
|
|
1102
|
-
_initData.properties->getPropertyWithDefault("Ice.SyslogFacility", "LOG_USER"));
|
|
1056
|
+
_initData.logger =
|
|
1057
|
+
make_shared<SysLoggerI>(programName, _initData.properties->getIceProperty("Ice.SyslogFacility"));
|
|
1103
1058
|
}
|
|
1104
1059
|
else
|
|
1105
1060
|
#endif
|
|
1106
1061
|
|
|
1107
|
-
#ifdef
|
|
1108
|
-
|
|
1062
|
+
#ifdef __APPLE__
|
|
1063
|
+
if (!_initData.logger && _initData.properties->getIcePropertyAsInt("Ice.UseOSLog") > 0)
|
|
1109
1064
|
{
|
|
1110
|
-
_initData.logger =
|
|
1111
|
-
_initData.properties->getProperty("Ice.ProgramName"));
|
|
1065
|
+
_initData.logger = make_shared<OSLogLoggerI>(programName);
|
|
1112
1066
|
}
|
|
1113
1067
|
else
|
|
1114
1068
|
#endif
|
|
1115
1069
|
|
|
1116
1070
|
#ifdef ICE_USE_SYSTEMD
|
|
1117
|
-
|
|
1071
|
+
if (_initData.properties->getIcePropertyAsInt("Ice.UseSystemdJournal") > 0)
|
|
1118
1072
|
{
|
|
1119
|
-
_initData.logger =
|
|
1120
|
-
_initData.properties->getProperty("Ice.ProgramName"));
|
|
1073
|
+
_initData.logger = make_shared<SystemdJournalI>(programName);
|
|
1121
1074
|
}
|
|
1122
1075
|
else
|
|
1123
1076
|
#endif
|
|
1124
|
-
|
|
1077
|
+
if (!logfile.empty())
|
|
1125
1078
|
{
|
|
1126
|
-
|
|
1127
|
-
if(sz < 0)
|
|
1079
|
+
int32_t sz = _initData.properties->getIcePropertyAsInt("Ice.LogFile.SizeMax");
|
|
1080
|
+
if (sz < 0)
|
|
1128
1081
|
{
|
|
1129
1082
|
sz = 0;
|
|
1130
1083
|
}
|
|
1131
|
-
_initData.logger =
|
|
1132
|
-
logfile, true, static_cast<size_t>(sz));
|
|
1084
|
+
_initData.logger = make_shared<LoggerI>(programName, logfile, true, static_cast<size_t>(sz));
|
|
1133
1085
|
}
|
|
1134
1086
|
else
|
|
1135
1087
|
{
|
|
1136
1088
|
_initData.logger = getProcessLogger();
|
|
1137
|
-
if(
|
|
1089
|
+
if (dynamic_pointer_cast<LoggerI>(_initData.logger))
|
|
1138
1090
|
{
|
|
1139
|
-
_initData.logger =
|
|
1091
|
+
_initData.logger = make_shared<LoggerI>(programName, "", logStdErrConvert);
|
|
1140
1092
|
}
|
|
1141
1093
|
}
|
|
1142
1094
|
}
|
|
1095
|
+
assert(_initData.logger);
|
|
1143
1096
|
|
|
1144
|
-
|
|
1097
|
+
// This affects the entire process.
|
|
1098
|
+
checkPrintStackTraces(_initData);
|
|
1145
1099
|
|
|
1146
|
-
const_cast<
|
|
1147
|
-
new DefaultsAndOverrides(_initData.properties, _initData.logger);
|
|
1100
|
+
const_cast<TraceLevelsPtr&>(_traceLevels) = make_shared<TraceLevels>(_initData.properties);
|
|
1148
1101
|
|
|
1149
|
-
|
|
1150
|
-
|
|
1102
|
+
const_cast<DefaultsAndOverridesPtr&>(_defaultsAndOverrides) =
|
|
1103
|
+
make_shared<DefaultsAndOverrides>(_initData.properties);
|
|
1151
1104
|
|
|
1152
|
-
const_cast<
|
|
1153
|
-
|
|
1154
|
-
"Ice.ACM.Client",
|
|
1155
|
-
defaultClientACM);
|
|
1105
|
+
const_cast<ConnectionOptions&>(_clientConnectionOptions) = readConnectionOptions("Ice.Connection.Client");
|
|
1106
|
+
const_cast<ConnectionOptions&>(_serverConnectionOptions) = readConnectionOptions("Ice.Connection.Server");
|
|
1156
1107
|
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1108
|
+
// The maximum size of an Ice protocol message in bytes. This is limited to 0x7fffffff, which corresponds to
|
|
1109
|
+
// the maximum value of a 32-bit signed integer (int32_t).
|
|
1110
|
+
const int32_t messageSizeMaxUpperLimit = numeric_limits<int32_t>::max();
|
|
1111
|
+
int32_t messageSizeMax = _initData.properties->getIcePropertyAsInt("Ice.MessageSizeMax");
|
|
1112
|
+
if (messageSizeMax > messageSizeMaxUpperLimit / 1024)
|
|
1113
|
+
{
|
|
1114
|
+
ostringstream os;
|
|
1115
|
+
os << "Ice.MessageSizeMax '" << messageSizeMax << "' is too large, it must be less than or equal to '"
|
|
1116
|
+
<< (messageSizeMaxUpperLimit / 1024) << "' KiB";
|
|
1117
|
+
throw InitializationException{__FILE__, __LINE__, os.str()};
|
|
1118
|
+
}
|
|
1119
|
+
else if (messageSizeMax < 1)
|
|
1120
|
+
{
|
|
1121
|
+
const_cast<int32_t&>(_messageSizeMax) = messageSizeMaxUpperLimit;
|
|
1122
|
+
}
|
|
1123
|
+
else
|
|
1124
|
+
{
|
|
1125
|
+
// The property is specified in kibibytes (KiB); _messageSizeMax is stored in bytes.
|
|
1126
|
+
const_cast<int32_t&>(_messageSizeMax) = messageSizeMax * 1024;
|
|
1127
|
+
}
|
|
1161
1128
|
|
|
1129
|
+
int32_t batchAutoFlushSize = _initData.properties->getIcePropertyAsInt("Ice.BatchAutoFlushSize");
|
|
1130
|
+
if (batchAutoFlushSize > messageSizeMaxUpperLimit / 1024)
|
|
1162
1131
|
{
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
{
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1132
|
+
ostringstream os;
|
|
1133
|
+
os << "Ice.BatchAutoFlushSize '" << batchAutoFlushSize
|
|
1134
|
+
<< "' is too large, it must be less than or equal to '" << (messageSizeMaxUpperLimit / 1024) << "' KiB";
|
|
1135
|
+
throw InitializationException{__FILE__, __LINE__, os.str()};
|
|
1136
|
+
}
|
|
1137
|
+
else if (batchAutoFlushSize < 1)
|
|
1138
|
+
{
|
|
1139
|
+
const_cast<int32_t&>(_batchAutoFlushSize) = messageSizeMaxUpperLimit;
|
|
1140
|
+
}
|
|
1141
|
+
else
|
|
1142
|
+
{
|
|
1143
|
+
// The property is specified in kibibytes (KiB); _batchAutoFlushSize is stored in bytes.
|
|
1144
|
+
const_cast<int32_t&>(_batchAutoFlushSize) = batchAutoFlushSize * 1024;
|
|
1174
1145
|
}
|
|
1175
1146
|
|
|
1176
|
-
|
|
1177
|
-
|
|
1147
|
+
int32_t classGraphDepthMax = _initData.properties->getIcePropertyAsInt("Ice.ClassGraphDepthMax");
|
|
1148
|
+
if (classGraphDepthMax < 1)
|
|
1178
1149
|
{
|
|
1179
|
-
|
|
1180
|
-
{
|
|
1181
|
-
const_cast<size_t&>(_batchAutoFlushSize) = _messageSizeMax;
|
|
1182
|
-
}
|
|
1150
|
+
const_cast<int32_t&>(_classGraphDepthMax) = numeric_limits<int32_t>::max();
|
|
1183
1151
|
}
|
|
1184
1152
|
else
|
|
1185
1153
|
{
|
|
1186
|
-
|
|
1187
|
-
if(num < 1)
|
|
1188
|
-
{
|
|
1189
|
-
const_cast<size_t&>(_batchAutoFlushSize) = static_cast<size_t>(num);
|
|
1190
|
-
}
|
|
1191
|
-
else if(static_cast<size_t>(num) > static_cast<size_t>(0x7fffffff / 1024))
|
|
1192
|
-
{
|
|
1193
|
-
const_cast<size_t&>(_batchAutoFlushSize) = static_cast<size_t>(0x7fffffff);
|
|
1194
|
-
}
|
|
1195
|
-
else
|
|
1196
|
-
{
|
|
1197
|
-
// Property is in kilobytes, convert in bytes.
|
|
1198
|
-
const_cast<size_t&>(_batchAutoFlushSize) = static_cast<size_t>(num) * 1024;
|
|
1199
|
-
}
|
|
1154
|
+
const_cast<int32_t&>(_classGraphDepthMax) = classGraphDepthMax;
|
|
1200
1155
|
}
|
|
1201
1156
|
|
|
1157
|
+
// Update _initData.sliceLoader.
|
|
1158
|
+
|
|
1159
|
+
if (_initData.sliceLoader)
|
|
1202
1160
|
{
|
|
1203
|
-
|
|
1204
|
-
Int num = _initData.properties->getPropertyAsIntWithDefault("Ice.ClassGraphDepthMax", defaultValue);
|
|
1205
|
-
if(num < 1 || static_cast<size_t>(num) > static_cast<size_t>(0x7fffffff))
|
|
1206
|
-
{
|
|
1207
|
-
const_cast<size_t&>(_classGraphDepthMax) = static_cast<size_t>(0x7fffffff);
|
|
1208
|
-
}
|
|
1209
|
-
else
|
|
1210
|
-
{
|
|
1211
|
-
const_cast<size_t&>(_classGraphDepthMax) = static_cast<size_t>(num);
|
|
1212
|
-
}
|
|
1161
|
+
_applicationSliceLoader->add(_initData.sliceLoader);
|
|
1213
1162
|
}
|
|
1214
1163
|
|
|
1215
|
-
|
|
1164
|
+
auto compositeSliceLoader = make_shared<CompositeSliceLoader>();
|
|
1165
|
+
compositeSliceLoader->add(_applicationSliceLoader);
|
|
1166
|
+
compositeSliceLoader->add(DefaultSliceLoader::instance());
|
|
1167
|
+
_initData.sliceLoader = std::move(compositeSliceLoader);
|
|
1216
1168
|
|
|
1217
|
-
string toStringModeStr = _initData.properties->
|
|
1218
|
-
if(toStringModeStr == "ASCII")
|
|
1169
|
+
string toStringModeStr = _initData.properties->getIceProperty("Ice.ToStringMode");
|
|
1170
|
+
if (toStringModeStr == "ASCII")
|
|
1219
1171
|
{
|
|
1220
|
-
const_cast<ToStringMode&>(_toStringMode) =
|
|
1172
|
+
const_cast<ToStringMode&>(_toStringMode) = ToStringMode::ASCII;
|
|
1221
1173
|
}
|
|
1222
|
-
else if(toStringModeStr == "Compat")
|
|
1174
|
+
else if (toStringModeStr == "Compat")
|
|
1223
1175
|
{
|
|
1224
|
-
const_cast<ToStringMode&>(_toStringMode) =
|
|
1176
|
+
const_cast<ToStringMode&>(_toStringMode) = ToStringMode::Compat;
|
|
1225
1177
|
}
|
|
1226
|
-
else if(toStringModeStr != "Unicode")
|
|
1178
|
+
else if (toStringModeStr != "Unicode")
|
|
1227
1179
|
{
|
|
1228
|
-
throw InitializationException(
|
|
1180
|
+
throw InitializationException(
|
|
1181
|
+
__FILE__,
|
|
1182
|
+
__LINE__,
|
|
1183
|
+
"The value for Ice.ToStringMode must be Unicode, ASCII or Compat");
|
|
1229
1184
|
}
|
|
1230
1185
|
|
|
1231
|
-
const_cast<bool&>(_acceptClassCycles) = _initData.properties->
|
|
1232
|
-
|
|
1233
|
-
const_cast<ImplicitContextIPtr&>(_implicitContext) =
|
|
1234
|
-
ImplicitContextI::create(_initData.properties->getProperty("Ice.ImplicitContext"));
|
|
1186
|
+
const_cast<bool&>(_acceptClassCycles) = _initData.properties->getIcePropertyAsInt("Ice.AcceptClassCycles") > 0;
|
|
1235
1187
|
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1188
|
+
string implicitContextKind = _initData.properties->getIceProperty("Ice.ImplicitContext");
|
|
1189
|
+
if (implicitContextKind == "Shared")
|
|
1190
|
+
{
|
|
1191
|
+
_implicitContextKind = ImplicitContextKind::Shared;
|
|
1192
|
+
_sharedImplicitContext = std::make_shared<ImplicitContext>();
|
|
1193
|
+
}
|
|
1194
|
+
else if (implicitContextKind == "PerThread")
|
|
1195
|
+
{
|
|
1196
|
+
_implicitContextKind = ImplicitContextKind::PerThread;
|
|
1197
|
+
}
|
|
1198
|
+
else if (implicitContextKind == "None")
|
|
1199
|
+
{
|
|
1200
|
+
_implicitContextKind = ImplicitContextKind::None;
|
|
1201
|
+
}
|
|
1202
|
+
else
|
|
1203
|
+
{
|
|
1204
|
+
throw Ice::InitializationException(
|
|
1205
|
+
__FILE__,
|
|
1206
|
+
__LINE__,
|
|
1207
|
+
"'" + implicitContextKind + "' is not a valid value for Ice.ImplicitContext");
|
|
1208
|
+
}
|
|
1239
1209
|
|
|
1240
|
-
|
|
1210
|
+
_routerManager = make_shared<RouterManager>();
|
|
1241
1211
|
|
|
1242
|
-
|
|
1212
|
+
_locatorManager = make_shared<LocatorManager>(_initData.properties);
|
|
1243
1213
|
|
|
1244
|
-
|
|
1214
|
+
_referenceFactory = make_shared<ReferenceFactory>(shared_from_this(), communicator);
|
|
1245
1215
|
|
|
1246
1216
|
const bool isIPv6Supported = IceInternal::isIPv6Supported();
|
|
1247
|
-
const bool ipv4 = _initData.properties->
|
|
1248
|
-
const bool ipv6 = _initData.properties->
|
|
1249
|
-
if(!ipv4 && !ipv6)
|
|
1217
|
+
const bool ipv4 = _initData.properties->getIcePropertyAsInt("Ice.IPv4") > 0;
|
|
1218
|
+
const bool ipv6 = isIPv6Supported ? (_initData.properties->getIcePropertyAsInt("Ice.IPv6") > 0) : false;
|
|
1219
|
+
if (!ipv4 && !ipv6)
|
|
1250
1220
|
{
|
|
1251
1221
|
throw InitializationException(__FILE__, __LINE__, "Both IPV4 and IPv6 support cannot be disabled.");
|
|
1252
1222
|
}
|
|
1253
|
-
else if(ipv4 && ipv6)
|
|
1223
|
+
else if (ipv4 && ipv6)
|
|
1254
1224
|
{
|
|
1255
1225
|
_protocolSupport = EnableBoth;
|
|
1256
1226
|
}
|
|
1257
|
-
else if(ipv4)
|
|
1227
|
+
else if (ipv4)
|
|
1258
1228
|
{
|
|
1259
1229
|
_protocolSupport = EnableIPv4;
|
|
1260
1230
|
}
|
|
@@ -1262,77 +1232,149 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
|
|
|
1262
1232
|
{
|
|
1263
1233
|
_protocolSupport = EnableIPv6;
|
|
1264
1234
|
}
|
|
1265
|
-
_preferIPv6 = _initData.properties->
|
|
1235
|
+
_preferIPv6 = _initData.properties->getIcePropertyAsInt("Ice.PreferIPv6Address") > 0;
|
|
1266
1236
|
|
|
1267
1237
|
_networkProxy = IceInternal::createNetworkProxy(_initData.properties, _protocolSupport);
|
|
1268
1238
|
|
|
1269
|
-
_endpointFactoryManager =
|
|
1239
|
+
_endpointFactoryManager = make_shared<EndpointFactoryManager>(shared_from_this());
|
|
1240
|
+
|
|
1241
|
+
_pluginManager = make_shared<PluginManagerI>(communicator);
|
|
1242
|
+
|
|
1243
|
+
_outgoingConnectionFactory = make_shared<OutgoingConnectionFactory>(communicator, shared_from_this());
|
|
1270
1244
|
|
|
1271
|
-
|
|
1245
|
+
_objectAdapterFactory = make_shared<ObjectAdapterFactory>(shared_from_this(), communicator);
|
|
1272
1246
|
|
|
1273
|
-
|
|
1247
|
+
_retryQueue = make_shared<RetryQueue>(shared_from_this());
|
|
1274
1248
|
|
|
1275
|
-
|
|
1249
|
+
StringSeq retryValues = _initData.properties->getIcePropertyAsList("Ice.RetryIntervals");
|
|
1250
|
+
if (retryValues.size() == 0)
|
|
1276
1251
|
{
|
|
1277
|
-
|
|
1252
|
+
_retryIntervals.push_back(0);
|
|
1278
1253
|
}
|
|
1254
|
+
else
|
|
1255
|
+
{
|
|
1256
|
+
for (const auto& retryValue : retryValues)
|
|
1257
|
+
{
|
|
1258
|
+
istringstream value(retryValue);
|
|
1279
1259
|
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1260
|
+
int v;
|
|
1261
|
+
if (!(value >> v) || !value.eof())
|
|
1262
|
+
{
|
|
1263
|
+
v = 0;
|
|
1264
|
+
}
|
|
1283
1265
|
|
|
1284
|
-
|
|
1266
|
+
//
|
|
1267
|
+
// If -1 is the first value, no retry and wait intervals.
|
|
1268
|
+
//
|
|
1269
|
+
if (v == -1 && _retryIntervals.empty())
|
|
1270
|
+
{
|
|
1271
|
+
break;
|
|
1272
|
+
}
|
|
1285
1273
|
|
|
1286
|
-
|
|
1274
|
+
_retryIntervals.push_back(v > 0 ? v : 0);
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1287
1277
|
|
|
1288
|
-
|
|
1278
|
+
#if defined(_WIN32)
|
|
1279
|
+
_sslEngine = make_shared<Ice::SSL::Schannel::SSLEngine>(shared_from_this());
|
|
1280
|
+
#elif defined(__APPLE__)
|
|
1281
|
+
_sslEngine = make_shared<Ice::SSL::SecureTransport::SSLEngine>(shared_from_this());
|
|
1282
|
+
#else
|
|
1283
|
+
_sslEngine = make_shared<Ice::SSL::OpenSSL::SSLEngine>(shared_from_this());
|
|
1284
|
+
#endif
|
|
1285
|
+
_sslEngine->initialize();
|
|
1289
1286
|
}
|
|
1290
|
-
catch(...)
|
|
1287
|
+
catch (...)
|
|
1291
1288
|
{
|
|
1292
1289
|
{
|
|
1293
|
-
|
|
1290
|
+
lock_guard lock(staticMutex);
|
|
1294
1291
|
instanceList->remove(this);
|
|
1295
1292
|
}
|
|
1296
1293
|
destroy();
|
|
1297
|
-
__setNoDelete(false);
|
|
1298
1294
|
throw;
|
|
1299
1295
|
}
|
|
1300
1296
|
}
|
|
1301
1297
|
|
|
1298
|
+
const Ice::ImplicitContextPtr&
|
|
1299
|
+
IceInternal::Instance::getImplicitContext() const
|
|
1300
|
+
{
|
|
1301
|
+
switch (_implicitContextKind)
|
|
1302
|
+
{
|
|
1303
|
+
case ImplicitContextKind::PerThread:
|
|
1304
|
+
{
|
|
1305
|
+
static thread_local std::map<const IceInternal::Instance*, ImplicitContextPtr> perThreadImplicitContextMap;
|
|
1306
|
+
auto it = perThreadImplicitContextMap.find(this);
|
|
1307
|
+
if (it == perThreadImplicitContextMap.end())
|
|
1308
|
+
{
|
|
1309
|
+
auto r = perThreadImplicitContextMap.emplace(this, std::make_shared<ImplicitContext>());
|
|
1310
|
+
return r.first->second;
|
|
1311
|
+
}
|
|
1312
|
+
else
|
|
1313
|
+
{
|
|
1314
|
+
return it->second;
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
case ImplicitContextKind::Shared:
|
|
1318
|
+
{
|
|
1319
|
+
assert(_sharedImplicitContext);
|
|
1320
|
+
return _sharedImplicitContext;
|
|
1321
|
+
}
|
|
1322
|
+
default:
|
|
1323
|
+
{
|
|
1324
|
+
assert(_sharedImplicitContext == nullptr);
|
|
1325
|
+
assert(_implicitContextKind == ImplicitContextKind::None);
|
|
1326
|
+
return _sharedImplicitContext;
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1302
1331
|
IceInternal::Instance::~Instance()
|
|
1303
1332
|
{
|
|
1304
1333
|
assert(_state == StateDestroyed);
|
|
1305
1334
|
assert(!_referenceFactory);
|
|
1306
|
-
assert(!_proxyFactory);
|
|
1307
1335
|
assert(!_outgoingConnectionFactory);
|
|
1308
1336
|
|
|
1309
1337
|
assert(!_objectAdapterFactory);
|
|
1310
1338
|
assert(!_clientThreadPool);
|
|
1311
1339
|
assert(!_serverThreadPool);
|
|
1312
1340
|
assert(!_endpointHostResolver);
|
|
1341
|
+
assert(!_endpointHostResolverThread.joinable());
|
|
1313
1342
|
assert(!_retryQueue);
|
|
1314
1343
|
assert(!_timer);
|
|
1315
1344
|
assert(!_routerManager);
|
|
1316
1345
|
assert(!_locatorManager);
|
|
1317
1346
|
assert(!_endpointFactoryManager);
|
|
1318
|
-
assert(!_dynamicLibraryList);
|
|
1319
1347
|
assert(!_pluginManager);
|
|
1320
1348
|
|
|
1321
|
-
|
|
1322
|
-
|
|
1349
|
+
// Join all the destroy threads.
|
|
1350
|
+
for (auto& thread : _destroyThreads)
|
|
1351
|
+
{
|
|
1352
|
+
if (thread.get_id() == std::this_thread::get_id()) // completed may release the last ref-count
|
|
1353
|
+
{
|
|
1354
|
+
// Detach to avoid a deadlock.
|
|
1355
|
+
thread.detach();
|
|
1356
|
+
}
|
|
1357
|
+
else
|
|
1358
|
+
{
|
|
1359
|
+
thread.join();
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
lock_guard lock(staticMutex);
|
|
1364
|
+
if (instanceList != nullptr)
|
|
1323
1365
|
{
|
|
1324
1366
|
instanceList->remove(this);
|
|
1325
1367
|
}
|
|
1326
|
-
if(instanceCount() == 0)
|
|
1368
|
+
if (instanceCount() == 0)
|
|
1327
1369
|
{
|
|
1328
1370
|
#if defined(_WIN32)
|
|
1329
1371
|
WSACleanup();
|
|
1330
1372
|
#endif
|
|
1331
1373
|
|
|
1332
1374
|
#ifndef _WIN32
|
|
1333
|
-
sigaction(SIGPIPE, &oldAction,
|
|
1375
|
+
sigaction(SIGPIPE, &oldAction, nullptr);
|
|
1334
1376
|
|
|
1335
|
-
if(!identForOpenlog.empty())
|
|
1377
|
+
if (!identForOpenlog.empty())
|
|
1336
1378
|
{
|
|
1337
1379
|
closelog();
|
|
1338
1380
|
identForOpenlog.clear();
|
|
@@ -1342,19 +1384,27 @@ IceInternal::Instance::~Instance()
|
|
|
1342
1384
|
}
|
|
1343
1385
|
|
|
1344
1386
|
void
|
|
1345
|
-
IceInternal::Instance::finishSetup(
|
|
1387
|
+
IceInternal::Instance::finishSetup(const Ice::CommunicatorPtr& communicator)
|
|
1346
1388
|
{
|
|
1347
|
-
//
|
|
1348
1389
|
// Load plug-ins.
|
|
1349
|
-
//
|
|
1350
1390
|
assert(!_serverThreadPool);
|
|
1351
|
-
|
|
1391
|
+
auto pluginManagerImpl = dynamic_pointer_cast<PluginManagerI>(_pluginManager);
|
|
1352
1392
|
assert(pluginManagerImpl);
|
|
1353
|
-
|
|
1393
|
+
|
|
1394
|
+
addDefaultPluginFactories(_initData.pluginFactories);
|
|
1395
|
+
bool libraryLoaded = pluginManagerImpl->loadPlugins();
|
|
1396
|
+
|
|
1397
|
+
// On Windows, if we loaded any plugin and stack trace collection is enabled, we need to call
|
|
1398
|
+
// ice_enableStackTraceCollection() again to refresh the module list. This refresh is fairly slow so we make it only
|
|
1399
|
+
// when necessary. Extra calls to ice_enableStackTraceCollection() are no-op on other platforms.
|
|
1400
|
+
if (libraryLoaded)
|
|
1401
|
+
{
|
|
1402
|
+
checkPrintStackTraces(_initData);
|
|
1403
|
+
}
|
|
1354
1404
|
|
|
1355
1405
|
//
|
|
1356
1406
|
// Initialize the endpoint factories once all the plugins are loaded. This gives
|
|
1357
|
-
// the opportunity for the endpoint factories to find
|
|
1407
|
+
// the opportunity for the endpoint factories to find underlying factories.
|
|
1358
1408
|
//
|
|
1359
1409
|
_endpointFactoryManager->initialize();
|
|
1360
1410
|
|
|
@@ -1371,37 +1421,37 @@ IceInternal::Instance::finishSetup(int& argc, const char* argv[], const Ice::Com
|
|
|
1371
1421
|
// since one of these plugins can be a Logger plugin that sets a new logger during loading
|
|
1372
1422
|
//
|
|
1373
1423
|
|
|
1374
|
-
if(_initData.properties->
|
|
1424
|
+
if (_initData.properties->getIceProperty("Ice.Admin.Enabled") == "")
|
|
1375
1425
|
{
|
|
1376
|
-
_adminEnabled = _initData.properties->
|
|
1426
|
+
_adminEnabled = _initData.properties->getIceProperty("Ice.Admin.Endpoints") != "";
|
|
1377
1427
|
}
|
|
1378
1428
|
else
|
|
1379
1429
|
{
|
|
1380
|
-
_adminEnabled = _initData.properties->
|
|
1430
|
+
_adminEnabled = _initData.properties->getIcePropertyAsInt("Ice.Admin.Enabled") > 0;
|
|
1381
1431
|
}
|
|
1382
1432
|
|
|
1383
|
-
StringSeq facetSeq = _initData.properties->
|
|
1384
|
-
if(!facetSeq.empty())
|
|
1433
|
+
StringSeq facetSeq = _initData.properties->getIcePropertyAsList("Ice.Admin.Facets");
|
|
1434
|
+
if (!facetSeq.empty())
|
|
1385
1435
|
{
|
|
1386
1436
|
_adminFacetFilter.insert(facetSeq.begin(), facetSeq.end());
|
|
1387
1437
|
}
|
|
1388
1438
|
|
|
1389
|
-
if(_adminEnabled)
|
|
1439
|
+
if (_adminEnabled)
|
|
1390
1440
|
{
|
|
1391
1441
|
//
|
|
1392
1442
|
// Process facet
|
|
1393
1443
|
//
|
|
1394
1444
|
const string processFacetName = "Process";
|
|
1395
|
-
if(_adminFacetFilter.empty() || _adminFacetFilter.find(processFacetName) != _adminFacetFilter.end())
|
|
1445
|
+
if (_adminFacetFilter.empty() || _adminFacetFilter.find(processFacetName) != _adminFacetFilter.end())
|
|
1396
1446
|
{
|
|
1397
|
-
_adminFacets.insert(make_pair(processFacetName,
|
|
1447
|
+
_adminFacets.insert(make_pair(processFacetName, make_shared<ProcessI>(communicator)));
|
|
1398
1448
|
}
|
|
1399
1449
|
|
|
1400
1450
|
//
|
|
1401
1451
|
// Logger facet
|
|
1402
1452
|
//
|
|
1403
1453
|
const string loggerFacetName = "Logger";
|
|
1404
|
-
if(_adminFacetFilter.empty() || _adminFacetFilter.find(loggerFacetName) != _adminFacetFilter.end())
|
|
1454
|
+
if (_adminFacetFilter.empty() || _adminFacetFilter.find(loggerFacetName) != _adminFacetFilter.end())
|
|
1405
1455
|
{
|
|
1406
1456
|
LoggerAdminLoggerPtr logger = createLoggerAdminLogger(_initData.properties, _initData.logger);
|
|
1407
1457
|
setLogger(logger);
|
|
@@ -1412,10 +1462,10 @@ IceInternal::Instance::finishSetup(int& argc, const char* argv[], const Ice::Com
|
|
|
1412
1462
|
// Properties facet
|
|
1413
1463
|
//
|
|
1414
1464
|
const string propertiesFacetName = "Properties";
|
|
1415
|
-
|
|
1416
|
-
if(_adminFacetFilter.empty() || _adminFacetFilter.find(propertiesFacetName) != _adminFacetFilter.end())
|
|
1465
|
+
NativePropertiesAdminPtr propsAdmin;
|
|
1466
|
+
if (_adminFacetFilter.empty() || _adminFacetFilter.find(propertiesFacetName) != _adminFacetFilter.end())
|
|
1417
1467
|
{
|
|
1418
|
-
propsAdmin =
|
|
1468
|
+
propsAdmin = make_shared<NativePropertiesAdmin>(_initData.properties, _initData.logger);
|
|
1419
1469
|
_adminFacets.insert(make_pair(propertiesFacetName, propsAdmin));
|
|
1420
1470
|
}
|
|
1421
1471
|
|
|
@@ -1423,24 +1473,20 @@ IceInternal::Instance::finishSetup(int& argc, const char* argv[], const Ice::Com
|
|
|
1423
1473
|
// Metrics facet
|
|
1424
1474
|
//
|
|
1425
1475
|
const string metricsFacetName = "Metrics";
|
|
1426
|
-
if(_adminFacetFilter.empty() || _adminFacetFilter.find(metricsFacetName) != _adminFacetFilter.end())
|
|
1476
|
+
if (_adminFacetFilter.empty() || _adminFacetFilter.find(metricsFacetName) != _adminFacetFilter.end())
|
|
1427
1477
|
{
|
|
1428
|
-
CommunicatorObserverIPtr observer =
|
|
1478
|
+
CommunicatorObserverIPtr observer = make_shared<CommunicatorObserverI>(_initData);
|
|
1429
1479
|
_initData.observer = observer;
|
|
1430
1480
|
_adminFacets.insert(make_pair(metricsFacetName, observer->getFacet()));
|
|
1431
1481
|
|
|
1432
1482
|
//
|
|
1433
1483
|
// Make sure the metrics admin facet receives property updates.
|
|
1434
1484
|
//
|
|
1435
|
-
if(propsAdmin)
|
|
1485
|
+
if (propsAdmin)
|
|
1436
1486
|
{
|
|
1437
|
-
#ifdef ICE_CPP11_MAPPING
|
|
1438
1487
|
auto metricsAdmin = observer->getFacet();
|
|
1439
|
-
propsAdmin->addUpdateCallback(
|
|
1440
|
-
|
|
1441
|
-
#else
|
|
1442
|
-
propsAdmin->addUpdateCallback(observer->getFacet());
|
|
1443
|
-
#endif
|
|
1488
|
+
propsAdmin->addUpdateCallback([metricsAdmin](const PropertyDict& changes)
|
|
1489
|
+
{ metricsAdmin->updated(changes); });
|
|
1444
1490
|
}
|
|
1445
1491
|
}
|
|
1446
1492
|
}
|
|
@@ -1448,9 +1494,9 @@ IceInternal::Instance::finishSetup(int& argc, const char* argv[], const Ice::Com
|
|
|
1448
1494
|
//
|
|
1449
1495
|
// Set observer updater
|
|
1450
1496
|
//
|
|
1451
|
-
if(_initData.observer)
|
|
1497
|
+
if (_initData.observer)
|
|
1452
1498
|
{
|
|
1453
|
-
_initData.observer->setObserverUpdater(
|
|
1499
|
+
_initData.observer->setObserverUpdater(make_shared<ObserverUpdaterI>(shared_from_this()));
|
|
1454
1500
|
}
|
|
1455
1501
|
|
|
1456
1502
|
//
|
|
@@ -1458,18 +1504,9 @@ IceInternal::Instance::finishSetup(int& argc, const char* argv[], const Ice::Com
|
|
|
1458
1504
|
//
|
|
1459
1505
|
try
|
|
1460
1506
|
{
|
|
1461
|
-
|
|
1462
|
-
int priority = _initData.properties->getPropertyAsInt("Ice.ThreadPriority");
|
|
1463
|
-
if(hasPriority)
|
|
1464
|
-
{
|
|
1465
|
-
_timer = new Timer(priority);
|
|
1466
|
-
}
|
|
1467
|
-
else
|
|
1468
|
-
{
|
|
1469
|
-
_timer = new Timer;
|
|
1470
|
-
}
|
|
1507
|
+
_timer = make_shared<ThreadObserverTimer>();
|
|
1471
1508
|
}
|
|
1472
|
-
catch(const
|
|
1509
|
+
catch (const Ice::Exception& ex)
|
|
1473
1510
|
{
|
|
1474
1511
|
Error out(_initData.logger);
|
|
1475
1512
|
out << "cannot create thread for timer:\n" << ex;
|
|
@@ -1478,44 +1515,35 @@ IceInternal::Instance::finishSetup(int& argc, const char* argv[], const Ice::Com
|
|
|
1478
1515
|
|
|
1479
1516
|
try
|
|
1480
1517
|
{
|
|
1481
|
-
_endpointHostResolver =
|
|
1482
|
-
|
|
1483
|
-
int priority = _initData.properties->getPropertyAsInt("Ice.ThreadPriority");
|
|
1484
|
-
if(hasPriority)
|
|
1485
|
-
{
|
|
1486
|
-
_endpointHostResolver->start(0, priority);
|
|
1487
|
-
}
|
|
1488
|
-
else
|
|
1489
|
-
{
|
|
1490
|
-
_endpointHostResolver->start();
|
|
1491
|
-
}
|
|
1518
|
+
_endpointHostResolver = make_shared<EndpointHostResolver>(shared_from_this());
|
|
1519
|
+
_endpointHostResolverThread = std::thread([this] { _endpointHostResolver->run(); });
|
|
1492
1520
|
}
|
|
1493
|
-
catch(const
|
|
1521
|
+
catch (const Ice::Exception& ex)
|
|
1494
1522
|
{
|
|
1495
1523
|
Error out(_initData.logger);
|
|
1496
1524
|
out << "cannot create thread for endpoint host resolver:\n" << ex;
|
|
1497
1525
|
throw;
|
|
1498
1526
|
}
|
|
1499
1527
|
|
|
1500
|
-
_clientThreadPool =
|
|
1528
|
+
_clientThreadPool = ThreadPool::create(shared_from_this(), "Ice.ThreadPool.Client", 0);
|
|
1501
1529
|
|
|
1502
1530
|
//
|
|
1503
1531
|
// The default router/locator may have been set during the loading of plugins.
|
|
1504
1532
|
// Therefore we make sure it is not already set before checking the property.
|
|
1505
1533
|
//
|
|
1506
|
-
if(!_referenceFactory->getDefaultRouter())
|
|
1534
|
+
if (!_referenceFactory->getDefaultRouter())
|
|
1507
1535
|
{
|
|
1508
|
-
|
|
1509
|
-
if(router)
|
|
1536
|
+
auto router = communicator->propertyToProxy<RouterPrx>("Ice.Default.Router");
|
|
1537
|
+
if (router)
|
|
1510
1538
|
{
|
|
1511
1539
|
_referenceFactory = _referenceFactory->setDefaultRouter(router);
|
|
1512
1540
|
}
|
|
1513
1541
|
}
|
|
1514
1542
|
|
|
1515
|
-
if(!_referenceFactory->getDefaultLocator())
|
|
1543
|
+
if (!_referenceFactory->getDefaultLocator())
|
|
1516
1544
|
{
|
|
1517
|
-
|
|
1518
|
-
if(locator)
|
|
1545
|
+
auto locator = communicator->propertyToProxy<LocatorPrx>("Ice.Default.Locator");
|
|
1546
|
+
if (locator)
|
|
1519
1547
|
{
|
|
1520
1548
|
_referenceFactory = _referenceFactory->setDefaultLocator(locator);
|
|
1521
1549
|
}
|
|
@@ -1525,12 +1553,12 @@ IceInternal::Instance::finishSetup(int& argc, const char* argv[], const Ice::Com
|
|
|
1525
1553
|
// Show process id if requested (but only once).
|
|
1526
1554
|
//
|
|
1527
1555
|
bool printProcessId = false;
|
|
1528
|
-
if(!printProcessIdDone && _initData.properties->
|
|
1556
|
+
if (!printProcessIdDone && _initData.properties->getIcePropertyAsInt("Ice.PrintProcessId") > 0)
|
|
1529
1557
|
{
|
|
1530
1558
|
//
|
|
1531
1559
|
// Safe double-check locking (no dependent variable!)
|
|
1532
1560
|
//
|
|
1533
|
-
|
|
1561
|
+
lock_guard lock(staticMutex);
|
|
1534
1562
|
printProcessId = !printProcessIdDone;
|
|
1535
1563
|
|
|
1536
1564
|
//
|
|
@@ -1539,7 +1567,7 @@ IceInternal::Instance::finishSetup(int& argc, const char* argv[], const Ice::Com
|
|
|
1539
1567
|
printProcessIdDone = true;
|
|
1540
1568
|
}
|
|
1541
1569
|
|
|
1542
|
-
if(printProcessId)
|
|
1570
|
+
if (printProcessId)
|
|
1543
1571
|
{
|
|
1544
1572
|
#ifdef _MSC_VER
|
|
1545
1573
|
consoleOut << GetCurrentProcessId() << endl;
|
|
@@ -1557,7 +1585,7 @@ IceInternal::Instance::finishSetup(int& argc, const char* argv[], const Ice::Com
|
|
|
1557
1585
|
// initialization until after it has interacted directly with the
|
|
1558
1586
|
// plug-ins.
|
|
1559
1587
|
//
|
|
1560
|
-
if(_initData.properties->
|
|
1588
|
+
if (_initData.properties->getIcePropertyAsInt("Ice.InitPlugins") > 0)
|
|
1561
1589
|
{
|
|
1562
1590
|
pluginManagerImpl->initializePlugins();
|
|
1563
1591
|
}
|
|
@@ -1568,32 +1596,29 @@ IceInternal::Instance::finishSetup(int& argc, const char* argv[], const Ice::Com
|
|
|
1568
1596
|
// remote clients to invoke Admin facets as soon as it's registered).
|
|
1569
1597
|
//
|
|
1570
1598
|
// Note: getAdmin here can return 0 and do nothing in the event the
|
|
1571
|
-
// application set Ice.Admin.Enabled but did not set Ice.Admin.
|
|
1599
|
+
// application set Ice.Admin.Enabled but did not set Ice.Admin.Endpoints
|
|
1572
1600
|
// and one or more of the properties required to create the Admin object.
|
|
1573
1601
|
//
|
|
1574
|
-
if(_adminEnabled && _initData.properties->
|
|
1602
|
+
if (_adminEnabled && _initData.properties->getIcePropertyAsInt("Ice.Admin.DelayCreation") <= 0)
|
|
1575
1603
|
{
|
|
1576
1604
|
getAdmin();
|
|
1577
1605
|
}
|
|
1578
1606
|
}
|
|
1579
1607
|
|
|
1580
1608
|
void
|
|
1581
|
-
IceInternal::Instance::destroy()
|
|
1609
|
+
IceInternal::Instance::destroy() noexcept
|
|
1582
1610
|
{
|
|
1583
1611
|
{
|
|
1584
|
-
|
|
1612
|
+
unique_lock lock(_mutex);
|
|
1585
1613
|
|
|
1586
1614
|
//
|
|
1587
1615
|
// If destroy is in progress, wait for it to be done. This is
|
|
1588
1616
|
// necessary in case destroy() is called concurrently by
|
|
1589
1617
|
// multiple threads.
|
|
1590
1618
|
//
|
|
1591
|
-
|
|
1592
|
-
{
|
|
1593
|
-
wait();
|
|
1594
|
-
}
|
|
1619
|
+
_conditionVariable.wait(lock, [this] { return _state != StateDestroyInProgress; });
|
|
1595
1620
|
|
|
1596
|
-
if(_state == StateDestroyed)
|
|
1621
|
+
if (_state == StateDestroyed)
|
|
1597
1622
|
{
|
|
1598
1623
|
return;
|
|
1599
1624
|
}
|
|
@@ -1604,48 +1629,60 @@ IceInternal::Instance::destroy()
|
|
|
1604
1629
|
// Shutdown and destroy all the incoming and outgoing Ice
|
|
1605
1630
|
// connections and wait for the connections to be finished.
|
|
1606
1631
|
//
|
|
1607
|
-
if(_objectAdapterFactory)
|
|
1632
|
+
if (_objectAdapterFactory)
|
|
1608
1633
|
{
|
|
1609
1634
|
_objectAdapterFactory->shutdown();
|
|
1610
1635
|
}
|
|
1611
1636
|
|
|
1612
|
-
if(_outgoingConnectionFactory)
|
|
1637
|
+
if (_outgoingConnectionFactory)
|
|
1613
1638
|
{
|
|
1614
1639
|
_outgoingConnectionFactory->destroy();
|
|
1615
1640
|
}
|
|
1616
1641
|
|
|
1617
|
-
if(_objectAdapterFactory)
|
|
1642
|
+
if (_objectAdapterFactory)
|
|
1618
1643
|
{
|
|
1619
1644
|
_objectAdapterFactory->destroy();
|
|
1620
1645
|
}
|
|
1621
1646
|
|
|
1622
|
-
if(_outgoingConnectionFactory)
|
|
1647
|
+
if (_outgoingConnectionFactory)
|
|
1623
1648
|
{
|
|
1624
1649
|
_outgoingConnectionFactory->waitUntilFinished();
|
|
1625
1650
|
}
|
|
1626
1651
|
|
|
1627
|
-
if(_retryQueue)
|
|
1652
|
+
if (_retryQueue)
|
|
1628
1653
|
{
|
|
1629
1654
|
_retryQueue->destroy(); // Must be called before destroying thread pools.
|
|
1630
1655
|
}
|
|
1631
1656
|
|
|
1632
|
-
if(_initData.observer)
|
|
1657
|
+
if (_initData.observer)
|
|
1633
1658
|
{
|
|
1634
|
-
CommunicatorObserverIPtr observer =
|
|
1635
|
-
if(observer)
|
|
1659
|
+
CommunicatorObserverIPtr observer = dynamic_pointer_cast<CommunicatorObserverI>(_initData.observer);
|
|
1660
|
+
if (observer)
|
|
1636
1661
|
{
|
|
1637
1662
|
observer->destroy(); // Break cyclic reference counts. Don't clear _observer, it's immutable.
|
|
1638
1663
|
}
|
|
1639
|
-
_initData.observer->setObserverUpdater(
|
|
1664
|
+
_initData.observer->setObserverUpdater(nullptr); // Break cyclic reference count.
|
|
1640
1665
|
}
|
|
1641
1666
|
|
|
1642
|
-
|
|
1643
|
-
if(
|
|
1667
|
+
#if defined(ICE_USE_SCHANNEL)
|
|
1668
|
+
if (_initData.clientAuthenticationOptions && _initData.clientAuthenticationOptions->trustedRootCertificates)
|
|
1669
|
+
{
|
|
1670
|
+
CertCloseStore(_initData.clientAuthenticationOptions->trustedRootCertificates, 0);
|
|
1671
|
+
const_cast<Ice::InitializationData&>(_initData).clientAuthenticationOptions = nullopt;
|
|
1672
|
+
}
|
|
1673
|
+
#elif defined(ICE_USE_SECURE_TRANSPORT)
|
|
1674
|
+
if (_initData.clientAuthenticationOptions && _initData.clientAuthenticationOptions->trustedRootCertificates)
|
|
1675
|
+
{
|
|
1676
|
+
CFRelease(_initData.clientAuthenticationOptions->trustedRootCertificates);
|
|
1677
|
+
const_cast<Ice::InitializationData&>(_initData).clientAuthenticationOptions = nullopt;
|
|
1678
|
+
}
|
|
1679
|
+
#endif
|
|
1680
|
+
|
|
1681
|
+
LoggerAdminLoggerPtr logger = dynamic_pointer_cast<LoggerAdminLogger>(_initData.logger);
|
|
1682
|
+
if (logger)
|
|
1644
1683
|
{
|
|
1645
|
-
//
|
|
1646
1684
|
// This only disables the remote logging; we don't set or reset _initData.logger
|
|
1647
|
-
|
|
1648
|
-
logger->destroy();
|
|
1685
|
+
logger->detach();
|
|
1649
1686
|
}
|
|
1650
1687
|
|
|
1651
1688
|
//
|
|
@@ -1653,19 +1690,19 @@ IceInternal::Instance::destroy()
|
|
|
1653
1690
|
// all the connections are finished (the connections destruction
|
|
1654
1691
|
// can require invoking callbacks with the thread pools).
|
|
1655
1692
|
//
|
|
1656
|
-
if(_serverThreadPool)
|
|
1693
|
+
if (_serverThreadPool)
|
|
1657
1694
|
{
|
|
1658
1695
|
_serverThreadPool->destroy();
|
|
1659
1696
|
}
|
|
1660
|
-
if(_clientThreadPool)
|
|
1697
|
+
if (_clientThreadPool)
|
|
1661
1698
|
{
|
|
1662
1699
|
_clientThreadPool->destroy();
|
|
1663
1700
|
}
|
|
1664
|
-
if(_endpointHostResolver)
|
|
1701
|
+
if (_endpointHostResolver)
|
|
1665
1702
|
{
|
|
1666
1703
|
_endpointHostResolver->destroy();
|
|
1667
1704
|
}
|
|
1668
|
-
if(_timer)
|
|
1705
|
+
if (_timer)
|
|
1669
1706
|
{
|
|
1670
1707
|
_timer->destroy();
|
|
1671
1708
|
}
|
|
@@ -1673,55 +1710,39 @@ IceInternal::Instance::destroy()
|
|
|
1673
1710
|
//
|
|
1674
1711
|
// Wait for all the threads to be finished.
|
|
1675
1712
|
//
|
|
1676
|
-
if(_clientThreadPool)
|
|
1713
|
+
if (_clientThreadPool)
|
|
1677
1714
|
{
|
|
1678
1715
|
_clientThreadPool->joinWithAllThreads();
|
|
1679
1716
|
}
|
|
1680
|
-
if(_serverThreadPool)
|
|
1717
|
+
if (_serverThreadPool)
|
|
1681
1718
|
{
|
|
1682
1719
|
_serverThreadPool->joinWithAllThreads();
|
|
1683
1720
|
}
|
|
1684
|
-
if(
|
|
1685
|
-
{
|
|
1686
|
-
_endpointHostResolver->getThreadControl().join();
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
#ifdef ICE_CPP11_COMPILER
|
|
1690
|
-
for(const auto& p : _objectFactoryMap)
|
|
1721
|
+
if (_endpointHostResolverThread.joinable())
|
|
1691
1722
|
{
|
|
1692
|
-
|
|
1723
|
+
_endpointHostResolverThread.join();
|
|
1693
1724
|
}
|
|
1694
|
-
#else
|
|
1695
|
-
for_each(_objectFactoryMap.begin(), _objectFactoryMap.end(),
|
|
1696
|
-
Ice::secondVoidMemFun<const string, ObjectFactory>(&ObjectFactory::destroy));
|
|
1697
|
-
#endif
|
|
1698
|
-
_objectFactoryMap.clear();
|
|
1699
1725
|
|
|
1700
|
-
if(_routerManager)
|
|
1726
|
+
if (_routerManager)
|
|
1701
1727
|
{
|
|
1702
1728
|
_routerManager->destroy();
|
|
1703
1729
|
}
|
|
1704
1730
|
|
|
1705
|
-
if(_locatorManager)
|
|
1731
|
+
if (_locatorManager)
|
|
1706
1732
|
{
|
|
1707
1733
|
_locatorManager->destroy();
|
|
1708
1734
|
}
|
|
1709
1735
|
|
|
1710
|
-
if(
|
|
1711
|
-
{
|
|
1712
|
-
_endpointFactoryManager->destroy();
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
if(_initData.properties->getPropertyAsInt("Ice.Warn.UnusedProperties") > 0)
|
|
1736
|
+
if (_initData.properties->getIcePropertyAsInt("Ice.Warn.UnusedProperties") > 0)
|
|
1716
1737
|
{
|
|
1717
|
-
set<string> unusedProperties =
|
|
1718
|
-
if(unusedProperties.size() != 0)
|
|
1738
|
+
set<string> unusedProperties = _initData.properties.get()->getUnusedProperties();
|
|
1739
|
+
if (unusedProperties.size() != 0)
|
|
1719
1740
|
{
|
|
1720
1741
|
Warning out(_initData.logger);
|
|
1721
1742
|
out << "The following properties were set but never read:";
|
|
1722
|
-
for(
|
|
1743
|
+
for (const auto& unusedProp : unusedProperties)
|
|
1723
1744
|
{
|
|
1724
|
-
out << "\n " <<
|
|
1745
|
+
out << "\n " << unusedProp;
|
|
1725
1746
|
}
|
|
1726
1747
|
}
|
|
1727
1748
|
}
|
|
@@ -1729,37 +1750,67 @@ IceInternal::Instance::destroy()
|
|
|
1729
1750
|
//
|
|
1730
1751
|
// Destroy last so that a Logger plugin can receive all log/traces before its destruction.
|
|
1731
1752
|
//
|
|
1732
|
-
if(_pluginManager)
|
|
1753
|
+
if (_pluginManager)
|
|
1733
1754
|
{
|
|
1734
1755
|
_pluginManager->destroy();
|
|
1735
1756
|
}
|
|
1736
1757
|
|
|
1737
1758
|
{
|
|
1738
|
-
|
|
1759
|
+
lock_guard lock(_mutex);
|
|
1739
1760
|
|
|
1740
|
-
_objectAdapterFactory =
|
|
1741
|
-
_outgoingConnectionFactory =
|
|
1742
|
-
_retryQueue =
|
|
1761
|
+
_objectAdapterFactory = nullptr;
|
|
1762
|
+
_outgoingConnectionFactory = nullptr;
|
|
1763
|
+
_retryQueue = nullptr;
|
|
1743
1764
|
|
|
1744
|
-
_serverThreadPool =
|
|
1745
|
-
_clientThreadPool =
|
|
1746
|
-
_endpointHostResolver =
|
|
1747
|
-
_timer =
|
|
1765
|
+
_serverThreadPool = nullptr;
|
|
1766
|
+
_clientThreadPool = nullptr;
|
|
1767
|
+
_endpointHostResolver = nullptr;
|
|
1768
|
+
_timer = nullptr;
|
|
1748
1769
|
|
|
1749
|
-
_referenceFactory =
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
_endpointFactoryManager = 0;
|
|
1755
|
-
_pluginManager = 0;
|
|
1756
|
-
_dynamicLibraryList = 0;
|
|
1770
|
+
_referenceFactory = nullptr;
|
|
1771
|
+
_routerManager = nullptr;
|
|
1772
|
+
_locatorManager = nullptr;
|
|
1773
|
+
_endpointFactoryManager = nullptr;
|
|
1774
|
+
_pluginManager = nullptr;
|
|
1757
1775
|
|
|
1758
|
-
_adminAdapter =
|
|
1776
|
+
_adminAdapter = nullptr;
|
|
1759
1777
|
_adminFacets.clear();
|
|
1760
1778
|
|
|
1779
|
+
_sslEngine = nullptr;
|
|
1780
|
+
|
|
1761
1781
|
_state = StateDestroyed;
|
|
1762
|
-
|
|
1782
|
+
_conditionVariable.notify_all();
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
void
|
|
1787
|
+
IceInternal::Instance::destroyAsync(function<void()> completed) noexcept
|
|
1788
|
+
{
|
|
1789
|
+
assert(completed); // the caller (Communicator) makes sure completed is callable.
|
|
1790
|
+
|
|
1791
|
+
bool executeCallback = false;
|
|
1792
|
+
{
|
|
1793
|
+
lock_guard lock(_mutex);
|
|
1794
|
+
if (_state == StateDestroyed)
|
|
1795
|
+
{
|
|
1796
|
+
executeCallback = true; // execute outside the lock
|
|
1797
|
+
}
|
|
1798
|
+
else
|
|
1799
|
+
{
|
|
1800
|
+
// Start a thread that calls destroy() and then executes the callback.
|
|
1801
|
+
// We join these threads in the destructor. It's important to capture this and not shared_from_this() here.
|
|
1802
|
+
_destroyThreads.emplace_back(
|
|
1803
|
+
[this, completed = std::move(completed)]()
|
|
1804
|
+
{
|
|
1805
|
+
this->destroy();
|
|
1806
|
+
completed();
|
|
1807
|
+
});
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
if (executeCallback)
|
|
1812
|
+
{
|
|
1813
|
+
completed();
|
|
1763
1814
|
}
|
|
1764
1815
|
}
|
|
1765
1816
|
|
|
@@ -1773,7 +1824,7 @@ IceInternal::Instance::updateConnectionObservers()
|
|
|
1773
1824
|
assert(_objectAdapterFactory);
|
|
1774
1825
|
_objectAdapterFactory->updateObservers(&ObjectAdapterI::updateConnectionObservers);
|
|
1775
1826
|
}
|
|
1776
|
-
catch(const Ice::CommunicatorDestroyedException&)
|
|
1827
|
+
catch (const Ice::CommunicatorDestroyedException&)
|
|
1777
1828
|
{
|
|
1778
1829
|
}
|
|
1779
1830
|
}
|
|
@@ -1783,44 +1834,44 @@ IceInternal::Instance::updateThreadObservers()
|
|
|
1783
1834
|
{
|
|
1784
1835
|
try
|
|
1785
1836
|
{
|
|
1786
|
-
if(_clientThreadPool)
|
|
1837
|
+
if (_clientThreadPool)
|
|
1787
1838
|
{
|
|
1788
1839
|
_clientThreadPool->updateObservers();
|
|
1789
1840
|
}
|
|
1790
|
-
if(_serverThreadPool)
|
|
1841
|
+
if (_serverThreadPool)
|
|
1791
1842
|
{
|
|
1792
1843
|
_serverThreadPool->updateObservers();
|
|
1793
1844
|
}
|
|
1794
1845
|
assert(_objectAdapterFactory);
|
|
1795
1846
|
_objectAdapterFactory->updateObservers(&ObjectAdapterI::updateThreadObservers);
|
|
1796
|
-
if(_endpointHostResolver)
|
|
1847
|
+
if (_endpointHostResolver)
|
|
1797
1848
|
{
|
|
1798
1849
|
_endpointHostResolver->updateObserver();
|
|
1799
1850
|
}
|
|
1800
|
-
if(_timer)
|
|
1851
|
+
if (_timer)
|
|
1801
1852
|
{
|
|
1802
1853
|
_timer->updateObserver(_initData.observer);
|
|
1803
1854
|
}
|
|
1804
1855
|
}
|
|
1805
|
-
catch(const Ice::CommunicatorDestroyedException&)
|
|
1856
|
+
catch (const Ice::CommunicatorDestroyedException&)
|
|
1806
1857
|
{
|
|
1807
1858
|
}
|
|
1808
1859
|
}
|
|
1809
1860
|
|
|
1810
1861
|
BufSizeWarnInfo
|
|
1811
|
-
IceInternal::Instance::getBufSizeWarn(
|
|
1862
|
+
IceInternal::Instance::getBufSizeWarn(int16_t type)
|
|
1812
1863
|
{
|
|
1813
|
-
|
|
1864
|
+
lock_guard lock(_setBufSizeWarnMutex);
|
|
1814
1865
|
|
|
1815
1866
|
return getBufSizeWarnInternal(type);
|
|
1816
1867
|
}
|
|
1817
1868
|
|
|
1818
1869
|
BufSizeWarnInfo
|
|
1819
|
-
IceInternal::Instance::getBufSizeWarnInternal(
|
|
1870
|
+
IceInternal::Instance::getBufSizeWarnInternal(int16_t type)
|
|
1820
1871
|
{
|
|
1821
1872
|
BufSizeWarnInfo info;
|
|
1822
|
-
|
|
1823
|
-
if(p == _setBufSizeWarn.end())
|
|
1873
|
+
auto p = _setBufSizeWarn.find(type);
|
|
1874
|
+
if (p == _setBufSizeWarn.end())
|
|
1824
1875
|
{
|
|
1825
1876
|
info.sndWarn = false;
|
|
1826
1877
|
info.sndSize = -1;
|
|
@@ -1835,108 +1886,50 @@ IceInternal::Instance::getBufSizeWarnInternal(Short type)
|
|
|
1835
1886
|
return info;
|
|
1836
1887
|
}
|
|
1837
1888
|
|
|
1889
|
+
ConnectionOptions
|
|
1890
|
+
IceInternal::Instance::readConnectionOptions(const string& propertyPrefix) const
|
|
1891
|
+
{
|
|
1892
|
+
const PropertiesPtr& properties = _initData.properties;
|
|
1893
|
+
ConnectionOptions connectionOptions;
|
|
1894
|
+
|
|
1895
|
+
connectionOptions.connectTimeout =
|
|
1896
|
+
chrono::seconds(properties->getIcePropertyAsInt(propertyPrefix + ".ConnectTimeout"));
|
|
1897
|
+
|
|
1898
|
+
connectionOptions.closeTimeout = chrono::seconds(properties->getIcePropertyAsInt(propertyPrefix + ".CloseTimeout"));
|
|
1899
|
+
connectionOptions.idleTimeout = chrono::seconds(properties->getIcePropertyAsInt(propertyPrefix + ".IdleTimeout"));
|
|
1900
|
+
connectionOptions.enableIdleCheck = properties->getIcePropertyAsInt(propertyPrefix + ".EnableIdleCheck") > 0;
|
|
1901
|
+
|
|
1902
|
+
connectionOptions.inactivityTimeout =
|
|
1903
|
+
chrono::seconds(properties->getIcePropertyAsInt(propertyPrefix + ".InactivityTimeout"));
|
|
1904
|
+
|
|
1905
|
+
connectionOptions.maxDispatches = properties->getIcePropertyAsInt(propertyPrefix + ".MaxDispatches");
|
|
1906
|
+
|
|
1907
|
+
return connectionOptions;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1838
1910
|
void
|
|
1839
|
-
IceInternal::Instance::setSndBufSizeWarn(
|
|
1911
|
+
IceInternal::Instance::setSndBufSizeWarn(int16_t type, int size)
|
|
1840
1912
|
{
|
|
1841
|
-
|
|
1913
|
+
lock_guard lock(_setBufSizeWarnMutex);
|
|
1842
1914
|
|
|
1843
1915
|
BufSizeWarnInfo info = getBufSizeWarnInternal(type);
|
|
1844
1916
|
info.sndWarn = true;
|
|
1845
1917
|
info.sndSize = size;
|
|
1846
|
-
_setBufSizeWarn[type] =
|
|
1918
|
+
_setBufSizeWarn[type] = info;
|
|
1847
1919
|
}
|
|
1848
1920
|
|
|
1849
1921
|
void
|
|
1850
|
-
IceInternal::Instance::setRcvBufSizeWarn(
|
|
1922
|
+
IceInternal::Instance::setRcvBufSizeWarn(int16_t type, int size)
|
|
1851
1923
|
{
|
|
1852
|
-
|
|
1924
|
+
lock_guard lock(_setBufSizeWarnMutex);
|
|
1853
1925
|
|
|
1854
1926
|
BufSizeWarnInfo info = getBufSizeWarnInternal(type);
|
|
1855
1927
|
info.rcvWarn = true;
|
|
1856
1928
|
info.rcvSize = size;
|
|
1857
|
-
_setBufSizeWarn[type] =
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
void
|
|
1861
|
-
IceInternal::Instance::addObjectFactory(const Ice::ObjectFactoryPtr& factory, const string& id)
|
|
1862
|
-
{
|
|
1863
|
-
Lock sync(*this);
|
|
1864
|
-
|
|
1865
|
-
//
|
|
1866
|
-
// Create a ValueFactory wrapper around the given ObjectFactory and register the wrapper
|
|
1867
|
-
// with the value factory manager. This may raise AlreadyRegisteredException.
|
|
1868
|
-
//
|
|
1869
|
-
#ifdef ICE_CPP11_MAPPING
|
|
1870
|
-
_initData.valueFactoryManager->add([factory](const string& ident)
|
|
1871
|
-
{
|
|
1872
|
-
return factory->create(ident);
|
|
1873
|
-
},
|
|
1874
|
-
id);
|
|
1875
|
-
#else
|
|
1876
|
-
class ValueFactoryWrapper: public Ice::ValueFactory
|
|
1877
|
-
{
|
|
1878
|
-
public:
|
|
1879
|
-
|
|
1880
|
-
ValueFactoryWrapper(const Ice::ObjectFactoryPtr& factory) : _objectFactory(factory)
|
|
1881
|
-
{
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
Ice::ValuePtr create(const std::string& id)
|
|
1885
|
-
{
|
|
1886
|
-
return _objectFactory->create(id);
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
private:
|
|
1890
|
-
|
|
1891
|
-
Ice::ObjectFactoryPtr _objectFactory;
|
|
1892
|
-
};
|
|
1893
|
-
|
|
1894
|
-
_initData.valueFactoryManager->add(new ValueFactoryWrapper(factory), id);
|
|
1895
|
-
#endif
|
|
1896
|
-
|
|
1897
|
-
//
|
|
1898
|
-
// Also record the object factory in our own map.
|
|
1899
|
-
//
|
|
1900
|
-
_objectFactoryMapHint = _objectFactoryMap.insert(_objectFactoryMapHint,
|
|
1901
|
-
pair<const string, Ice::ObjectFactoryPtr>(id, factory));
|
|
1902
|
-
}
|
|
1903
|
-
|
|
1904
|
-
Ice::ObjectFactoryPtr
|
|
1905
|
-
IceInternal::Instance::findObjectFactory(const string& id) const
|
|
1906
|
-
{
|
|
1907
|
-
Lock sync(*this);
|
|
1908
|
-
|
|
1909
|
-
ObjectFactoryMap& objectfactoryMap = const_cast<ObjectFactoryMap&>(_objectFactoryMap);
|
|
1910
|
-
|
|
1911
|
-
ObjectFactoryMap::iterator p = objectfactoryMap.end();
|
|
1912
|
-
if(_objectFactoryMapHint != objectfactoryMap.end())
|
|
1913
|
-
{
|
|
1914
|
-
if(_objectFactoryMapHint->first == id)
|
|
1915
|
-
{
|
|
1916
|
-
p = _objectFactoryMapHint;
|
|
1917
|
-
}
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
if(p == objectfactoryMap.end())
|
|
1921
|
-
{
|
|
1922
|
-
p = objectfactoryMap.find(id);
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
if(p != objectfactoryMap.end())
|
|
1926
|
-
{
|
|
1927
|
-
_objectFactoryMapHint = p;
|
|
1928
|
-
return p->second;
|
|
1929
|
-
}
|
|
1930
|
-
else
|
|
1931
|
-
{
|
|
1932
|
-
return ICE_NULLPTR;
|
|
1933
|
-
}
|
|
1929
|
+
_setBufSizeWarn[type] = info;
|
|
1934
1930
|
}
|
|
1935
1931
|
|
|
1936
|
-
IceInternal::ProcessI::ProcessI(
|
|
1937
|
-
_communicator(communicator)
|
|
1938
|
-
{
|
|
1939
|
-
}
|
|
1932
|
+
IceInternal::ProcessI::ProcessI(CommunicatorPtr communicator) : _communicator(std::move(communicator)) {}
|
|
1940
1933
|
|
|
1941
1934
|
void
|
|
1942
1935
|
IceInternal::ProcessI::shutdown(const Current&)
|
|
@@ -1945,13 +1938,9 @@ IceInternal::ProcessI::shutdown(const Current&)
|
|
|
1945
1938
|
}
|
|
1946
1939
|
|
|
1947
1940
|
void
|
|
1948
|
-
|
|
1949
|
-
IceInternal::ProcessI::writeMessage(string message, Int fd, const Current&)
|
|
1950
|
-
#else
|
|
1951
|
-
IceInternal::ProcessI::writeMessage(const string& message, Int fd, const Current&)
|
|
1952
|
-
#endif
|
|
1941
|
+
IceInternal::ProcessI::writeMessage(string message, int32_t fd, const Current&)
|
|
1953
1942
|
{
|
|
1954
|
-
switch(fd)
|
|
1943
|
+
switch (fd)
|
|
1955
1944
|
{
|
|
1956
1945
|
case 1:
|
|
1957
1946
|
{
|