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.
Files changed (895) hide show
  1. checksums.yaml +4 -4
  2. data/dist/IceRuby/Communicator.cpp +159 -376
  3. data/dist/IceRuby/Communicator.h +8 -9
  4. data/dist/IceRuby/Config.h +23 -89
  5. data/dist/IceRuby/Connection.cpp +111 -219
  6. data/dist/IceRuby/Connection.h +8 -12
  7. data/dist/IceRuby/DefaultSliceLoader.cpp +45 -0
  8. data/dist/IceRuby/DefaultSliceLoader.h +25 -0
  9. data/dist/IceRuby/Endpoint.cpp +63 -65
  10. data/dist/IceRuby/Endpoint.h +7 -11
  11. data/dist/IceRuby/ImplicitContext.cpp +26 -31
  12. data/dist/IceRuby/ImplicitContext.h +6 -10
  13. data/dist/IceRuby/Init.cpp +27 -40
  14. data/dist/IceRuby/Logger.cpp +23 -28
  15. data/dist/IceRuby/Logger.h +8 -12
  16. data/dist/IceRuby/Operation.cpp +177 -219
  17. data/dist/IceRuby/Operation.h +15 -18
  18. data/dist/IceRuby/Properties.cpp +133 -89
  19. data/dist/IceRuby/Properties.h +6 -10
  20. data/dist/IceRuby/Proxy.cpp +179 -649
  21. data/dist/IceRuby/Proxy.h +11 -12
  22. data/dist/IceRuby/RubySliceLoader.cpp +39 -0
  23. data/dist/IceRuby/RubySliceLoader.h +27 -0
  24. data/dist/IceRuby/Slice.cpp +88 -94
  25. data/dist/IceRuby/Slice.h +3 -7
  26. data/dist/IceRuby/Types.cpp +987 -1190
  27. data/dist/IceRuby/Types.h +390 -461
  28. data/dist/IceRuby/Util.cpp +214 -473
  29. data/dist/IceRuby/Util.h +378 -479
  30. data/dist/ice/cpp/include/Ice/AsyncResponseHandler.h +85 -0
  31. data/dist/ice/cpp/include/Ice/BatchRequest.h +39 -0
  32. data/dist/ice/cpp/include/Ice/BatchRequestQueueF.h +4 -10
  33. data/dist/ice/cpp/include/Ice/Buffer.h +116 -111
  34. data/dist/ice/cpp/include/Ice/Communicator.h +411 -0
  35. data/dist/ice/cpp/include/Ice/CommunicatorF.h +16 -0
  36. data/dist/ice/cpp/include/Ice/Config.h +46 -62
  37. data/dist/ice/cpp/include/Ice/Connection.h +410 -0
  38. data/dist/ice/cpp/include/Ice/ConnectionF.h +36 -0
  39. data/dist/ice/cpp/include/Ice/ConnectionIF.h +6 -28
  40. data/dist/ice/cpp/include/Ice/CtrlCHandler.h +56 -0
  41. data/dist/ice/cpp/include/Ice/Current.h +60 -0
  42. data/dist/ice/cpp/include/Ice/DefaultSliceLoader.h +160 -0
  43. data/dist/ice/cpp/include/Ice/Demangle.h +17 -0
  44. data/dist/ice/cpp/include/Ice/Endpoint.h +298 -0
  45. data/dist/ice/cpp/include/Ice/EndpointF.h +44 -0
  46. data/dist/ice/cpp/include/Ice/EndpointSelectionType.h +21 -0
  47. data/dist/ice/cpp/include/Ice/Exception.h +46 -151
  48. data/dist/ice/cpp/include/Ice/FacetMap.h +16 -0
  49. data/dist/ice/cpp/include/Ice/Format.h +11 -27
  50. data/dist/ice/cpp/include/Ice/Ice.h +53 -48
  51. data/dist/ice/cpp/include/Ice/IconvStringConverter.h +165 -326
  52. data/dist/ice/cpp/include/Ice/ImplicitContext.h +76 -0
  53. data/dist/ice/cpp/include/Ice/IncomingRequest.h +75 -0
  54. data/dist/ice/cpp/include/Ice/Initialize.h +113 -927
  55. data/dist/ice/cpp/include/Ice/InputStream.h +748 -1320
  56. data/dist/ice/cpp/include/Ice/InstanceF.h +4 -10
  57. data/dist/ice/cpp/include/Ice/Instrumentation.h +319 -0
  58. data/dist/ice/cpp/include/Ice/LocalException.h +58 -0
  59. data/dist/ice/cpp/include/Ice/LocalExceptions.h +870 -0
  60. data/dist/ice/cpp/include/Ice/Logger.h +62 -0
  61. data/dist/ice/cpp/include/Ice/LoggerUtil.h +124 -147
  62. data/dist/ice/cpp/include/Ice/MarshaledResult.h +50 -0
  63. data/dist/ice/cpp/include/Ice/NativePropertiesAdmin.h +41 -71
  64. data/dist/ice/cpp/include/Ice/Object.h +151 -490
  65. data/dist/ice/cpp/include/Ice/ObjectAdapter.h +324 -0
  66. data/dist/ice/cpp/include/Ice/ObjectAdapterF.h +16 -0
  67. data/dist/ice/cpp/include/Ice/ObjectF.h +5 -19
  68. data/dist/ice/cpp/include/Ice/ObserverHelper.h +115 -132
  69. data/dist/ice/cpp/include/Ice/OutgoingAsync.h +392 -748
  70. data/dist/ice/cpp/include/Ice/OutgoingResponse.h +129 -0
  71. data/dist/ice/cpp/include/Ice/OutputStream.h +756 -956
  72. data/dist/ice/cpp/include/Ice/Plugin.h +73 -0
  73. data/dist/ice/cpp/include/Ice/PluginFactory.h +77 -0
  74. data/dist/ice/cpp/include/{IceUtil → Ice}/PopDisableWarnings.h +8 -6
  75. data/dist/ice/cpp/include/Ice/Properties.h +307 -0
  76. data/dist/ice/cpp/include/Ice/PropertiesF.h +19 -0
  77. data/dist/ice/cpp/include/Ice/Proxy.h +665 -5094
  78. data/dist/ice/cpp/include/Ice/ProxyF.h +2 -44
  79. data/dist/ice/cpp/include/Ice/ProxyFunctions.h +209 -0
  80. data/dist/ice/cpp/include/Ice/PushDisableWarnings.h +29 -0
  81. data/dist/ice/cpp/include/Ice/ReferenceF.h +4 -19
  82. data/dist/ice/cpp/include/Ice/RequestHandlerF.h +8 -18
  83. data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +276 -0
  84. data/dist/ice/cpp/include/Ice/SSL/Config.h +54 -0
  85. data/dist/ice/cpp/include/Ice/SSL/ConnectionInfo.h +107 -0
  86. data/dist/ice/cpp/include/Ice/SSL/ConnectionInfoF.h +39 -0
  87. data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +40 -0
  88. data/dist/ice/cpp/include/Ice/SSL/SSLException.h +32 -0
  89. data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +286 -0
  90. data/dist/ice/cpp/include/Ice/ServantLocator.h +51 -0
  91. data/dist/ice/cpp/include/Ice/Service.h +182 -342
  92. data/dist/ice/cpp/include/Ice/SliceLoader.h +67 -0
  93. data/dist/ice/cpp/include/Ice/SlicedData.h +113 -160
  94. data/dist/ice/cpp/include/Ice/SlicedDataF.h +17 -27
  95. data/dist/ice/cpp/include/Ice/StreamHelpers.h +532 -1070
  96. data/dist/ice/cpp/include/Ice/StreamableTraits.h +291 -0
  97. data/dist/ice/cpp/include/Ice/StringConverter.h +152 -63
  98. data/dist/ice/cpp/include/Ice/StringUtil.h +114 -0
  99. data/dist/ice/cpp/include/Ice/TimerTask.h +24 -0
  100. data/dist/ice/cpp/include/Ice/TupleCompare.h +103 -0
  101. data/dist/ice/cpp/include/Ice/UUID.h +6 -9
  102. data/dist/ice/cpp/include/Ice/UserException.h +46 -0
  103. data/dist/ice/cpp/include/Ice/UserExceptionFactory.h +4 -79
  104. data/dist/ice/cpp/include/Ice/Value.h +103 -115
  105. data/dist/ice/cpp/include/Ice/ValueF.h +6 -11
  106. data/dist/ice/cpp/include/IceDiscovery/IceDiscovery.h +16 -1877
  107. data/dist/ice/cpp/include/IceLocatorDiscovery/IceLocatorDiscovery.h +16 -1185
  108. data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +46 -146
  109. data/dist/ice/cpp/include/generated/Ice/Context.h +40 -0
  110. data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +49 -93
  111. data/dist/ice/cpp/include/generated/Ice/Identity.h +70 -226
  112. data/dist/ice/cpp/include/generated/Ice/Locator.h +494 -3850
  113. data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +443 -0
  114. data/dist/ice/cpp/include/generated/Ice/Metrics.h +937 -4603
  115. data/dist/ice/cpp/include/generated/Ice/OperationMode.h +73 -0
  116. data/dist/ice/cpp/include/generated/Ice/Process.h +197 -929
  117. data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +249 -1301
  118. data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +39 -0
  119. data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +637 -2620
  120. data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +94 -0
  121. data/dist/ice/cpp/include/generated/Ice/Router.h +429 -1783
  122. data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +18 -65
  123. data/dist/ice/cpp/include/generated/Ice/Version.h +73 -318
  124. data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +498 -0
  125. data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +387 -0
  126. data/dist/ice/cpp/src/Ice/Acceptor.h +28 -24
  127. data/dist/ice/cpp/src/Ice/AcceptorF.h +6 -14
  128. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories.h +16 -0
  129. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +43 -0
  130. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_min.cpp +17 -0
  131. data/dist/ice/cpp/src/Ice/ArgVector.cpp +17 -18
  132. data/dist/ice/cpp/src/Ice/ArgVector.h +19 -25
  133. data/dist/ice/cpp/src/Ice/Base64.cpp +66 -66
  134. data/dist/ice/cpp/src/Ice/Base64.h +14 -19
  135. data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +70 -121
  136. data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +37 -47
  137. data/dist/ice/cpp/src/Ice/Buffer.cpp +73 -41
  138. data/dist/ice/cpp/src/Ice/CheckIdentity.h +21 -0
  139. data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +215 -249
  140. data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +38 -60
  141. data/dist/ice/cpp/src/Ice/Communicator.cpp +399 -0
  142. data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +140 -0
  143. data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.h +39 -0
  144. data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +63 -184
  145. data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +30 -51
  146. data/dist/ice/cpp/src/Ice/ConnectRequestHandlerF.h +4 -14
  147. data/dist/ice/cpp/src/Ice/Connection.cpp +44 -0
  148. data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +578 -792
  149. data/dist/ice/cpp/src/Ice/ConnectionFactory.h +200 -200
  150. data/dist/ice/cpp/src/Ice/ConnectionFactoryF.h +6 -19
  151. data/dist/ice/cpp/src/Ice/ConnectionI.cpp +1674 -1782
  152. data/dist/ice/cpp/src/Ice/ConnectionI.h +333 -293
  153. data/dist/ice/cpp/src/Ice/ConnectionOptions.h +22 -0
  154. data/dist/ice/cpp/src/Ice/Connector.h +25 -19
  155. data/dist/ice/cpp/src/Ice/ConnectorF.h +4 -11
  156. data/dist/ice/cpp/src/{IceUtil → Ice}/ConsoleUtil.cpp +32 -53
  157. data/dist/ice/cpp/src/Ice/ConsoleUtil.h +79 -0
  158. data/dist/ice/cpp/src/Ice/CtrlCHandler.cpp +189 -0
  159. data/dist/ice/cpp/src/Ice/Current.cpp +29 -0
  160. data/dist/ice/cpp/src/Ice/DLLMain.cpp +25 -35
  161. data/dist/ice/cpp/src/Ice/DefaultSliceLoader.cpp +39 -0
  162. data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +41 -119
  163. data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.h +27 -41
  164. data/dist/ice/cpp/src/Ice/DefaultsAndOverridesF.h +4 -11
  165. data/dist/ice/cpp/src/Ice/Demangle.cpp +26 -0
  166. data/dist/ice/cpp/src/Ice/DisableWarnings.h +31 -0
  167. data/dist/ice/cpp/src/Ice/DynamicLibrary.cpp +44 -112
  168. data/dist/ice/cpp/src/Ice/DynamicLibrary.h +91 -0
  169. data/dist/ice/cpp/src/Ice/Endian.h +40 -0
  170. data/dist/ice/cpp/src/Ice/EndpointFactory.cpp +35 -59
  171. data/dist/ice/cpp/src/Ice/EndpointFactory.h +82 -103
  172. data/dist/ice/cpp/src/Ice/EndpointFactoryF.h +4 -11
  173. data/dist/ice/cpp/src/Ice/EndpointFactoryManager.cpp +54 -87
  174. data/dist/ice/cpp/src/Ice/EndpointFactoryManager.h +28 -33
  175. data/dist/ice/cpp/src/Ice/EndpointFactoryManagerF.h +4 -11
  176. data/dist/ice/cpp/src/Ice/EndpointI.cpp +53 -23
  177. data/dist/ice/cpp/src/Ice/EndpointI.h +132 -200
  178. data/dist/ice/cpp/src/Ice/EndpointIF.h +11 -39
  179. data/dist/ice/cpp/src/Ice/EventHandler.cpp +3 -26
  180. data/dist/ice/cpp/src/Ice/EventHandler.h +46 -56
  181. data/dist/ice/cpp/src/Ice/EventHandlerF.h +4 -14
  182. data/dist/ice/cpp/src/Ice/Exception.cpp +3 -816
  183. data/dist/ice/cpp/src/Ice/FileUtil.cpp +476 -0
  184. data/dist/ice/cpp/src/Ice/FileUtil.h +152 -0
  185. data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +34 -0
  186. data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +29 -0
  187. data/dist/ice/cpp/src/Ice/HashUtil.h +46 -32
  188. data/dist/ice/cpp/src/Ice/HttpParser.cpp +431 -431
  189. data/dist/ice/cpp/src/Ice/HttpParser.h +95 -100
  190. data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +207 -324
  191. data/dist/ice/cpp/src/Ice/IPEndpointI.h +80 -126
  192. data/dist/ice/cpp/src/Ice/IPEndpointIF.h +6 -17
  193. data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +172 -0
  194. data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.h +89 -0
  195. data/dist/ice/cpp/src/Ice/ImplicitContext.cpp +109 -0
  196. data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +66 -0
  197. data/dist/ice/cpp/src/Ice/Initialize.cpp +48 -542
  198. data/dist/ice/cpp/src/Ice/InputStream.cpp +848 -1385
  199. data/dist/ice/cpp/src/Ice/Instance.cpp +816 -827
  200. data/dist/ice/cpp/src/Ice/Instance.h +202 -212
  201. data/dist/ice/cpp/src/Ice/InstrumentationI.cpp +526 -661
  202. data/dist/ice/cpp/src/Ice/InstrumentationI.h +171 -192
  203. data/dist/ice/cpp/src/Ice/LocalException.cpp +518 -0
  204. data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +577 -0
  205. data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +291 -329
  206. data/dist/ice/cpp/src/Ice/LocatorInfo.h +144 -157
  207. data/dist/ice/cpp/src/Ice/LocatorInfoF.h +8 -17
  208. data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +561 -743
  209. data/dist/ice/cpp/src/Ice/LoggerAdminI.h +18 -28
  210. data/dist/ice/cpp/src/Ice/LoggerI.cpp +66 -91
  211. data/dist/ice/cpp/src/Ice/LoggerI.h +36 -41
  212. data/dist/ice/cpp/src/Ice/LoggerMiddleware.cpp +176 -0
  213. data/dist/ice/cpp/src/Ice/LoggerMiddleware.h +42 -0
  214. data/dist/ice/cpp/src/Ice/LoggerUtil.cpp +14 -38
  215. data/dist/ice/cpp/src/Ice/MarshaledResult.cpp +20 -0
  216. data/dist/ice/cpp/src/Ice/MetricsAdminI.cpp +194 -280
  217. data/dist/ice/cpp/src/Ice/MetricsAdminI.h +600 -0
  218. data/dist/ice/cpp/src/Ice/MetricsFunctional.h +92 -0
  219. data/dist/ice/cpp/src/Ice/MetricsObserverI.h +587 -0
  220. data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +185 -0
  221. data/dist/ice/cpp/src/Ice/Network.cpp +595 -917
  222. data/dist/ice/cpp/src/Ice/Network.h +189 -213
  223. data/dist/ice/cpp/src/Ice/NetworkF.h +2 -10
  224. data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +99 -104
  225. data/dist/ice/cpp/src/Ice/NetworkProxy.h +49 -54
  226. data/dist/ice/cpp/src/Ice/NetworkProxyF.h +4 -11
  227. data/dist/ice/cpp/src/Ice/OSLogLoggerI.cpp +16 -18
  228. data/dist/ice/cpp/src/Ice/OSLogLoggerI.h +22 -27
  229. data/dist/ice/cpp/src/Ice/Object.cpp +152 -338
  230. data/dist/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +170 -113
  231. data/dist/ice/cpp/src/Ice/ObjectAdapterFactory.h +41 -41
  232. data/dist/ice/cpp/src/Ice/ObjectAdapterFactoryF.h +4 -15
  233. data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +580 -727
  234. data/dist/ice/cpp/src/Ice/ObjectAdapterI.h +149 -145
  235. data/dist/ice/cpp/src/Ice/ObserverHelper.cpp +36 -17
  236. data/dist/ice/cpp/src/Ice/ObserverMiddleware.cpp +96 -0
  237. data/dist/ice/cpp/src/Ice/ObserverMiddleware.h +25 -0
  238. data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +147 -187
  239. data/dist/ice/cpp/src/Ice/OpaqueEndpointI.h +56 -64
  240. data/dist/ice/cpp/src/{IceUtil → Ice}/Options.cpp +187 -258
  241. data/dist/ice/cpp/src/Ice/Options.h +119 -0
  242. data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +516 -732
  243. data/dist/ice/cpp/src/Ice/OutgoingResponse.cpp +276 -0
  244. data/dist/ice/cpp/src/Ice/OutputStream.cpp +610 -543
  245. data/dist/ice/cpp/src/Ice/OutputUtil.cpp +344 -0
  246. data/dist/ice/cpp/src/Ice/OutputUtil.h +173 -0
  247. data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +118 -277
  248. data/dist/ice/cpp/src/Ice/PluginManagerI.h +41 -48
  249. data/dist/ice/cpp/src/Ice/Properties.cpp +931 -0
  250. data/dist/ice/cpp/src/Ice/PropertyNames.cpp +519 -1341
  251. data/dist/ice/cpp/src/Ice/PropertyNames.h +49 -64
  252. data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +103 -0
  253. data/dist/ice/cpp/src/Ice/PropertyUtil.h +31 -0
  254. data/dist/ice/cpp/src/Ice/Protocol.cpp +129 -94
  255. data/dist/ice/cpp/src/Ice/Protocol.h +116 -0
  256. data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +117 -62
  257. data/dist/ice/cpp/src/Ice/ProtocolInstance.h +63 -82
  258. data/dist/ice/cpp/src/Ice/ProtocolInstanceF.h +4 -11
  259. data/dist/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +10 -32
  260. data/dist/ice/cpp/src/Ice/ProtocolPluginFacade.h +25 -54
  261. data/dist/ice/cpp/src/Ice/Proxy.cpp +294 -1357
  262. data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +684 -0
  263. data/dist/ice/cpp/src/Ice/ProxyFunctions.cpp +90 -0
  264. data/dist/ice/cpp/src/Ice/PushDisableDeprecatedWarnings.h +15 -0
  265. data/dist/ice/cpp/src/Ice/Random.cpp +29 -0
  266. data/dist/ice/cpp/src/Ice/Random.h +23 -0
  267. data/dist/ice/cpp/src/Ice/Reference.cpp +635 -1097
  268. data/dist/ice/cpp/src/Ice/Reference.h +314 -298
  269. data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +320 -378
  270. data/dist/ice/cpp/src/Ice/ReferenceFactory.h +48 -66
  271. data/dist/ice/cpp/src/Ice/ReferenceFactoryF.h +4 -9
  272. data/dist/ice/cpp/src/Ice/RequestHandler.cpp +15 -24
  273. data/dist/ice/cpp/src/Ice/RequestHandler.h +43 -68
  274. data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +76 -0
  275. data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +33 -0
  276. data/dist/ice/cpp/src/Ice/ResourceConfig.h +27 -0
  277. data/dist/ice/cpp/src/Ice/RetryQueue.cpp +51 -57
  278. data/dist/ice/cpp/src/Ice/RetryQueue.h +39 -46
  279. data/dist/ice/cpp/src/Ice/RetryQueueF.h +4 -9
  280. data/dist/ice/cpp/src/Ice/RouterInfo.cpp +97 -201
  281. data/dist/ice/cpp/src/Ice/RouterInfo.h +61 -118
  282. data/dist/ice/cpp/src/Ice/RouterInfoF.h +6 -14
  283. data/dist/ice/cpp/src/Ice/SHA1.cpp +86 -60
  284. data/dist/ice/cpp/src/Ice/SHA1.h +35 -0
  285. data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +89 -0
  286. data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +87 -0
  287. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +521 -0
  288. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.h +40 -0
  289. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngineF.h +13 -0
  290. data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +646 -0
  291. data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +80 -0
  292. data/dist/ice/cpp/src/{IceSSL → Ice/SSL}/RFC2253.cpp +85 -88
  293. data/dist/ice/cpp/src/Ice/SSL/RFC2253.h +58 -0
  294. data/dist/ice/cpp/src/Ice/SSL/SSLAcceptorI.cpp +124 -0
  295. data/dist/ice/cpp/src/Ice/SSL/SSLAcceptorI.h +52 -0
  296. data/dist/ice/cpp/src/Ice/SSL/SSLConnectorI.cpp +92 -0
  297. data/dist/ice/cpp/src/Ice/SSL/SSLConnectorI.h +38 -0
  298. data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.cpp +377 -0
  299. data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.h +84 -0
  300. data/dist/ice/cpp/src/Ice/SSL/SSLEngine.cpp +115 -0
  301. data/dist/ice/cpp/src/Ice/SSL/SSLEngine.h +69 -0
  302. data/dist/ice/cpp/src/Ice/SSL/SSLEngineF.h +14 -0
  303. data/dist/ice/cpp/src/Ice/SSL/SSLException.cpp +18 -0
  304. data/dist/ice/cpp/src/Ice/SSL/SSLInstance.cpp +27 -0
  305. data/dist/ice/cpp/src/Ice/SSL/SSLInstance.h +26 -0
  306. data/dist/ice/cpp/src/Ice/SSL/SSLInstanceF.h +19 -0
  307. data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +673 -0
  308. data/dist/ice/cpp/src/Ice/SSL/SSLUtil.h +118 -0
  309. data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +1449 -0
  310. data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.h +58 -0
  311. data/dist/ice/cpp/src/Ice/SSL/SchannelEngineF.h +18 -0
  312. data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +1088 -0
  313. data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +118 -0
  314. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +825 -0
  315. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.h +44 -0
  316. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngineF.h +18 -0
  317. data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +621 -0
  318. data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.h +91 -0
  319. data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +1048 -0
  320. data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +40 -0
  321. data/dist/ice/cpp/src/Ice/SSL/TrustManager.cpp +233 -0
  322. data/dist/ice/cpp/src/Ice/SSL/TrustManager.h +42 -0
  323. data/dist/ice/cpp/src/Ice/SSL/TrustManagerF.h +14 -0
  324. data/dist/ice/cpp/src/Ice/ScannerConfig.h +35 -0
  325. data/dist/ice/cpp/src/Ice/Selector.cpp +341 -606
  326. data/dist/ice/cpp/src/Ice/Selector.h +167 -224
  327. data/dist/ice/cpp/src/Ice/ServantManager.cpp +195 -128
  328. data/dist/ice/cpp/src/Ice/ServantManager.h +52 -55
  329. data/dist/ice/cpp/src/Ice/ServantManagerF.h +14 -0
  330. data/dist/ice/cpp/src/Ice/Service.cpp +548 -641
  331. data/dist/ice/cpp/src/Ice/SharedContext.h +13 -26
  332. data/dist/ice/cpp/src/Ice/SliceLoader.cpp +53 -0
  333. data/dist/ice/cpp/src/Ice/SlicedData.cpp +17 -96
  334. data/dist/ice/cpp/src/Ice/StreamSocket.cpp +104 -151
  335. data/dist/ice/cpp/src/Ice/StreamSocket.h +48 -60
  336. data/dist/ice/cpp/src/Ice/StringConverter.cpp +586 -0
  337. data/dist/ice/cpp/src/Ice/StringUtil.cpp +1137 -0
  338. data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +41 -47
  339. data/dist/ice/cpp/src/Ice/SysLoggerI.h +24 -27
  340. data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +16 -17
  341. data/dist/ice/cpp/src/Ice/SystemdJournalI.h +19 -25
  342. data/dist/ice/cpp/src/Ice/TargetCompare.h +96 -0
  343. data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +67 -88
  344. data/dist/ice/cpp/src/Ice/TcpAcceptor.h +34 -40
  345. data/dist/ice/cpp/src/Ice/TcpConnector.cpp +42 -41
  346. data/dist/ice/cpp/src/Ice/TcpConnector.h +26 -35
  347. data/dist/ice/cpp/src/Ice/TcpEndpointI.cpp +172 -146
  348. data/dist/ice/cpp/src/Ice/TcpEndpointI.h +76 -80
  349. data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +38 -26
  350. data/dist/ice/cpp/src/Ice/TcpTransceiver.h +40 -45
  351. data/dist/ice/cpp/src/Ice/ThreadPool.cpp +333 -515
  352. data/dist/ice/cpp/src/Ice/ThreadPool.h +202 -290
  353. data/dist/ice/cpp/src/Ice/ThreadPoolF.h +14 -0
  354. data/dist/ice/cpp/src/Ice/TimeUtil.cpp +47 -0
  355. data/dist/ice/cpp/src/Ice/TimeUtil.h +21 -0
  356. data/dist/ice/cpp/src/Ice/Timer.cpp +73 -167
  357. data/dist/ice/cpp/src/Ice/Timer.h +212 -0
  358. data/dist/ice/cpp/src/Ice/TraceLevels.cpp +11 -29
  359. data/dist/ice/cpp/src/Ice/TraceLevels.h +22 -28
  360. data/dist/ice/cpp/src/Ice/TraceLevelsF.h +4 -11
  361. data/dist/ice/cpp/src/Ice/TraceUtil.cpp +136 -215
  362. data/dist/ice/cpp/src/Ice/TraceUtil.h +27 -16
  363. data/dist/ice/cpp/src/Ice/Transceiver.cpp +3 -7
  364. data/dist/ice/cpp/src/Ice/Transceiver.h +35 -32
  365. data/dist/ice/cpp/src/Ice/TransceiverF.h +10 -20
  366. data/dist/ice/cpp/src/Ice/UUID.cpp +79 -0
  367. data/dist/ice/cpp/src/Ice/UdpConnector.cpp +39 -39
  368. data/dist/ice/cpp/src/Ice/UdpConnector.h +27 -36
  369. data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +178 -213
  370. data/dist/ice/cpp/src/Ice/UdpEndpointI.h +82 -85
  371. data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +201 -221
  372. data/dist/ice/cpp/src/Ice/UdpTransceiver.h +68 -74
  373. data/dist/ice/cpp/{include/IceUtil → src/Ice}/UndefSysMacros.h +12 -12
  374. data/dist/ice/cpp/src/Ice/UniqueRef.h +77 -0
  375. data/dist/ice/cpp/src/Ice/UserException.cpp +58 -0
  376. data/dist/ice/cpp/src/Ice/Value.cpp +107 -38
  377. data/dist/ice/cpp/src/Ice/WSAcceptor.cpp +10 -15
  378. data/dist/ice/cpp/src/Ice/WSAcceptor.h +31 -37
  379. data/dist/ice/cpp/src/Ice/WSConnector.cpp +25 -40
  380. data/dist/ice/cpp/src/Ice/WSConnector.h +26 -33
  381. data/dist/ice/cpp/src/Ice/WSEndpoint.cpp +164 -217
  382. data/dist/ice/cpp/src/Ice/WSEndpoint.h +72 -83
  383. data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +469 -458
  384. data/dist/ice/cpp/src/Ice/WSTransceiver.h +117 -123
  385. data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +20 -29
  386. data/dist/ice/cpp/src/Ice/generated/Context.cpp +40 -0
  387. data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +20 -31
  388. data/dist/ice/cpp/src/Ice/generated/Identity.cpp +24 -34
  389. data/dist/ice/cpp/src/Ice/generated/Locator.cpp +454 -1744
  390. data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +577 -0
  391. data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +824 -1971
  392. data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +56 -0
  393. data/dist/ice/cpp/src/Ice/generated/Process.cpp +190 -331
  394. data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +289 -449
  395. data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +40 -0
  396. data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +547 -867
  397. data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +70 -0
  398. data/dist/ice/cpp/src/Ice/generated/Router.cpp +406 -723
  399. data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +19 -29
  400. data/dist/ice/cpp/src/Ice/generated/Version.cpp +28 -31
  401. data/dist/ice/cpp/src/IceDiscovery/LocatorI.cpp +76 -139
  402. data/dist/ice/cpp/src/IceDiscovery/LocatorI.h +55 -96
  403. data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +190 -303
  404. data/dist/ice/cpp/src/IceDiscovery/LookupI.h +126 -185
  405. data/dist/ice/cpp/src/IceDiscovery/PluginI.cpp +56 -77
  406. data/dist/ice/cpp/src/IceDiscovery/PluginI.h +20 -25
  407. data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +638 -0
  408. data/dist/ice/cpp/src/IceLocatorDiscovery/Plugin.h +14 -37
  409. data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +411 -649
  410. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +468 -0
  411. data/dist/ice/cpp/src/Slice/DeprecationReporter.cpp +172 -0
  412. data/dist/ice/cpp/src/Slice/DeprecationReporter.h +14 -0
  413. data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +736 -0
  414. data/dist/ice/cpp/src/Slice/DocCommentParser.h +61 -0
  415. data/dist/ice/cpp/src/Slice/FileTracker.cpp +25 -75
  416. data/dist/ice/cpp/src/Slice/FileTracker.h +35 -56
  417. data/dist/ice/cpp/src/Slice/Grammar.cpp +2711 -3382
  418. data/dist/ice/cpp/src/Slice/Grammar.h +95 -75
  419. data/dist/ice/cpp/src/Slice/GrammarUtil.h +117 -217
  420. data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +486 -0
  421. data/dist/ice/cpp/src/Slice/MetadataValidation.h +106 -0
  422. data/dist/ice/cpp/src/Slice/Parser.cpp +3068 -5223
  423. data/dist/ice/cpp/src/Slice/Parser.h +1086 -1065
  424. data/dist/ice/cpp/src/Slice/Preprocessor.cpp +97 -599
  425. data/dist/ice/cpp/src/Slice/Preprocessor.h +26 -42
  426. data/dist/ice/cpp/src/Slice/Scanner.cpp +1562 -924
  427. data/dist/ice/cpp/src/Slice/SliceUtil.cpp +517 -113
  428. data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +254 -269
  429. data/dist/ice/cpp/src/Slice/Util.h +126 -35
  430. data/dist/ice/cpp/src/slice2rb/Main.cpp +13 -15
  431. data/dist/ice/cpp/src/slice2rb/Ruby.cpp +250 -0
  432. data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +1197 -0
  433. data/dist/ice/cpp/src/slice2rb/RubyUtil.h +56 -0
  434. data/dist/ice/slice/Glacier2/Metrics.ice +34 -75
  435. data/dist/ice/slice/Glacier2/PermissionsVerifier.ice +42 -98
  436. data/dist/ice/slice/Glacier2/Router.ice +80 -173
  437. data/dist/ice/slice/Glacier2/SSLInfo.ice +23 -40
  438. data/dist/ice/slice/Glacier2/Session.ice +120 -261
  439. data/dist/ice/slice/Ice/BuiltinSequences.ice +33 -38
  440. data/dist/ice/slice/Ice/Context.ice +24 -0
  441. data/dist/ice/slice/Ice/EndpointTypes.ice +35 -33
  442. data/dist/ice/slice/Ice/Identity.ice +24 -63
  443. data/dist/ice/slice/Ice/Locator.ice +61 -226
  444. data/dist/ice/slice/Ice/LocatorRegistry.ice +77 -0
  445. data/dist/ice/slice/Ice/Metrics.ice +189 -424
  446. data/dist/ice/slice/Ice/OperationMode.ice +38 -0
  447. data/dist/ice/slice/Ice/Process.ice +16 -52
  448. data/dist/ice/slice/Ice/PropertiesAdmin.ice +25 -75
  449. data/dist/ice/slice/Ice/PropertyDict.ice +23 -0
  450. data/dist/ice/slice/Ice/RemoteLogger.ice +113 -213
  451. data/dist/ice/slice/Ice/ReplyStatus.ice +65 -0
  452. data/dist/ice/slice/Ice/Router.ice +42 -91
  453. data/dist/ice/slice/Ice/SliceChecksumDict.ice +7 -25
  454. data/dist/ice/slice/Ice/Version.ice +31 -39
  455. data/dist/ice/slice/IceBox/ServiceManager.ice +79 -0
  456. data/dist/ice/slice/IceGrid/Admin.ice +942 -1918
  457. data/dist/ice/slice/IceGrid/Descriptor.ice +476 -1051
  458. data/dist/ice/slice/IceGrid/Exception.ice +86 -384
  459. data/dist/ice/slice/IceGrid/FileParser.ice +23 -59
  460. data/dist/ice/slice/IceGrid/Registry.ice +117 -256
  461. data/dist/ice/slice/IceGrid/Session.ice +46 -110
  462. data/dist/ice/slice/IceGrid/UserAccountMapper.ice +22 -57
  463. data/dist/ice/slice/IceStorm/IceStorm.ice +173 -401
  464. data/dist/ice/slice/IceStorm/Metrics.ice +28 -70
  465. data/dist/lib/Glacier2/Metrics.rb +16 -31
  466. data/dist/lib/Glacier2/PermissionsVerifier.rb +18 -50
  467. data/dist/lib/Glacier2/Router.rb +20 -42
  468. data/dist/lib/Glacier2/SSLInfo.rb +14 -22
  469. data/dist/lib/Glacier2/Session.rb +53 -113
  470. data/dist/lib/Glacier2.rb +6 -6
  471. data/dist/lib/Ice/BuiltinSequences.rb +14 -26
  472. data/dist/lib/Ice/CompressBatch.rb +50 -0
  473. data/dist/lib/Ice/Context.rb +12 -0
  474. data/dist/lib/Ice/EndpointSelectionType.rb +49 -0
  475. data/dist/lib/Ice/EndpointTypes.rb +14 -55
  476. data/dist/lib/Ice/Exception.rb +20 -0
  477. data/dist/lib/Ice/Identity.rb +10 -26
  478. data/dist/lib/Ice/IdentitySpaceship.rb +16 -0
  479. data/dist/lib/Ice/InitializationData.rb +12 -0
  480. data/dist/lib/Ice/LocalExceptions.rb +168 -0
  481. data/dist/lib/Ice/Locator.rb +21 -134
  482. data/dist/lib/Ice/LocatorRegistry.rb +73 -0
  483. data/dist/lib/Ice/Metrics.rb +85 -132
  484. data/dist/lib/Ice/OperationMode.rb +58 -0
  485. data/dist/lib/Ice/Process.rb +12 -31
  486. data/dist/lib/Ice/PropertiesAdmin.rb +12 -36
  487. data/dist/lib/Ice/PropertyDict.rb +12 -0
  488. data/dist/lib/Ice/Proxy.rb +85 -0
  489. data/dist/lib/Ice/ProxyFunctions.rb +69 -0
  490. data/dist/lib/Ice/RemoteLogger.rb +29 -60
  491. data/dist/lib/Ice/ReplyStatus.rb +65 -0
  492. data/dist/lib/Ice/Router.rb +19 -47
  493. data/dist/lib/Ice/SliceChecksumDict.rb +5 -17
  494. data/dist/lib/Ice/SliceUtil.rb +41 -0
  495. data/dist/lib/Ice/Struct.rb +11 -0
  496. data/dist/lib/Ice/ToStringMode.rb +50 -0
  497. data/dist/lib/Ice/Value.rb +93 -0
  498. data/dist/lib/Ice/Version.rb +12 -24
  499. data/dist/lib/Ice.rb +29 -665
  500. data/dist/lib/IceBox/ServiceManager.rb +104 -0
  501. data/dist/lib/IceBox.rb +2 -4
  502. data/dist/lib/IceGrid/Admin.rb +303 -291
  503. data/dist/lib/IceGrid/Descriptor.rb +147 -192
  504. data/dist/lib/IceGrid/Exception.rb +26 -257
  505. data/dist/lib/IceGrid/FileParser.rb +12 -36
  506. data/dist/lib/IceGrid/Registry.rb +35 -76
  507. data/dist/lib/IceGrid/Session.rb +19 -34
  508. data/dist/lib/IceGrid/UserAccountMapper.rb +11 -34
  509. data/dist/lib/IceGrid.rb +3 -3
  510. data/dist/lib/IceStorm/IceStorm.rb +51 -132
  511. data/dist/lib/IceStorm/Metrics.rb +19 -37
  512. data/dist/lib/IceStorm.rb +3 -5
  513. data/extconf.rb +6 -8
  514. data/ice.gemspec +3 -3
  515. data/scripts/slice2rb +1 -3
  516. metadata +206 -386
  517. data/dist/IceRuby/ValueFactoryManager.cpp +0 -445
  518. data/dist/IceRuby/ValueFactoryManager.h +0 -95
  519. data/dist/ice/cpp/include/Ice/Application.h +0 -326
  520. data/dist/ice/cpp/include/Ice/AsyncResult.h +0 -155
  521. data/dist/ice/cpp/include/Ice/AsyncResultF.h +0 -23
  522. data/dist/ice/cpp/include/Ice/BatchRequestInterceptor.h +0 -75
  523. data/dist/ice/cpp/include/Ice/CommunicatorAsync.h +0 -154
  524. data/dist/ice/cpp/include/Ice/Comparable.h +0 -205
  525. data/dist/ice/cpp/include/Ice/ConnectionAsync.h +0 -302
  526. data/dist/ice/cpp/include/Ice/ConsoleUtil.h +0 -23
  527. data/dist/ice/cpp/include/Ice/DefaultValueFactory.h +0 -57
  528. data/dist/ice/cpp/include/Ice/DispatchInterceptor.h +0 -41
  529. data/dist/ice/cpp/include/Ice/Dispatcher.h +0 -67
  530. data/dist/ice/cpp/include/Ice/DynamicLibrary.h +0 -102
  531. data/dist/ice/cpp/include/Ice/DynamicLibraryF.h +0 -24
  532. data/dist/ice/cpp/include/Ice/ExceptionHelpers.h +0 -74
  533. data/dist/ice/cpp/include/Ice/FactoryTable.h +0 -73
  534. data/dist/ice/cpp/include/Ice/FactoryTableInit.h +0 -84
  535. data/dist/ice/cpp/include/Ice/Functional.h +0 -140
  536. data/dist/ice/cpp/include/Ice/GCObject.h +0 -76
  537. data/dist/ice/cpp/include/Ice/Handle.h +0 -182
  538. data/dist/ice/cpp/include/Ice/Incoming.h +0 -225
  539. data/dist/ice/cpp/include/Ice/IncomingAsync.h +0 -186
  540. data/dist/ice/cpp/include/Ice/IncomingAsyncF.h +0 -36
  541. data/dist/ice/cpp/include/Ice/InterfaceByValue.h +0 -57
  542. data/dist/ice/cpp/include/Ice/LocalObject.h +0 -35
  543. data/dist/ice/cpp/include/Ice/LocalObjectF.h +0 -21
  544. data/dist/ice/cpp/include/Ice/MetricsAdminI.h +0 -715
  545. data/dist/ice/cpp/include/Ice/MetricsFunctional.h +0 -159
  546. data/dist/ice/cpp/include/Ice/MetricsObserverI.h +0 -669
  547. data/dist/ice/cpp/include/Ice/Optional.h +0 -1114
  548. data/dist/ice/cpp/include/Ice/OutgoingAsyncF.h +0 -39
  549. data/dist/ice/cpp/include/Ice/Protocol.h +0 -274
  550. data/dist/ice/cpp/include/Ice/ProxyFactoryF.h +0 -21
  551. data/dist/ice/cpp/include/Ice/ProxyHandle.h +0 -318
  552. data/dist/ice/cpp/include/Ice/RegisterPlugins.h +0 -127
  553. data/dist/ice/cpp/include/Ice/ResponseHandlerF.h +0 -25
  554. data/dist/ice/cpp/include/Ice/SHA1.h +0 -40
  555. data/dist/ice/cpp/include/Ice/ServantManagerF.h +0 -21
  556. data/dist/ice/cpp/include/Ice/SliceChecksums.h +0 -33
  557. data/dist/ice/cpp/include/Ice/ThreadPoolF.h +0 -23
  558. data/dist/ice/cpp/include/Ice/UniquePtr.h +0 -95
  559. data/dist/ice/cpp/include/Ice/UniqueRef.h +0 -97
  560. data/dist/ice/cpp/include/IceSSL/Config.h +0 -21
  561. data/dist/ice/cpp/include/IceSSL/IceSSL.h +0 -24
  562. data/dist/ice/cpp/include/IceSSL/OpenSSL.h +0 -147
  563. data/dist/ice/cpp/include/IceSSL/Plugin.h +0 -712
  564. data/dist/ice/cpp/include/IceSSL/SChannel.h +0 -72
  565. data/dist/ice/cpp/include/IceSSL/SecureTransport.h +0 -72
  566. data/dist/ice/cpp/include/IceUtil/Atomic.h +0 -179
  567. data/dist/ice/cpp/include/IceUtil/Cond.h +0 -317
  568. data/dist/ice/cpp/include/IceUtil/Config.h +0 -392
  569. data/dist/ice/cpp/include/IceUtil/ConsoleUtil.h +0 -92
  570. data/dist/ice/cpp/include/IceUtil/CountDownLatch.h +0 -45
  571. data/dist/ice/cpp/include/IceUtil/CtrlCHandler.h +0 -96
  572. data/dist/ice/cpp/include/IceUtil/DisableWarnings.h +0 -44
  573. data/dist/ice/cpp/include/IceUtil/Exception.h +0 -394
  574. data/dist/ice/cpp/include/IceUtil/FileUtil.h +0 -140
  575. data/dist/ice/cpp/include/IceUtil/Functional.h +0 -389
  576. data/dist/ice/cpp/include/IceUtil/Handle.h +0 -261
  577. data/dist/ice/cpp/include/IceUtil/IceUtil.h +0 -40
  578. data/dist/ice/cpp/include/IceUtil/InputUtil.h +0 -42
  579. data/dist/ice/cpp/include/IceUtil/Iterator.h +0 -31
  580. data/dist/ice/cpp/include/IceUtil/Lock.h +0 -128
  581. data/dist/ice/cpp/include/IceUtil/Monitor.h +0 -243
  582. data/dist/ice/cpp/include/IceUtil/Mutex.h +0 -349
  583. data/dist/ice/cpp/include/IceUtil/MutexProtocol.h +0 -23
  584. data/dist/ice/cpp/include/IceUtil/MutexPtrLock.h +0 -78
  585. data/dist/ice/cpp/include/IceUtil/MutexPtrTryLock.h +0 -77
  586. data/dist/ice/cpp/include/IceUtil/Optional.h +0 -433
  587. data/dist/ice/cpp/include/IceUtil/Options.h +0 -135
  588. data/dist/ice/cpp/include/IceUtil/OutputUtil.h +0 -383
  589. data/dist/ice/cpp/include/IceUtil/PushDisableWarnings.h +0 -33
  590. data/dist/ice/cpp/include/IceUtil/Random.h +0 -55
  591. data/dist/ice/cpp/include/IceUtil/RecMutex.h +0 -107
  592. data/dist/ice/cpp/include/IceUtil/ResourceConfig.h +0 -37
  593. data/dist/ice/cpp/include/IceUtil/ScannerConfig.h +0 -40
  594. data/dist/ice/cpp/include/IceUtil/ScopedArray.h +0 -98
  595. data/dist/ice/cpp/include/IceUtil/Shared.h +0 -127
  596. data/dist/ice/cpp/include/IceUtil/StopWatch.h +0 -49
  597. data/dist/ice/cpp/include/IceUtil/StringConverter.h +0 -195
  598. data/dist/ice/cpp/include/IceUtil/StringUtil.h +0 -97
  599. data/dist/ice/cpp/include/IceUtil/Thread.h +0 -160
  600. data/dist/ice/cpp/include/IceUtil/ThreadException.h +0 -94
  601. data/dist/ice/cpp/include/IceUtil/Time.h +0 -205
  602. data/dist/ice/cpp/include/IceUtil/Timer.h +0 -153
  603. data/dist/ice/cpp/include/IceUtil/UUID.h +0 -21
  604. data/dist/ice/cpp/include/generated/Glacier2/Metrics.h +0 -475
  605. data/dist/ice/cpp/include/generated/Glacier2/PermissionsVerifier.h +0 -1430
  606. data/dist/ice/cpp/include/generated/Glacier2/PermissionsVerifierF.h +0 -147
  607. data/dist/ice/cpp/include/generated/Glacier2/Router.h +0 -3260
  608. data/dist/ice/cpp/include/generated/Glacier2/RouterF.h +0 -125
  609. data/dist/ice/cpp/include/generated/Glacier2/SSLInfo.h +0 -223
  610. data/dist/ice/cpp/include/generated/Glacier2/Session.h +0 -5894
  611. data/dist/ice/cpp/include/generated/Ice/Communicator.h +0 -1162
  612. data/dist/ice/cpp/include/generated/Ice/CommunicatorF.h +0 -101
  613. data/dist/ice/cpp/include/generated/Ice/Connection.h +0 -1703
  614. data/dist/ice/cpp/include/generated/Ice/ConnectionF.h +0 -119
  615. data/dist/ice/cpp/include/generated/Ice/Current.h +0 -322
  616. data/dist/ice/cpp/include/generated/Ice/Endpoint.h +0 -979
  617. data/dist/ice/cpp/include/generated/Ice/EndpointF.h +0 -166
  618. data/dist/ice/cpp/include/generated/Ice/FacetMap.h +0 -80
  619. data/dist/ice/cpp/include/generated/Ice/ImplicitContext.h +0 -284
  620. data/dist/ice/cpp/include/generated/Ice/ImplicitContextF.h +0 -101
  621. data/dist/ice/cpp/include/generated/Ice/Instrumentation.h +0 -1203
  622. data/dist/ice/cpp/include/generated/Ice/InstrumentationF.h +0 -128
  623. data/dist/ice/cpp/include/generated/Ice/LocalException.h +0 -7437
  624. data/dist/ice/cpp/include/generated/Ice/LocatorF.h +0 -147
  625. data/dist/ice/cpp/include/generated/Ice/Logger.h +0 -237
  626. data/dist/ice/cpp/include/generated/Ice/LoggerF.h +0 -101
  627. data/dist/ice/cpp/include/generated/Ice/ObjectAdapter.h +0 -1181
  628. data/dist/ice/cpp/include/generated/Ice/ObjectAdapterF.h +0 -101
  629. data/dist/ice/cpp/include/generated/Ice/ObjectFactory.h +0 -203
  630. data/dist/ice/cpp/include/generated/Ice/Plugin.h +0 -318
  631. data/dist/ice/cpp/include/generated/Ice/PluginF.h +0 -110
  632. data/dist/ice/cpp/include/generated/Ice/ProcessF.h +0 -125
  633. data/dist/ice/cpp/include/generated/Ice/Properties.h +0 -452
  634. data/dist/ice/cpp/include/generated/Ice/PropertiesF.h +0 -134
  635. data/dist/ice/cpp/include/generated/Ice/RouterF.h +0 -125
  636. data/dist/ice/cpp/include/generated/Ice/ServantLocator.h +0 -305
  637. data/dist/ice/cpp/include/generated/Ice/ServantLocatorF.h +0 -101
  638. data/dist/ice/cpp/include/generated/Ice/ValueFactory.h +0 -330
  639. data/dist/ice/cpp/include/generated/IceBox/IceBox.h +0 -3269
  640. data/dist/ice/cpp/include/generated/IceGrid/Admin.h +0 -33773
  641. data/dist/ice/cpp/include/generated/IceGrid/Descriptor.h +0 -5254
  642. data/dist/ice/cpp/include/generated/IceGrid/Exception.h +0 -2834
  643. data/dist/ice/cpp/include/generated/IceGrid/FileParser.h +0 -824
  644. data/dist/ice/cpp/include/generated/IceGrid/PluginFacade.h +0 -635
  645. data/dist/ice/cpp/include/generated/IceGrid/Registry.h +0 -5089
  646. data/dist/ice/cpp/include/generated/IceGrid/Session.h +0 -2240
  647. data/dist/ice/cpp/include/generated/IceGrid/UserAccountMapper.h +0 -800
  648. data/dist/ice/cpp/include/generated/IcePatch2/FileInfo.h +0 -325
  649. data/dist/ice/cpp/include/generated/IcePatch2/FileServer.h +0 -2891
  650. data/dist/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +0 -228
  651. data/dist/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +0 -101
  652. data/dist/ice/cpp/include/generated/IceSSL/EndpointInfo.h +0 -186
  653. data/dist/ice/cpp/include/generated/IceStorm/IceStorm.h +0 -6627
  654. data/dist/ice/cpp/include/generated/IceStorm/Metrics.h +0 -665
  655. data/dist/ice/cpp/src/Ice/ACM.cpp +0 -380
  656. data/dist/ice/cpp/src/Ice/ACM.h +0 -119
  657. data/dist/ice/cpp/src/Ice/ACMF.h +0 -30
  658. data/dist/ice/cpp/src/Ice/Acceptor.cpp +0 -16
  659. data/dist/ice/cpp/src/Ice/Application.cpp +0 -661
  660. data/dist/ice/cpp/src/Ice/AsyncResult.cpp +0 -70
  661. data/dist/ice/cpp/src/Ice/CommunicatorI.cpp +0 -586
  662. data/dist/ice/cpp/src/Ice/CommunicatorI.h +0 -167
  663. data/dist/ice/cpp/src/Ice/Cond.cpp +0 -381
  664. data/dist/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +0 -73
  665. data/dist/ice/cpp/src/Ice/ConnectionRequestHandler.h +0 -41
  666. data/dist/ice/cpp/src/Ice/Connector.cpp +0 -16
  667. data/dist/ice/cpp/src/Ice/CountDownLatch.cpp +0 -171
  668. data/dist/ice/cpp/src/Ice/DispatchInterceptor.cpp +0 -37
  669. data/dist/ice/cpp/src/Ice/FactoryTable.cpp +0 -162
  670. data/dist/ice/cpp/src/Ice/FactoryTableInit.cpp +0 -88
  671. data/dist/ice/cpp/src/Ice/GCObject.cpp +0 -442
  672. data/dist/ice/cpp/src/Ice/IconvStringConverter.cpp +0 -51
  673. data/dist/ice/cpp/src/Ice/ImplicitContextI.cpp +0 -655
  674. data/dist/ice/cpp/src/Ice/ImplicitContextI.h +0 -48
  675. data/dist/ice/cpp/src/Ice/Incoming.cpp +0 -795
  676. data/dist/ice/cpp/src/Ice/IncomingAsync.cpp +0 -230
  677. data/dist/ice/cpp/src/Ice/IncomingRequest.h +0 -33
  678. data/dist/ice/cpp/src/Ice/LocalObject.cpp +0 -23
  679. data/dist/ice/cpp/src/Ice/MetricsObserverI.cpp +0 -8
  680. data/dist/ice/cpp/src/Ice/PropertiesAdminI.cpp +0 -265
  681. data/dist/ice/cpp/src/Ice/PropertiesAdminI.h +0 -64
  682. data/dist/ice/cpp/src/Ice/PropertiesI.cpp +0 -739
  683. data/dist/ice/cpp/src/Ice/PropertiesI.h +0 -70
  684. data/dist/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +0 -21
  685. data/dist/ice/cpp/src/Ice/ProxyFactory.cpp +0 -300
  686. data/dist/ice/cpp/src/Ice/ProxyFactory.h +0 -57
  687. data/dist/ice/cpp/src/Ice/RegisterPluginsInit.cpp +0 -38
  688. data/dist/ice/cpp/src/Ice/RegisterPluginsInit.h +0 -20
  689. data/dist/ice/cpp/src/Ice/ReplyStatus.h +0 -24
  690. data/dist/ice/cpp/src/Ice/RequestHandlerFactory.cpp +0 -77
  691. data/dist/ice/cpp/src/Ice/RequestHandlerFactory.h +0 -37
  692. data/dist/ice/cpp/src/Ice/ResponseHandler.cpp +0 -12
  693. data/dist/ice/cpp/src/Ice/ResponseHandler.h +0 -43
  694. data/dist/ice/cpp/src/Ice/SliceChecksums.cpp +0 -75
  695. data/dist/ice/cpp/src/Ice/StringConverterPlugin.cpp +0 -192
  696. data/dist/ice/cpp/src/Ice/StringUtil.h +0 -30
  697. data/dist/ice/cpp/src/Ice/Thread.cpp +0 -569
  698. data/dist/ice/cpp/src/Ice/ValueFactoryManagerI.cpp +0 -61
  699. data/dist/ice/cpp/src/Ice/ValueFactoryManagerI.h +0 -37
  700. data/dist/ice/cpp/src/Ice/VirtualShared.h +0 -38
  701. data/dist/ice/cpp/src/Ice/generated/Communicator.cpp +0 -79
  702. data/dist/ice/cpp/src/Ice/generated/CommunicatorF.cpp +0 -61
  703. data/dist/ice/cpp/src/Ice/generated/Connection.cpp +0 -155
  704. data/dist/ice/cpp/src/Ice/generated/ConnectionF.cpp +0 -61
  705. data/dist/ice/cpp/src/Ice/generated/Current.cpp +0 -62
  706. data/dist/ice/cpp/src/Ice/generated/Endpoint.cpp +0 -147
  707. data/dist/ice/cpp/src/Ice/generated/EndpointF.cpp +0 -61
  708. data/dist/ice/cpp/src/Ice/generated/FacetMap.cpp +0 -49
  709. data/dist/ice/cpp/src/Ice/generated/ImplicitContext.cpp +0 -75
  710. data/dist/ice/cpp/src/Ice/generated/ImplicitContextF.cpp +0 -61
  711. data/dist/ice/cpp/src/Ice/generated/Instrumentation.cpp +0 -188
  712. data/dist/ice/cpp/src/Ice/generated/InstrumentationF.cpp +0 -66
  713. data/dist/ice/cpp/src/Ice/generated/LocalException.cpp +0 -3262
  714. data/dist/ice/cpp/src/Ice/generated/LocatorF.cpp +0 -63
  715. data/dist/ice/cpp/src/Ice/generated/Logger.cpp +0 -73
  716. data/dist/ice/cpp/src/Ice/generated/LoggerF.cpp +0 -61
  717. data/dist/ice/cpp/src/Ice/generated/ObjectAdapter.cpp +0 -79
  718. data/dist/ice/cpp/src/Ice/generated/ObjectAdapterF.cpp +0 -61
  719. data/dist/ice/cpp/src/Ice/generated/ObjectFactory.cpp +0 -75
  720. data/dist/ice/cpp/src/Ice/generated/Plugin.cpp +0 -87
  721. data/dist/ice/cpp/src/Ice/generated/PluginF.cpp +0 -61
  722. data/dist/ice/cpp/src/Ice/generated/ProcessF.cpp +0 -63
  723. data/dist/ice/cpp/src/Ice/generated/Properties.cpp +0 -78
  724. data/dist/ice/cpp/src/Ice/generated/PropertiesF.cpp +0 -63
  725. data/dist/ice/cpp/src/Ice/generated/RouterF.cpp +0 -63
  726. data/dist/ice/cpp/src/Ice/generated/ServantLocator.cpp +0 -75
  727. data/dist/ice/cpp/src/Ice/generated/ServantLocatorF.cpp +0 -61
  728. data/dist/ice/cpp/src/Ice/generated/ValueFactory.cpp +0 -83
  729. data/dist/ice/cpp/src/Ice/ios/StreamAcceptor.cpp +0 -154
  730. data/dist/ice/cpp/src/Ice/ios/StreamAcceptor.h +0 -49
  731. data/dist/ice/cpp/src/Ice/ios/StreamConnector.cpp +0 -146
  732. data/dist/ice/cpp/src/Ice/ios/StreamConnector.h +0 -52
  733. data/dist/ice/cpp/src/Ice/ios/StreamEndpointI.cpp +0 -477
  734. data/dist/ice/cpp/src/Ice/ios/StreamEndpointI.h +0 -156
  735. data/dist/ice/cpp/src/Ice/ios/StreamTransceiver.cpp +0 -570
  736. data/dist/ice/cpp/src/Ice/ios/StreamTransceiver.h +0 -93
  737. data/dist/ice/cpp/src/IceDiscovery/generated/IceDiscovery/IceDiscovery.h +0 -1889
  738. data/dist/ice/cpp/src/IceDiscovery/generated/IceDiscovery.cpp +0 -915
  739. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/IceLocatorDiscovery/IceLocatorDiscovery.h +0 -1197
  740. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/IceLocatorDiscovery.cpp +0 -730
  741. data/dist/ice/cpp/src/IceSSL/AcceptorI.cpp +0 -105
  742. data/dist/ice/cpp/src/IceSSL/AcceptorI.h +0 -52
  743. data/dist/ice/cpp/src/IceSSL/CertificateI.cpp +0 -301
  744. data/dist/ice/cpp/src/IceSSL/CertificateI.h +0 -64
  745. data/dist/ice/cpp/src/IceSSL/ConnectorI.cpp +0 -102
  746. data/dist/ice/cpp/src/IceSSL/ConnectorI.h +0 -44
  747. data/dist/ice/cpp/src/IceSSL/EndpointI.cpp +0 -372
  748. data/dist/ice/cpp/src/IceSSL/EndpointI.h +0 -100
  749. data/dist/ice/cpp/src/IceSSL/Instance.cpp +0 -28
  750. data/dist/ice/cpp/src/IceSSL/Instance.h +0 -37
  751. data/dist/ice/cpp/src/IceSSL/InstanceF.h +0 -33
  752. data/dist/ice/cpp/src/IceSSL/OpenSSLCertificateI.cpp +0 -688
  753. data/dist/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +0 -1147
  754. data/dist/ice/cpp/src/IceSSL/OpenSSLEngine.h +0 -59
  755. data/dist/ice/cpp/src/IceSSL/OpenSSLEngineF.h +0 -27
  756. data/dist/ice/cpp/src/IceSSL/OpenSSLPluginI.cpp +0 -127
  757. data/dist/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +0 -1092
  758. data/dist/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +0 -90
  759. data/dist/ice/cpp/src/IceSSL/OpenSSLUtil.cpp +0 -288
  760. data/dist/ice/cpp/src/IceSSL/OpenSSLUtil.h +0 -58
  761. data/dist/ice/cpp/src/IceSSL/PluginI.cpp +0 -246
  762. data/dist/ice/cpp/src/IceSSL/PluginI.h +0 -67
  763. data/dist/ice/cpp/src/IceSSL/RFC2253.h +0 -62
  764. data/dist/ice/cpp/src/IceSSL/SChannelCertificateI.cpp +0 -721
  765. data/dist/ice/cpp/src/IceSSL/SChannelEngine.cpp +0 -1283
  766. data/dist/ice/cpp/src/IceSSL/SChannelEngine.h +0 -123
  767. data/dist/ice/cpp/src/IceSSL/SChannelEngineF.h +0 -31
  768. data/dist/ice/cpp/src/IceSSL/SChannelPluginI.cpp +0 -73
  769. data/dist/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +0 -1174
  770. data/dist/ice/cpp/src/IceSSL/SChannelTransceiverI.h +0 -133
  771. data/dist/ice/cpp/src/IceSSL/SSLEngine.cpp +0 -313
  772. data/dist/ice/cpp/src/IceSSL/SSLEngine.h +0 -100
  773. data/dist/ice/cpp/src/IceSSL/SSLEngineF.h +0 -21
  774. data/dist/ice/cpp/src/IceSSL/SecureTransportCertificateI.cpp +0 -999
  775. data/dist/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +0 -1308
  776. data/dist/ice/cpp/src/IceSSL/SecureTransportEngine.h +0 -59
  777. data/dist/ice/cpp/src/IceSSL/SecureTransportEngineF.h +0 -29
  778. data/dist/ice/cpp/src/IceSSL/SecureTransportPluginI.cpp +0 -75
  779. data/dist/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +0 -719
  780. data/dist/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +0 -92
  781. data/dist/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +0 -868
  782. data/dist/ice/cpp/src/IceSSL/SecureTransportUtil.h +0 -45
  783. data/dist/ice/cpp/src/IceSSL/TrustManager.cpp +0 -236
  784. data/dist/ice/cpp/src/IceSSL/TrustManager.h +0 -46
  785. data/dist/ice/cpp/src/IceSSL/TrustManagerF.h +0 -21
  786. data/dist/ice/cpp/src/IceSSL/Util.cpp +0 -192
  787. data/dist/ice/cpp/src/IceSSL/Util.h +0 -99
  788. data/dist/ice/cpp/src/IceSSL/generated/ConnectionInfo.cpp +0 -75
  789. data/dist/ice/cpp/src/IceSSL/generated/ConnectionInfoF.cpp +0 -61
  790. data/dist/ice/cpp/src/IceSSL/generated/EndpointInfo.cpp +0 -75
  791. data/dist/ice/cpp/src/IceUtil/ConvertUTF.cpp +0 -472
  792. data/dist/ice/cpp/src/IceUtil/ConvertUTF.h +0 -147
  793. data/dist/ice/cpp/src/IceUtil/CtrlCHandler.cpp +0 -259
  794. data/dist/ice/cpp/src/IceUtil/FileUtil.cpp +0 -471
  795. data/dist/ice/cpp/src/IceUtil/InputUtil.cpp +0 -36
  796. data/dist/ice/cpp/src/IceUtil/MutexProtocol.cpp +0 -19
  797. data/dist/ice/cpp/src/IceUtil/OutputUtil.cpp +0 -609
  798. data/dist/ice/cpp/src/IceUtil/Random.cpp +0 -180
  799. data/dist/ice/cpp/src/IceUtil/RecMutex.cpp +0 -238
  800. data/dist/ice/cpp/src/IceUtil/Shared.cpp +0 -71
  801. data/dist/ice/cpp/src/IceUtil/StringConverter.cpp +0 -690
  802. data/dist/ice/cpp/src/IceUtil/StringUtil.cpp +0 -1135
  803. data/dist/ice/cpp/src/IceUtil/ThreadException.cpp +0 -130
  804. data/dist/ice/cpp/src/IceUtil/Time.cpp +0 -307
  805. data/dist/ice/cpp/src/IceUtil/UUID.cpp +0 -165
  806. data/dist/ice/cpp/src/IceUtil/Unicode.cpp +0 -183
  807. data/dist/ice/cpp/src/IceUtil/Unicode.h +0 -43
  808. data/dist/ice/cpp/src/IceUtil/UtilException.cpp +0 -839
  809. data/dist/ice/cpp/src/Slice/CPlusPlusUtil.cpp +0 -1810
  810. data/dist/ice/cpp/src/Slice/CPlusPlusUtil.h +0 -72
  811. data/dist/ice/cpp/src/Slice/Checksum.cpp +0 -447
  812. data/dist/ice/cpp/src/Slice/Checksum.h +0 -21
  813. data/dist/ice/cpp/src/Slice/JavaUtil.cpp +0 -5183
  814. data/dist/ice/cpp/src/Slice/JavaUtil.h +0 -407
  815. data/dist/ice/cpp/src/Slice/MD5.cpp +0 -52
  816. data/dist/ice/cpp/src/Slice/MD5.h +0 -39
  817. data/dist/ice/cpp/src/Slice/MD5I.cpp +0 -393
  818. data/dist/ice/cpp/src/Slice/MD5I.h +0 -91
  819. data/dist/ice/cpp/src/Slice/PHPUtil.cpp +0 -157
  820. data/dist/ice/cpp/src/Slice/PHPUtil.h +0 -36
  821. data/dist/ice/cpp/src/Slice/Python.cpp +0 -830
  822. data/dist/ice/cpp/src/Slice/PythonUtil.cpp +0 -3439
  823. data/dist/ice/cpp/src/Slice/PythonUtil.h +0 -70
  824. data/dist/ice/cpp/src/Slice/Ruby.cpp +0 -350
  825. data/dist/ice/cpp/src/Slice/RubyUtil.cpp +0 -1571
  826. data/dist/ice/cpp/src/Slice/RubyUtil.h +0 -49
  827. data/dist/ice/slice/Glacier2/PermissionsVerifierF.ice +0 -30
  828. data/dist/ice/slice/Glacier2/RouterF.ice +0 -29
  829. data/dist/ice/slice/Ice/Communicator.ice +0 -676
  830. data/dist/ice/slice/Ice/CommunicatorF.ice +0 -31
  831. data/dist/ice/slice/Ice/Connection.ice +0 -516
  832. data/dist/ice/slice/Ice/ConnectionF.ice +0 -33
  833. data/dist/ice/slice/Ice/Current.ice +0 -170
  834. data/dist/ice/slice/Ice/Endpoint.ice +0 -291
  835. data/dist/ice/slice/Ice/EndpointF.ice +0 -43
  836. data/dist/ice/slice/Ice/FacetMap.ice +0 -36
  837. data/dist/ice/slice/Ice/ImplicitContext.ice +0 -119
  838. data/dist/ice/slice/Ice/ImplicitContextF.ice +0 -30
  839. data/dist/ice/slice/Ice/Instrumentation.ice +0 -509
  840. data/dist/ice/slice/Ice/InstrumentationF.ice +0 -38
  841. data/dist/ice/slice/Ice/LocalException.ice +0 -1040
  842. data/dist/ice/slice/Ice/LocatorF.ice +0 -32
  843. data/dist/ice/slice/Ice/Logger.ice +0 -99
  844. data/dist/ice/slice/Ice/LoggerF.ice +0 -31
  845. data/dist/ice/slice/Ice/ObjectAdapter.ice +0 -710
  846. data/dist/ice/slice/Ice/ObjectAdapterF.ice +0 -31
  847. data/dist/ice/slice/Ice/ObjectFactory.ice +0 -71
  848. data/dist/ice/slice/Ice/Plugin.ice +0 -131
  849. data/dist/ice/slice/Ice/PluginF.ice +0 -36
  850. data/dist/ice/slice/Ice/ProcessF.ice +0 -31
  851. data/dist/ice/slice/Ice/Properties.ice +0 -244
  852. data/dist/ice/slice/Ice/PropertiesF.ice +0 -32
  853. data/dist/ice/slice/Ice/RouterF.ice +0 -31
  854. data/dist/ice/slice/Ice/ServantLocator.ice +0 -136
  855. data/dist/ice/slice/Ice/ServantLocatorF.ice +0 -31
  856. data/dist/ice/slice/Ice/ValueFactory.ice +0 -133
  857. data/dist/ice/slice/IceBox/IceBox.ice +0 -216
  858. data/dist/ice/slice/IceGrid/PluginFacade.ice +0 -329
  859. data/dist/ice/slice/IcePatch2/FileInfo.ice +0 -85
  860. data/dist/ice/slice/IcePatch2/FileServer.ice +0 -191
  861. data/dist/lib/Glacier2/PermissionsVerifierF.rb +0 -30
  862. data/dist/lib/Glacier2/RouterF.rb +0 -25
  863. data/dist/lib/Ice/Communicator.rb +0 -87
  864. data/dist/lib/Ice/CommunicatorF.rb +0 -24
  865. data/dist/lib/Ice/Connection.rb +0 -413
  866. data/dist/lib/Ice/ConnectionF.rb +0 -32
  867. data/dist/lib/Ice/Current.rb +0 -141
  868. data/dist/lib/Ice/Endpoint.rb +0 -187
  869. data/dist/lib/Ice/EndpointF.rb +0 -48
  870. data/dist/lib/Ice/FacetMap.rb +0 -24
  871. data/dist/lib/Ice/ImplicitContext.rb +0 -26
  872. data/dist/lib/Ice/ImplicitContextF.rb +0 -24
  873. data/dist/lib/Ice/Instrumentation.rb +0 -169
  874. data/dist/lib/Ice/InstrumentationF.rb +0 -31
  875. data/dist/lib/Ice/LocalException.rb +0 -1031
  876. data/dist/lib/Ice/LocatorF.rb +0 -30
  877. data/dist/lib/Ice/Logger.rb +0 -24
  878. data/dist/lib/Ice/LoggerF.rb +0 -24
  879. data/dist/lib/Ice/ObjectAdapter.rb +0 -29
  880. data/dist/lib/Ice/ObjectAdapterF.rb +0 -24
  881. data/dist/lib/Ice/ObjectFactory.rb +0 -24
  882. data/dist/lib/Ice/Plugin.rb +0 -30
  883. data/dist/lib/Ice/PluginF.rb +0 -28
  884. data/dist/lib/Ice/ProcessF.rb +0 -25
  885. data/dist/lib/Ice/Properties.rb +0 -25
  886. data/dist/lib/Ice/PropertiesF.rb +0 -29
  887. data/dist/lib/Ice/RouterF.rb +0 -25
  888. data/dist/lib/Ice/ServantLocator.rb +0 -26
  889. data/dist/lib/Ice/ServantLocatorF.rb +0 -24
  890. data/dist/lib/Ice/ValueFactory.rb +0 -28
  891. data/dist/lib/IceBox/IceBox.rb +0 -164
  892. data/dist/lib/IceGrid/PluginFacade.rb +0 -35
  893. data/dist/lib/IcePatch2/FileInfo.rb +0 -115
  894. data/dist/lib/IcePatch2/FileServer.rb +0 -123
  895. data/dist/lib/IcePatch2.rb +0 -5
@@ -1,271 +1,295 @@
1
- //
2
- // Copyright (c) ZeroC, Inc. All rights reserved.
3
- //
4
-
5
- #include <Ice/Instance.h>
6
- #include <Ice/TraceLevels.h>
7
- #include <Ice/DefaultsAndOverrides.h>
8
- #include <Ice/RouterInfo.h>
9
- #include <Ice/Router.h>
10
- #include <Ice/LocatorInfo.h>
11
- #include <Ice/Locator.h>
12
- #include <Ice/ReferenceFactory.h>
13
- #include <Ice/ProxyFactory.h>
14
- #include <Ice/ThreadPool.h>
15
- #include <Ice/ConnectionFactory.h>
16
- #include <Ice/ValueFactoryManagerI.h>
17
- #include <Ice/LocalException.h>
18
- #include <Ice/ObjectAdapterFactory.h>
19
- #include <Ice/Exception.h>
20
- #include <Ice/PropertiesI.h>
21
- #include <Ice/PropertiesAdminI.h>
22
- #include <Ice/LoggerI.h>
23
- #include <Ice/NetworkProxy.h>
24
- #include <Ice/EndpointFactoryManager.h>
25
- #include <Ice/IPEndpointI.h> // For EndpointHostResolver
26
- #include <Ice/WSEndpoint.h>
27
- #include <Ice/RequestHandlerFactory.h>
28
- #include <Ice/RetryQueue.h>
29
- #include <Ice/DynamicLibrary.h>
30
- #include <Ice/PluginManagerI.h>
31
- #include <Ice/Initialize.h>
32
- #include <Ice/LoggerUtil.h>
33
- #include <Ice/PropertiesI.h>
34
- #include <Ice/Communicator.h>
35
- #include <Ice/InstrumentationI.h>
36
- #include <Ice/ProtocolInstance.h>
37
- #include <Ice/LoggerAdminI.h>
38
- #include <Ice/RegisterPluginsInit.h>
39
- #include <Ice/ObserverHelper.h>
40
- #include <Ice/Functional.h>
41
- #include <Ice/ConsoleUtil.h>
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
- # include <Ice/OSLogLoggerI.h>
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
- # include <Ice/SysLoggerI.h>
60
- # include <Ice/SystemdJournalI.h>
60
+ # if !defined(__APPLE__) || TARGET_OS_IPHONE == 0
61
+ # include "SysLoggerI.h"
62
+ # endif
61
63
 
62
- # include <signal.h>
63
- # include <syslog.h>
64
- # include <pwd.h>
65
- # include <sys/types.h>
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(__sun) || defined(_AIX) || defined(__GLIBC__)
69
- # include <grp.h> // for initgroups
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
- IceUtil::Mutex* staticMutex = 0;
88
- bool oneOfDone = false;
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
- return 0;
97
+ if (instanceList == nullptr)
98
+ {
99
+ return 0;
100
+ }
101
+ else
102
+ {
103
+ return instanceList->size();
104
+ }
105
105
  }
106
- else
106
+
107
+ string getProgramName()
107
108
  {
108
- return instanceList->size();
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
- class Init
113
- {
114
- public:
115
-
116
- Init()
140
+ void checkPrintStackTraces(const InitializationData& initData) noexcept
117
141
  {
118
- staticMutex = new IceUtil::Mutex;
119
-
120
- //
121
- // Although probably not necessary here, we consistently lock
122
- // staticMutex before accessing instanceList
123
- //
124
- IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(staticMutex);
125
- instanceList = new std::list<IceInternal::Instance*>;
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
- ~Init()
163
+ class Init
129
164
  {
165
+ public:
166
+ Init() noexcept
130
167
  {
131
- IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(staticMutex);
132
- int notDestroyedCount = 0;
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
- for(std::list<IceInternal::Instance*>::const_iterator p = instanceList->begin();
135
- p != instanceList->end(); ++p)
174
+ ~Init()
175
+ {
136
176
  {
137
- if(!(*p)->destroyed())
138
- {
139
- notDestroyedCount++;
140
- }
141
- }
177
+ lock_guard lock(staticMutex);
178
+ int notDestroyedCount = 0;
142
179
 
143
- if(notDestroyedCount > 0)
144
- {
145
- consoleErr << "!! " << IceUtil::Time::now().toDateTime() << " error: ";
146
- if(notDestroyedCount == 1)
180
+ for (const auto& p : *instanceList)
147
181
  {
148
- consoleErr << "communicator ";
182
+ if (!p->destroyed())
183
+ {
184
+ notDestroyedCount++;
185
+ }
149
186
  }
150
- else
187
+
188
+ if (notDestroyedCount > 0)
151
189
  {
152
- consoleErr << notDestroyedCount << " communicators ";
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
- delete instanceList;
158
- instanceList = 0;
202
+ delete instanceList;
203
+ instanceList = nullptr;
204
+ }
159
205
  }
160
- delete staticMutex;
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
- private:
218
+ void updateConnectionObservers() override;
219
+ void updateThreadObservers() override;
212
220
 
213
- virtual void runTimerTask(const IceUtil::TimerTaskPtr&);
221
+ private:
222
+ const InstancePtr _instance;
223
+ };
214
224
 
215
- IceUtil::Mutex _mutex;
216
225
  //
217
- // TODO: Replace by std::atomic<bool> when it becomes widely
218
- // available.
226
+ // Timer specialization which supports the thread observer
219
227
  //
220
- IceUtilInternal::Atomic _hasObserver;
221
- ObserverHelperT<Ice::Instrumentation::ThreadObserver> _observer;
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
- Timer::updateObserver(const Ice::Instrumentation::CommunicatorObserverPtr& obsv)
245
+ ThreadObserverTimer::updateObserver(const Ice::Instrumentation::CommunicatorObserverPtr& obsv)
228
246
  {
229
- IceUtil::Mutex::Lock sync(_mutex);
247
+ lock_guard lock(_mutex);
230
248
  assert(obsv);
231
- _observer.attach(obsv->getThreadObserver("Communicator",
232
- "Ice.Timer",
233
- Instrumentation::ICE_ENUM(ThreadState, ThreadStateIdle),
234
- _observer.get()));
235
- _hasObserver.exchange(_observer.get() ? 1 : 0);
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
- Timer::runTimerTask(const IceUtil::TimerTaskPtr& task)
258
+ ThreadObserverTimer::runTimerTask(const TimerTaskPtr& task)
240
259
  {
241
- if(_hasObserver != 0)
260
+ if (_hasObserver)
242
261
  {
243
262
  Ice::Instrumentation::ThreadObserverPtr threadObserver;
244
263
  {
245
- IceUtil::Mutex::Lock sync(_mutex);
264
+ lock_guard lock(_mutex);
246
265
  threadObserver = _observer.get();
247
266
  }
248
- if(threadObserver)
267
+ if (threadObserver)
249
268
  {
250
- threadObserver->stateChanged(Instrumentation::ICE_ENUM(ThreadState, ThreadStateIdle),
251
- Instrumentation::ICE_ENUM(ThreadState, ThreadStateInUseForOther));
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(Instrumentation::ICE_ENUM(ThreadState, ThreadStateInUseForOther),
262
- Instrumentation::ICE_ENUM(ThreadState, ThreadStateIdle));
281
+ threadObserver->stateChanged(
282
+ Instrumentation::ThreadState::ThreadStateInUseForOther,
283
+ Instrumentation::ThreadState::ThreadStateIdle);
263
284
  }
285
+ throw;
264
286
  }
265
- if(threadObserver)
287
+
288
+ if (threadObserver)
266
289
  {
267
- threadObserver->stateChanged(Instrumentation::ICE_ENUM(ThreadState, ThreadStateInUseForOther),
268
- Instrumentation::ICE_ENUM(ThreadState, ThreadStateIdle));
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
- IceUtil::Shared* IceInternal::upCast(Instance* p) { return p; }
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
- Lock sync(*this);
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
- Lock sync(*this);
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
- Lock sync(*this);
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
- Lock sync(*this);
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
- Lock sync(*this);
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
- Lock sync(*this);
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
- Lock sync(*this);
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
- Lock sync(*this);
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->getPropertyAsInt("Ice.ServerIdleTime");
465
- _serverThreadPool = new ThreadPool(this, "Ice.ThreadPool.Server", timeout);
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
- Lock sync(*this);
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
- Lock sync(*this);
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
- IceUtil::TimerPtr
491
+ IceInternal::TimerPtr
500
492
  IceInternal::Instance::timer()
501
493
  {
502
- Lock sync(*this);
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
- Lock sync(*this);
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
- Lock sync(*this);
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
- const ACMConfig&
555
- IceInternal::Instance::clientACM() const
532
+ ConnectionOptions
533
+ IceInternal::Instance::serverConnectionOptions(const string& adapterName) const
556
534
  {
557
- // No mutex lock, immutable.
558
- return _clientACM;
559
- }
535
+ assert(!adapterName.empty());
536
+ string propertyPrefix = adapterName + ".Connection";
560
537
 
561
- const ACMConfig&
562
- IceInternal::Instance::serverACM() const
563
- {
564
- // No mutex lock, immutable.
565
- return _serverACM;
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::ObjectPrxPtr
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
- Lock sync(*this);
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
- if(adminIdentity.name.empty())
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->getProperty("Ice.Admin.Endpoints") != "")
596
+ if (_initData.properties->getIceProperty("Ice.Admin.Endpoints") != "")
599
597
  {
600
- adapter = _objectAdapterFactory->createObjectAdapter("Ice.Admin", 0);
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
- sync.release();
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
- sync.acquire();
628
- _adminAdapter = 0;
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
- Ice::ObjectPrxPtr
634
+ std::optional<ObjectPrx>
637
635
  IceInternal::Instance::getAdmin()
638
636
  {
639
- Lock sync(*this);
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->getProperty("Ice.Admin.Endpoints") != "")
651
+ if (_initData.properties->getIceProperty("Ice.Admin.Endpoints") != "")
654
652
  {
655
- adapter = _objectAdapterFactory->createObjectAdapter("Ice.Admin", 0);
653
+ adapter = _objectAdapterFactory->createObjectAdapter("Ice.Admin", nullopt, nullopt);
656
654
  }
657
655
  else
658
656
  {
659
- return 0;
657
+ return nullopt;
660
658
  }
661
659
 
662
660
  Identity adminIdentity;
663
661
  adminIdentity.name = "admin";
664
- adminIdentity.category = _initData.properties->getProperty("Ice.Admin.InstanceName");
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
- sync.release();
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
- sync.acquire();
687
- _adminAdapter = 0;
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 0;
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(FacetMap::iterator p = _adminFacets.begin(); p != _adminFacets.end(); ++p)
708
+ for (const auto& adminFacet : _adminFacets)
711
709
  {
712
- if(_adminFacetFilter.empty() || _adminFacetFilter.find(p->first) != _adminFacetFilter.end())
710
+ if (_adminFacetFilter.empty() || _adminFacetFilter.find(adminFacet.first) != _adminFacetFilter.end())
713
711
  {
714
- _adminAdapter->addFacet(p->second, _adminIdentity, p->first);
712
+ _adminAdapter->addFacet(adminFacet.second, _adminIdentity, adminFacet.first);
715
713
  }
716
714
  else
717
715
  {
718
- filteredFacets[p->first] = p->second;
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
- ObjectPrxPtr admin = adminAdapter->createProxy(adminIdentity);
728
- LocatorPrxPtr locator = adminAdapter->getLocator();
729
- const string serverId = _initData.properties->getProperty("Ice.Admin.ServerId");
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
- ProcessPrxPtr process = ICE_UNCHECKED_CAST(ProcessPrx, admin->ice_facet("Process"));
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 `" + serverId + "' with the locator registry:\n";
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(__FILE__, __LINE__, "Locator `" + _proxyFactory->proxyToString(locator) +
751
- "' knows nothing about server `" + serverId + "'");
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 `" + serverId + "' with the locator registry:\n" << ex;
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 `" + serverId + "' with the locator registry";
766
+ out << "registered server '" + serverId + "' with the locator registry";
767
767
  }
768
768
  }
769
769
  }
770
770
 
771
771
  void
772
- IceInternal::Instance::addAdminFacet(const Ice::ObjectPtr& servant, const string& facet)
772
+ IceInternal::Instance::addAdminFacet(ObjectPtr servant, string facet)
773
773
  {
774
- Lock sync(*this);
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 == 0 || (!_adminFacetFilter.empty() && _adminFacetFilter.find(facet) == _adminFacetFilter.end()))
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
- Ice::ObjectPtr
795
- IceInternal::Instance::removeAdminFacet(const string& facet)
795
+ ObjectPtr
796
+ IceInternal::Instance::removeAdminFacet(string_view facet)
796
797
  {
797
- Lock sync(*this);
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 == 0 || (!_adminFacetFilter.empty() && _adminFacetFilter.find(facet) == _adminFacetFilter.end()))
807
+ if (_adminAdapter == nullptr ||
808
+ (!_adminFacetFilter.empty() && _adminFacetFilter.find(facet) == _adminFacetFilter.end()))
807
809
  {
808
- FacetMap::iterator p = _adminFacets.find(facet);
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
- Ice::ObjectPtr
828
- IceInternal::Instance::findAdminFacet(const string& facet)
829
+ ObjectPtr
830
+ IceInternal::Instance::findAdminFacet(string_view facet)
829
831
  {
830
- Lock sync(*this);
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
- FacetMap::iterator p = _adminFacets.find(facet);
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
- Lock sync(*this);
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 Ice::LocatorPrxPtr& defaultLocator)
888
+ IceInternal::Instance::setDefaultLocator(const optional<LocatorPrx>& defaultLocator)
887
889
  {
888
- Lock sync(*this);
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 Ice::RouterPrxPtr& defaultRouter)
901
+ IceInternal::Instance::setDefaultRouter(const optional<RouterPrx>& defaultRouter)
900
902
  {
901
- Lock sync(*this);
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
- #else
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
- namespace
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
- bool logStdErrConvert = true;
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
- IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const InitializationData& initData) :
946
- _state(StateActive),
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
- __setNoDelete(true);
965
+ if (!_initData.properties)
962
966
  {
963
- IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(staticMutex);
964
- instanceList->push_back(this);
967
+ // Plain empty properties, in particular, no ICE_CONFIG properties.
968
+ _initData.properties = make_shared<Ice::Properties>();
969
+ }
965
970
 
966
- if(!_initData.properties)
967
- {
968
- _initData.properties = createProperties();
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(!oneOfDone)
983
+ if (!oneOffDone)
972
984
  {
973
985
  //
974
986
  // StdOut and StdErr redirection
975
987
  //
976
- string stdOutFilename = _initData.properties->getProperty("Ice.StdOut");
977
- string stdErrFilename = _initData.properties->getProperty("Ice.StdErr");
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 = IceUtilInternal::freopen(stdOutFilename, "a", stdout);
982
- if(file == 0)
993
+ FILE* file = IceInternal::freopen(stdOutFilename, "a", stdout);
994
+ if (file == nullptr)
983
995
  {
984
- throw FileException(__FILE__, __LINE__, getSystemErrno(), stdOutFilename);
996
+ throw FileException(__FILE__, __LINE__, stdOutFilename);
985
997
  }
986
998
  }
987
999
 
988
- if(stdErrFilename != "")
1000
+ if (stdErrFilename != "")
989
1001
  {
990
- FILE* file = IceUtilInternal::freopen(stdErrFilename, "a", stderr);
991
- if(file == 0)
1002
+ FILE* file = IceInternal::freopen(stdErrFilename, "a", stderr);
1003
+ if (file == nullptr)
992
1004
  {
993
- throw FileException(__FILE__, __LINE__, getSystemErrno(), stdErrFilename);
1005
+ throw FileException(__FILE__, __LINE__, stdErrFilename);
994
1006
  }
995
1007
  }
996
1008
 
997
- if(_initData.properties->getPropertyAsInt("Ice.NullHandleAbort") > 0)
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->getPropertyAsInt("Ice.UseSyslog") > 0)
1029
+ if (_initData.properties->getIcePropertyAsInt("Ice.UseSyslog") > 0)
1073
1030
  {
1074
- identForOpenlog = _initData.properties->getProperty("Ice.ProgramName");
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
- _initData.properties->getPropertyAsIntWithDefault("Ice.LogStdErr.Convert", 1) > 0 &&
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->getProperty("Ice.LogFile");
1092
- #ifndef _WIN32
1093
- if(_initData.properties->getPropertyAsInt("Ice.UseSyslog") > 0)
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 = ICE_MAKE_SHARED(SysLoggerI,
1101
- _initData.properties->getProperty("Ice.ProgramName"),
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 ICE_SWIFT
1108
- if(!_initData.logger && _initData.properties->getPropertyAsInt("Ice.UseOSLog") > 0)
1062
+ #ifdef __APPLE__
1063
+ if (!_initData.logger && _initData.properties->getIcePropertyAsInt("Ice.UseOSLog") > 0)
1109
1064
  {
1110
- _initData.logger = ICE_MAKE_SHARED(OSLogLoggerI,
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
- if(_initData.properties->getPropertyAsInt("Ice.UseSystemdJournal") > 0)
1071
+ if (_initData.properties->getIcePropertyAsInt("Ice.UseSystemdJournal") > 0)
1118
1072
  {
1119
- _initData.logger = ICE_MAKE_SHARED(SystemdJournalI,
1120
- _initData.properties->getProperty("Ice.ProgramName"));
1073
+ _initData.logger = make_shared<SystemdJournalI>(programName);
1121
1074
  }
1122
1075
  else
1123
1076
  #endif
1124
- if(!logfile.empty())
1077
+ if (!logfile.empty())
1125
1078
  {
1126
- Int sz = _initData.properties->getPropertyAsIntWithDefault("Ice.LogFile.SizeMax", 0);
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 = ICE_MAKE_SHARED(LoggerI, _initData.properties->getProperty("Ice.ProgramName"),
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(ICE_DYNAMIC_CAST(LoggerI, _initData.logger))
1089
+ if (dynamic_pointer_cast<LoggerI>(_initData.logger))
1138
1090
  {
1139
- _initData.logger = ICE_MAKE_SHARED(LoggerI, _initData.properties->getProperty("Ice.ProgramName"), "", logStdErrConvert);
1091
+ _initData.logger = make_shared<LoggerI>(programName, "", logStdErrConvert);
1140
1092
  }
1141
1093
  }
1142
1094
  }
1095
+ assert(_initData.logger);
1143
1096
 
1144
- const_cast<TraceLevelsPtr&>(_traceLevels) = new TraceLevels(_initData.properties);
1097
+ // This affects the entire process.
1098
+ checkPrintStackTraces(_initData);
1145
1099
 
1146
- const_cast<DefaultsAndOverridesPtr&>(_defaultsAndOverrides) =
1147
- new DefaultsAndOverrides(_initData.properties, _initData.logger);
1100
+ const_cast<TraceLevelsPtr&>(_traceLevels) = make_shared<TraceLevels>(_initData.properties);
1148
1101
 
1149
- const ACMConfig defaultClientACM(_initData.properties, _initData.logger, "Ice.ACM", ACMConfig(false));
1150
- const ACMConfig defaultServerACM(_initData.properties, _initData.logger, "Ice.ACM", ACMConfig(true));
1102
+ const_cast<DefaultsAndOverridesPtr&>(_defaultsAndOverrides) =
1103
+ make_shared<DefaultsAndOverrides>(_initData.properties);
1151
1104
 
1152
- const_cast<ACMConfig&>(_clientACM) = ACMConfig(_initData.properties,
1153
- _initData.logger,
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
- const_cast<ACMConfig&>(_serverACM) = ACMConfig(_initData.properties,
1158
- _initData.logger,
1159
- "Ice.ACM.Server",
1160
- defaultServerACM);
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
- static const int defaultMessageSizeMax = 1024;
1164
- Int num = _initData.properties->getPropertyAsIntWithDefault("Ice.MessageSizeMax", defaultMessageSizeMax);
1165
- if(num < 1 || static_cast<size_t>(num) > static_cast<size_t>(0x7fffffff / 1024))
1166
- {
1167
- const_cast<size_t&>(_messageSizeMax) = static_cast<size_t>(0x7fffffff);
1168
- }
1169
- else
1170
- {
1171
- // Property is in kilobytes, _messageSizeMax in bytes.
1172
- const_cast<size_t&>(_messageSizeMax) = static_cast<size_t>(num) * 1024;
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
- if(_initData.properties->getProperty("Ice.BatchAutoFlushSize").empty() &&
1177
- !_initData.properties->getProperty("Ice.BatchAutoFlush").empty())
1147
+ int32_t classGraphDepthMax = _initData.properties->getIcePropertyAsInt("Ice.ClassGraphDepthMax");
1148
+ if (classGraphDepthMax < 1)
1178
1149
  {
1179
- if(_initData.properties->getPropertyAsInt("Ice.BatchAutoFlush") > 0)
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
- Int num = _initData.properties->getPropertyAsIntWithDefault("Ice.BatchAutoFlushSize", 1024); // 1MB default
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
- static const int defaultValue = 100;
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
- const_cast<bool&>(_collectObjects) = _initData.properties->getPropertyAsInt("Ice.CollectObjects") > 0;
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->getPropertyWithDefault("Ice.ToStringMode", "Unicode");
1218
- if(toStringModeStr == "ASCII")
1169
+ string toStringModeStr = _initData.properties->getIceProperty("Ice.ToStringMode");
1170
+ if (toStringModeStr == "ASCII")
1219
1171
  {
1220
- const_cast<ToStringMode&>(_toStringMode) = ICE_ENUM(ToStringMode, ASCII);
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) = ICE_ENUM(ToStringMode, Compat);
1176
+ const_cast<ToStringMode&>(_toStringMode) = ToStringMode::Compat;
1225
1177
  }
1226
- else if(toStringModeStr != "Unicode")
1178
+ else if (toStringModeStr != "Unicode")
1227
1179
  {
1228
- throw InitializationException(__FILE__, __LINE__, "The value for Ice.ToStringMode must be Unicode, ASCII or Compat");
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->getPropertyAsInt("Ice.AcceptClassCycles") > 0;
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
- _routerManager = new RouterManager;
1237
-
1238
- _locatorManager = new LocatorManager(_initData.properties);
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
- _referenceFactory = new ReferenceFactory(this, communicator);
1210
+ _routerManager = make_shared<RouterManager>();
1241
1211
 
1242
- _requestHandlerFactory = new RequestHandlerFactory(this);
1212
+ _locatorManager = make_shared<LocatorManager>(_initData.properties);
1243
1213
 
1244
- _proxyFactory = new ProxyFactory(this);
1214
+ _referenceFactory = make_shared<ReferenceFactory>(shared_from_this(), communicator);
1245
1215
 
1246
1216
  const bool isIPv6Supported = IceInternal::isIPv6Supported();
1247
- const bool ipv4 = _initData.properties->getPropertyAsIntWithDefault("Ice.IPv4", 1) > 0;
1248
- const bool ipv6 = _initData.properties->getPropertyAsIntWithDefault("Ice.IPv6", isIPv6Supported ? 1 : 0) > 0;
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->getPropertyAsInt("Ice.PreferIPv6Address") > 0;
1235
+ _preferIPv6 = _initData.properties->getIcePropertyAsInt("Ice.PreferIPv6Address") > 0;
1266
1236
 
1267
1237
  _networkProxy = IceInternal::createNetworkProxy(_initData.properties, _protocolSupport);
1268
1238
 
1269
- _endpointFactoryManager = new EndpointFactoryManager(this);
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
- _dynamicLibraryList = new DynamicLibraryList;
1245
+ _objectAdapterFactory = make_shared<ObjectAdapterFactory>(shared_from_this(), communicator);
1272
1246
 
1273
- _pluginManager = ICE_MAKE_SHARED(PluginManagerI, communicator, _dynamicLibraryList);
1247
+ _retryQueue = make_shared<RetryQueue>(shared_from_this());
1274
1248
 
1275
- if(!_initData.valueFactoryManager)
1249
+ StringSeq retryValues = _initData.properties->getIcePropertyAsList("Ice.RetryIntervals");
1250
+ if (retryValues.size() == 0)
1276
1251
  {
1277
- _initData.valueFactoryManager = ICE_MAKE_SHARED(ValueFactoryManagerI);
1252
+ _retryIntervals.push_back(0);
1278
1253
  }
1254
+ else
1255
+ {
1256
+ for (const auto& retryValue : retryValues)
1257
+ {
1258
+ istringstream value(retryValue);
1279
1259
 
1280
- _objectFactoryMapHint = _objectFactoryMap.end();
1281
-
1282
- _outgoingConnectionFactory = new OutgoingConnectionFactory(communicator, this);
1260
+ int v;
1261
+ if (!(value >> v) || !value.eof())
1262
+ {
1263
+ v = 0;
1264
+ }
1283
1265
 
1284
- _objectAdapterFactory = ICE_MAKE_SHARED(ObjectAdapterFactory, this, communicator);
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
- _retryQueue = new RetryQueue(this);
1274
+ _retryIntervals.push_back(v > 0 ? v : 0);
1275
+ }
1276
+ }
1287
1277
 
1288
- __setNoDelete(false);
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
- IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(staticMutex);
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
- IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(staticMutex);
1322
- if(instanceList != 0)
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, 0);
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(int& argc, const char* argv[], const Ice::CommunicatorPtr& communicator)
1387
+ IceInternal::Instance::finishSetup(const Ice::CommunicatorPtr& communicator)
1346
1388
  {
1347
- //
1348
1389
  // Load plug-ins.
1349
- //
1350
1390
  assert(!_serverThreadPool);
1351
- PluginManagerI* pluginManagerImpl = dynamic_cast<PluginManagerI*>(_pluginManager.get());
1391
+ auto pluginManagerImpl = dynamic_pointer_cast<PluginManagerI>(_pluginManager);
1352
1392
  assert(pluginManagerImpl);
1353
- pluginManagerImpl->loadPlugins(argc, argv);
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 underyling factories.
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->getProperty("Ice.Admin.Enabled") == "")
1424
+ if (_initData.properties->getIceProperty("Ice.Admin.Enabled") == "")
1375
1425
  {
1376
- _adminEnabled = _initData.properties->getProperty("Ice.Admin.Endpoints") != "";
1426
+ _adminEnabled = _initData.properties->getIceProperty("Ice.Admin.Endpoints") != "";
1377
1427
  }
1378
1428
  else
1379
1429
  {
1380
- _adminEnabled = _initData.properties->getPropertyAsInt("Ice.Admin.Enabled") > 0;
1430
+ _adminEnabled = _initData.properties->getIcePropertyAsInt("Ice.Admin.Enabled") > 0;
1381
1431
  }
1382
1432
 
1383
- StringSeq facetSeq = _initData.properties->getPropertyAsList("Ice.Admin.Facets");
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, ICE_MAKE_SHARED(ProcessI, communicator)));
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
- PropertiesAdminIPtr propsAdmin;
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 = ICE_MAKE_SHARED(PropertiesAdminI, this);
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 = ICE_MAKE_SHARED(CommunicatorObserverI, _initData);
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
- [metricsAdmin](const PropertyDict& changes) { metricsAdmin->updated(changes); });
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(ICE_MAKE_SHARED(ObserverUpdaterI, this));
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
- bool hasPriority = _initData.properties->getProperty("Ice.ThreadPriority") != "";
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 IceUtil::Exception& ex)
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 = new EndpointHostResolver(this);
1482
- bool hasPriority = _initData.properties->getProperty("Ice.ThreadPriority") != "";
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 IceUtil::Exception& ex)
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 = new ThreadPool(this, "Ice.ThreadPool.Client", 0);
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
- RouterPrxPtr router = ICE_UNCHECKED_CAST(RouterPrx, _proxyFactory->propertyToProxy("Ice.Default.Router"));
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
- LocatorPrxPtr locator = ICE_UNCHECKED_CAST(LocatorPrx, _proxyFactory->propertyToProxy("Ice.Default.Locator"));
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->getPropertyAsInt("Ice.PrintProcessId") > 0)
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
- IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(staticMutex);
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->getPropertyAsIntWithDefault("Ice.InitPlugins", 1) > 0)
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.Enpoints
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->getPropertyAsIntWithDefault("Ice.Admin.DelayCreation", 0) <= 0)
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
- Lock sync(*this);
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
- while(_state == StateDestroyInProgress)
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 = ICE_DYNAMIC_CAST(CommunicatorObserverI, _initData.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(0); // Break cyclic reference count.
1664
+ _initData.observer->setObserverUpdater(nullptr); // Break cyclic reference count.
1640
1665
  }
1641
1666
 
1642
- LoggerAdminLoggerPtr logger = ICE_DYNAMIC_CAST(LoggerAdminLogger, _initData.logger);
1643
- if(logger)
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(_endpointHostResolver)
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
- p.second->destroy();
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(_endpointFactoryManager)
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 = static_cast<PropertiesI*>(_initData.properties.get())->getUnusedProperties();
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(set<string>::const_iterator p = unusedProperties.begin(); p != unusedProperties.end(); ++p)
1743
+ for (const auto& unusedProp : unusedProperties)
1723
1744
  {
1724
- out << "\n " << *p;
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
- Lock sync(*this);
1759
+ lock_guard lock(_mutex);
1739
1760
 
1740
- _objectAdapterFactory = 0;
1741
- _outgoingConnectionFactory = 0;
1742
- _retryQueue = 0;
1761
+ _objectAdapterFactory = nullptr;
1762
+ _outgoingConnectionFactory = nullptr;
1763
+ _retryQueue = nullptr;
1743
1764
 
1744
- _serverThreadPool = 0;
1745
- _clientThreadPool = 0;
1746
- _endpointHostResolver = 0;
1747
- _timer = 0;
1765
+ _serverThreadPool = nullptr;
1766
+ _clientThreadPool = nullptr;
1767
+ _endpointHostResolver = nullptr;
1768
+ _timer = nullptr;
1748
1769
 
1749
- _referenceFactory = 0;
1750
- _requestHandlerFactory = 0;
1751
- _proxyFactory = 0;
1752
- _routerManager = 0;
1753
- _locatorManager = 0;
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 = 0;
1776
+ _adminAdapter = nullptr;
1759
1777
  _adminFacets.clear();
1760
1778
 
1779
+ _sslEngine = nullptr;
1780
+
1761
1781
  _state = StateDestroyed;
1762
- notifyAll();
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(Short type)
1862
+ IceInternal::Instance::getBufSizeWarn(int16_t type)
1812
1863
  {
1813
- IceUtil::Mutex::Lock lock(_setBufSizeWarnMutex);
1864
+ lock_guard lock(_setBufSizeWarnMutex);
1814
1865
 
1815
1866
  return getBufSizeWarnInternal(type);
1816
1867
  }
1817
1868
 
1818
1869
  BufSizeWarnInfo
1819
- IceInternal::Instance::getBufSizeWarnInternal(Short type)
1870
+ IceInternal::Instance::getBufSizeWarnInternal(int16_t type)
1820
1871
  {
1821
1872
  BufSizeWarnInfo info;
1822
- map<Short, BufSizeWarnInfo>::iterator p = _setBufSizeWarn.find(type);
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(Short type, int size)
1911
+ IceInternal::Instance::setSndBufSizeWarn(int16_t type, int size)
1840
1912
  {
1841
- IceUtil::Mutex::Lock lock(_setBufSizeWarnMutex);
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] = info;
1918
+ _setBufSizeWarn[type] = info;
1847
1919
  }
1848
1920
 
1849
1921
  void
1850
- IceInternal::Instance::setRcvBufSizeWarn(Short type, int size)
1922
+ IceInternal::Instance::setRcvBufSizeWarn(int16_t type, int size)
1851
1923
  {
1852
- IceUtil::Mutex::Lock lock(_setBufSizeWarnMutex);
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] = info;
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(const CommunicatorPtr& communicator) :
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
- #ifdef ICE_CPP11_MAPPING
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
  {