zeroc-ice 3.6b1

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 (675) hide show
  1. checksums.yaml +7 -0
  2. data/ICE_LICENSE +54 -0
  3. data/LICENSE +339 -0
  4. data/bin/slice2rb +17 -0
  5. data/ext/Communicator.cpp +596 -0
  6. data/ext/Communicator.h +25 -0
  7. data/ext/Config.h +111 -0
  8. data/ext/Connection.cpp +381 -0
  9. data/ext/Connection.h +26 -0
  10. data/ext/Endpoint.cpp +311 -0
  11. data/ext/Endpoint.h +27 -0
  12. data/ext/ImplicitContext.cpp +152 -0
  13. data/ext/ImplicitContext.h +25 -0
  14. data/ext/Init.cpp +52 -0
  15. data/ext/Logger.cpp +151 -0
  16. data/ext/Logger.h +28 -0
  17. data/ext/ObjectFactory.cpp +140 -0
  18. data/ext/ObjectFactory.h +50 -0
  19. data/ext/Operation.cpp +676 -0
  20. data/ext/Operation.h +36 -0
  21. data/ext/Properties.cpp +369 -0
  22. data/ext/Properties.h +25 -0
  23. data/ext/Proxy.cpp +1354 -0
  24. data/ext/Proxy.h +27 -0
  25. data/ext/Slice.cpp +223 -0
  26. data/ext/Slice.h +22 -0
  27. data/ext/Types.cpp +3160 -0
  28. data/ext/Types.h +545 -0
  29. data/ext/Util.cpp +792 -0
  30. data/ext/Util.h +511 -0
  31. data/ext/extconf.rb +118 -0
  32. data/ext/ice/BZIP_LICENSE +42 -0
  33. data/ext/ice/MCPP_LICENSE +36 -0
  34. data/ext/ice/bzip2/blocksort.c +1094 -0
  35. data/ext/ice/bzip2/bzlib.c +1572 -0
  36. data/ext/ice/bzip2/bzlib.h +282 -0
  37. data/ext/ice/bzip2/bzlib_private.h +509 -0
  38. data/ext/ice/bzip2/compress.c +672 -0
  39. data/ext/ice/bzip2/crctable.c +104 -0
  40. data/ext/ice/bzip2/decompress.c +646 -0
  41. data/ext/ice/bzip2/huffman.c +205 -0
  42. data/ext/ice/bzip2/randtable.c +84 -0
  43. data/ext/ice/cpp/include/Ice/ACMF.h +30 -0
  44. data/ext/ice/cpp/include/Ice/Application.h +156 -0
  45. data/ext/ice/cpp/include/Ice/AsyncResult.h +363 -0
  46. data/ext/ice/cpp/include/Ice/AsyncResultF.h +26 -0
  47. data/ext/ice/cpp/include/Ice/BasicStream.h +1315 -0
  48. data/ext/ice/cpp/include/Ice/Buffer.h +159 -0
  49. data/ext/ice/cpp/include/Ice/BuiltinSequences.h +74 -0
  50. data/ext/ice/cpp/include/Ice/Communicator.h +194 -0
  51. data/ext/ice/cpp/include/Ice/CommunicatorAsync.h +115 -0
  52. data/ext/ice/cpp/include/Ice/CommunicatorF.h +60 -0
  53. data/ext/ice/cpp/include/Ice/Config.h +97 -0
  54. data/ext/ice/cpp/include/Ice/Connection.h +495 -0
  55. data/ext/ice/cpp/include/Ice/ConnectionAsync.h +115 -0
  56. data/ext/ice/cpp/include/Ice/ConnectionF.h +72 -0
  57. data/ext/ice/cpp/include/Ice/ConnectionFactoryF.h +30 -0
  58. data/ext/ice/cpp/include/Ice/ConnectionIF.h +37 -0
  59. data/ext/ice/cpp/include/Ice/Current.h +94 -0
  60. data/ext/ice/cpp/include/Ice/DefaultObjectFactory.h +48 -0
  61. data/ext/ice/cpp/include/Ice/DeprecatedStringConverter.h +62 -0
  62. data/ext/ice/cpp/include/Ice/DispatchInterceptor.h +33 -0
  63. data/ext/ice/cpp/include/Ice/Dispatcher.h +51 -0
  64. data/ext/ice/cpp/include/Ice/DynamicLibrary.h +105 -0
  65. data/ext/ice/cpp/include/Ice/DynamicLibraryF.h +29 -0
  66. data/ext/ice/cpp/include/Ice/Endpoint.h +350 -0
  67. data/ext/ice/cpp/include/Ice/EndpointF.h +97 -0
  68. data/ext/ice/cpp/include/Ice/EndpointTypes.h +74 -0
  69. data/ext/ice/cpp/include/Ice/Exception.h +114 -0
  70. data/ext/ice/cpp/include/Ice/FacetMap.h +56 -0
  71. data/ext/ice/cpp/include/Ice/FactoryTable.h +69 -0
  72. data/ext/ice/cpp/include/Ice/FactoryTableInit.h +87 -0
  73. data/ext/ice/cpp/include/Ice/Format.h +39 -0
  74. data/ext/ice/cpp/include/Ice/Functional.h +138 -0
  75. data/ext/ice/cpp/include/Ice/GCObject.h +73 -0
  76. data/ext/ice/cpp/include/Ice/Handle.h +192 -0
  77. data/ext/ice/cpp/include/Ice/Ice.h +54 -0
  78. data/ext/ice/cpp/include/Ice/Identity.h +160 -0
  79. data/ext/ice/cpp/include/Ice/ImplicitContext.h +96 -0
  80. data/ext/ice/cpp/include/Ice/ImplicitContextF.h +60 -0
  81. data/ext/ice/cpp/include/Ice/Incoming.h +131 -0
  82. data/ext/ice/cpp/include/Ice/IncomingAsync.h +108 -0
  83. data/ext/ice/cpp/include/Ice/IncomingAsyncF.h +35 -0
  84. data/ext/ice/cpp/include/Ice/Initialize.h +141 -0
  85. data/ext/ice/cpp/include/Ice/InstanceF.h +26 -0
  86. data/ext/ice/cpp/include/Ice/Instrumentation.h +377 -0
  87. data/ext/ice/cpp/include/Ice/InstrumentationF.h +71 -0
  88. data/ext/ice/cpp/include/Ice/LocalException.h +1022 -0
  89. data/ext/ice/cpp/include/Ice/LocalObject.h +36 -0
  90. data/ext/ice/cpp/include/Ice/LocalObjectF.h +26 -0
  91. data/ext/ice/cpp/include/Ice/Locator.h +2191 -0
  92. data/ext/ice/cpp/include/Ice/LocatorF.h +89 -0
  93. data/ext/ice/cpp/include/Ice/Logger.h +94 -0
  94. data/ext/ice/cpp/include/Ice/LoggerF.h +60 -0
  95. data/ext/ice/cpp/include/Ice/LoggerUtil.h +153 -0
  96. data/ext/ice/cpp/include/Ice/Makefile +26 -0
  97. data/ext/ice/cpp/include/Ice/Metrics.h +2989 -0
  98. data/ext/ice/cpp/include/Ice/MetricsAdminI.h +662 -0
  99. data/ext/ice/cpp/include/Ice/MetricsFunctional.h +144 -0
  100. data/ext/ice/cpp/include/Ice/MetricsObserverI.h +576 -0
  101. data/ext/ice/cpp/include/Ice/NativePropertiesAdmin.h +55 -0
  102. data/ext/ice/cpp/include/Ice/Object.h +165 -0
  103. data/ext/ice/cpp/include/Ice/ObjectAdapter.h +162 -0
  104. data/ext/ice/cpp/include/Ice/ObjectAdapterF.h +60 -0
  105. data/ext/ice/cpp/include/Ice/ObjectAdapterFactoryF.h +26 -0
  106. data/ext/ice/cpp/include/Ice/ObjectF.h +26 -0
  107. data/ext/ice/cpp/include/Ice/ObjectFactory.h +86 -0
  108. data/ext/ice/cpp/include/Ice/ObjectFactoryF.h +60 -0
  109. data/ext/ice/cpp/include/Ice/ObjectFactoryManagerF.h +26 -0
  110. data/ext/ice/cpp/include/Ice/ObserverHelper.h +177 -0
  111. data/ext/ice/cpp/include/Ice/Outgoing.h +197 -0
  112. data/ext/ice/cpp/include/Ice/OutgoingAsync.h +264 -0
  113. data/ext/ice/cpp/include/Ice/OutgoingAsyncF.h +38 -0
  114. data/ext/ice/cpp/include/Ice/Plugin.h +121 -0
  115. data/ext/ice/cpp/include/Ice/PluginF.h +66 -0
  116. data/ext/ice/cpp/include/Ice/Process.h +568 -0
  117. data/ext/ice/cpp/include/Ice/ProcessF.h +77 -0
  118. data/ext/ice/cpp/include/Ice/Properties.h +130 -0
  119. data/ext/ice/cpp/include/Ice/PropertiesAdmin.h +824 -0
  120. data/ext/ice/cpp/include/Ice/PropertiesF.h +83 -0
  121. data/ext/ice/cpp/include/Ice/Protocol.h +242 -0
  122. data/ext/ice/cpp/include/Ice/Proxy.h +2448 -0
  123. data/ext/ice/cpp/include/Ice/ProxyF.h +78 -0
  124. data/ext/ice/cpp/include/Ice/ProxyFactoryF.h +26 -0
  125. data/ext/ice/cpp/include/Ice/ProxyHandle.h +330 -0
  126. data/ext/ice/cpp/include/Ice/ReferenceF.h +34 -0
  127. data/ext/ice/cpp/include/Ice/RemoteLogger.h +1496 -0
  128. data/ext/ice/cpp/include/Ice/RequestHandlerF.h +29 -0
  129. data/ext/ice/cpp/include/Ice/ResponseHandlerF.h +25 -0
  130. data/ext/ice/cpp/include/Ice/Router.h +1155 -0
  131. data/ext/ice/cpp/include/Ice/RouterF.h +77 -0
  132. data/ext/ice/cpp/include/Ice/ServantLocator.h +90 -0
  133. data/ext/ice/cpp/include/Ice/ServantLocatorF.h +60 -0
  134. data/ext/ice/cpp/include/Ice/ServantManagerF.h +26 -0
  135. data/ext/ice/cpp/include/Ice/Service.h +260 -0
  136. data/ext/ice/cpp/include/Ice/SliceChecksumDict.h +56 -0
  137. data/ext/ice/cpp/include/Ice/SliceChecksums.h +34 -0
  138. data/ext/ice/cpp/include/Ice/SlicedData.h +103 -0
  139. data/ext/ice/cpp/include/Ice/SlicedDataF.h +34 -0
  140. data/ext/ice/cpp/include/Ice/Stream.h +449 -0
  141. data/ext/ice/cpp/include/Ice/StreamF.h +30 -0
  142. data/ext/ice/cpp/include/Ice/StreamHelpers.h +877 -0
  143. data/ext/ice/cpp/include/Ice/ThreadPoolF.h +28 -0
  144. data/ext/ice/cpp/include/Ice/UserExceptionFactory.h +56 -0
  145. data/ext/ice/cpp/include/Ice/Version.h +254 -0
  146. data/ext/ice/cpp/include/IceSSL/Config.h +23 -0
  147. data/ext/ice/cpp/include/IceSSL/ConnectionInfo.h +119 -0
  148. data/ext/ice/cpp/include/IceSSL/EndpointInfo.h +101 -0
  149. data/ext/ice/cpp/include/IceSSL/IceSSL.h +22 -0
  150. data/ext/ice/cpp/include/IceSSL/Makefile +26 -0
  151. data/ext/ice/cpp/include/IceSSL/Plugin.h +558 -0
  152. data/ext/ice/cpp/include/IceUtil/AbstractMutex.h +119 -0
  153. data/ext/ice/cpp/include/IceUtil/Cache.h +362 -0
  154. data/ext/ice/cpp/include/IceUtil/Cond.h +323 -0
  155. data/ext/ice/cpp/include/IceUtil/Config.h +234 -0
  156. data/ext/ice/cpp/include/IceUtil/CountDownLatch.h +50 -0
  157. data/ext/ice/cpp/include/IceUtil/CtrlCHandler.h +70 -0
  158. data/ext/ice/cpp/include/IceUtil/DisableWarnings.h +45 -0
  159. data/ext/ice/cpp/include/IceUtil/Exception.h +184 -0
  160. data/ext/ice/cpp/include/IceUtil/Functional.h +389 -0
  161. data/ext/ice/cpp/include/IceUtil/Handle.h +266 -0
  162. data/ext/ice/cpp/include/IceUtil/IceUtil.h +51 -0
  163. data/ext/ice/cpp/include/IceUtil/IconvStringConverter.h +302 -0
  164. data/ext/ice/cpp/include/IceUtil/InputUtil.h +47 -0
  165. data/ext/ice/cpp/include/IceUtil/Iterator.h +36 -0
  166. data/ext/ice/cpp/include/IceUtil/Lock.h +135 -0
  167. data/ext/ice/cpp/include/IceUtil/Makefile +26 -0
  168. data/ext/ice/cpp/include/IceUtil/Monitor.h +249 -0
  169. data/ext/ice/cpp/include/IceUtil/Mutex.h +357 -0
  170. data/ext/ice/cpp/include/IceUtil/MutexProtocol.h +28 -0
  171. data/ext/ice/cpp/include/IceUtil/MutexPtrLock.h +83 -0
  172. data/ext/ice/cpp/include/IceUtil/MutexPtrTryLock.h +82 -0
  173. data/ext/ice/cpp/include/IceUtil/Optional.h +322 -0
  174. data/ext/ice/cpp/include/IceUtil/Options.h +141 -0
  175. data/ext/ice/cpp/include/IceUtil/OutputUtil.h +362 -0
  176. data/ext/ice/cpp/include/IceUtil/PopDisableWarnings.h +19 -0
  177. data/ext/ice/cpp/include/IceUtil/PushDisableWarnings.h +26 -0
  178. data/ext/ice/cpp/include/IceUtil/Random.h +24 -0
  179. data/ext/ice/cpp/include/IceUtil/RecMutex.h +113 -0
  180. data/ext/ice/cpp/include/IceUtil/SHA1.h +65 -0
  181. data/ext/ice/cpp/include/IceUtil/ScannerConfig.h +44 -0
  182. data/ext/ice/cpp/include/IceUtil/ScopedArray.h +97 -0
  183. data/ext/ice/cpp/include/IceUtil/Shared.h +168 -0
  184. data/ext/ice/cpp/include/IceUtil/StringConverter.h +175 -0
  185. data/ext/ice/cpp/include/IceUtil/StringUtil.h +91 -0
  186. data/ext/ice/cpp/include/IceUtil/Thread.h +181 -0
  187. data/ext/ice/cpp/include/IceUtil/ThreadException.h +108 -0
  188. data/ext/ice/cpp/include/IceUtil/Time.h +209 -0
  189. data/ext/ice/cpp/include/IceUtil/Timer.h +143 -0
  190. data/ext/ice/cpp/include/IceUtil/UUID.h +22 -0
  191. data/ext/ice/cpp/include/IceUtil/UndefSysMacros.h +42 -0
  192. data/ext/ice/cpp/include/IceUtil/UniquePtr.h +101 -0
  193. data/ext/ice/cpp/include/Slice/CPlusPlusUtil.h +64 -0
  194. data/ext/ice/cpp/include/Slice/Checksum.h +26 -0
  195. data/ext/ice/cpp/include/Slice/CsUtil.h +92 -0
  196. data/ext/ice/cpp/include/Slice/DotNetNames.h +34 -0
  197. data/ext/ice/cpp/include/Slice/FileTracker.h +71 -0
  198. data/ext/ice/cpp/include/Slice/JavaUtil.h +277 -0
  199. data/ext/ice/cpp/include/Slice/Makefile +26 -0
  200. data/ext/ice/cpp/include/Slice/PHPUtil.h +50 -0
  201. data/ext/ice/cpp/include/Slice/Parser.h +1116 -0
  202. data/ext/ice/cpp/include/Slice/Preprocessor.h +68 -0
  203. data/ext/ice/cpp/include/Slice/PythonUtil.h +64 -0
  204. data/ext/ice/cpp/include/Slice/RubyUtil.h +54 -0
  205. data/ext/ice/cpp/include/Slice/Util.h +33 -0
  206. data/ext/ice/cpp/src/Ice/ACM.cpp +343 -0
  207. data/ext/ice/cpp/src/Ice/ACM.h +117 -0
  208. data/ext/ice/cpp/src/Ice/Acceptor.cpp +16 -0
  209. data/ext/ice/cpp/src/Ice/Acceptor.h +41 -0
  210. data/ext/ice/cpp/src/Ice/AcceptorF.h +30 -0
  211. data/ext/ice/cpp/src/Ice/Application.cpp +760 -0
  212. data/ext/ice/cpp/src/Ice/AsyncResult.cpp +599 -0
  213. data/ext/ice/cpp/src/Ice/Base64.cpp +269 -0
  214. data/ext/ice/cpp/src/Ice/Base64.h +36 -0
  215. data/ext/ice/cpp/src/Ice/BasicStream.cpp +3393 -0
  216. data/ext/ice/cpp/src/Ice/Buffer.cpp +98 -0
  217. data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +34 -0
  218. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +718 -0
  219. data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.h +106 -0
  220. data/ext/ice/cpp/src/Ice/Communicator.cpp +45 -0
  221. data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +38 -0
  222. data/ext/ice/cpp/src/Ice/CommunicatorI.cpp +386 -0
  223. data/ext/ice/cpp/src/Ice/CommunicatorI.h +112 -0
  224. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.cpp +546 -0
  225. data/ext/ice/cpp/src/Ice/ConnectRequestHandler.h +97 -0
  226. data/ext/ice/cpp/src/Ice/Connection.cpp +58 -0
  227. data/ext/ice/cpp/src/Ice/ConnectionF.cpp +38 -0
  228. data/ext/ice/cpp/src/Ice/ConnectionFactory.cpp +1639 -0
  229. data/ext/ice/cpp/src/Ice/ConnectionFactory.h +236 -0
  230. data/ext/ice/cpp/src/Ice/ConnectionI.cpp +3876 -0
  231. data/ext/ice/cpp/src/Ice/ConnectionI.h +364 -0
  232. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +115 -0
  233. data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.h +50 -0
  234. data/ext/ice/cpp/src/Ice/Connector.cpp +16 -0
  235. data/ext/ice/cpp/src/Ice/Connector.h +36 -0
  236. data/ext/ice/cpp/src/Ice/ConnectorF.h +26 -0
  237. data/ext/ice/cpp/src/Ice/Current.cpp +38 -0
  238. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +168 -0
  239. data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.h +57 -0
  240. data/ext/ice/cpp/src/Ice/DefaultsAndOverridesF.h +26 -0
  241. data/ext/ice/cpp/src/Ice/DeprecatedStringConverter.cpp +60 -0
  242. data/ext/ice/cpp/src/Ice/DispatchInterceptor.cpp +49 -0
  243. data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +281 -0
  244. data/ext/ice/cpp/src/Ice/Endpoint.cpp +53 -0
  245. data/ext/ice/cpp/src/Ice/EndpointF.cpp +38 -0
  246. data/ext/ice/cpp/src/Ice/EndpointFactory.cpp +25 -0
  247. data/ext/ice/cpp/src/Ice/EndpointFactory.h +44 -0
  248. data/ext/ice/cpp/src/Ice/EndpointFactoryF.h +26 -0
  249. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.cpp +208 -0
  250. data/ext/ice/cpp/src/Ice/EndpointFactoryManager.h +46 -0
  251. data/ext/ice/cpp/src/Ice/EndpointFactoryManagerF.h +26 -0
  252. data/ext/ice/cpp/src/Ice/EndpointI.cpp +87 -0
  253. data/ext/ice/cpp/src/Ice/EndpointI.h +165 -0
  254. data/ext/ice/cpp/src/Ice/EndpointIF.h +41 -0
  255. data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +38 -0
  256. data/ext/ice/cpp/src/Ice/EventHandler.cpp +35 -0
  257. data/ext/ice/cpp/src/Ice/EventHandler.h +78 -0
  258. data/ext/ice/cpp/src/Ice/EventHandlerF.h +26 -0
  259. data/ext/ice/cpp/src/Ice/EventLoggerMsg.h +53 -0
  260. data/ext/ice/cpp/src/Ice/Exception.cpp +832 -0
  261. data/ext/ice/cpp/src/Ice/FacetMap.cpp +34 -0
  262. data/ext/ice/cpp/src/Ice/FactoryTable.cpp +158 -0
  263. data/ext/ice/cpp/src/Ice/FactoryTableInit.cpp +95 -0
  264. data/ext/ice/cpp/src/Ice/GCObject.cpp +444 -0
  265. data/ext/ice/cpp/src/Ice/HashUtil.h +59 -0
  266. data/ext/ice/cpp/src/Ice/HttpParser.cpp +680 -0
  267. data/ext/ice/cpp/src/Ice/HttpParser.h +124 -0
  268. data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +733 -0
  269. data/ext/ice/cpp/src/Ice/IPEndpointI.h +157 -0
  270. data/ext/ice/cpp/src/Ice/IPEndpointIF.h +29 -0
  271. data/ext/ice/cpp/src/Ice/Identity.cpp +42 -0
  272. data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +41 -0
  273. data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +38 -0
  274. data/ext/ice/cpp/src/Ice/ImplicitContextI.cpp +639 -0
  275. data/ext/ice/cpp/src/Ice/ImplicitContextI.h +51 -0
  276. data/ext/ice/cpp/src/Ice/Incoming.cpp +757 -0
  277. data/ext/ice/cpp/src/Ice/IncomingAsync.cpp +340 -0
  278. data/ext/ice/cpp/src/Ice/IncomingRequest.h +37 -0
  279. data/ext/ice/cpp/src/Ice/Initialize.cpp +401 -0
  280. data/ext/ice/cpp/src/Ice/Instance.cpp +1928 -0
  281. data/ext/ice/cpp/src/Ice/Instance.h +198 -0
  282. data/ext/ice/cpp/src/Ice/Instrumentation.cpp +68 -0
  283. data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +43 -0
  284. data/ext/ice/cpp/src/Ice/InstrumentationI.cpp +1083 -0
  285. data/ext/ice/cpp/src/Ice/InstrumentationI.h +262 -0
  286. data/ext/ice/cpp/src/Ice/LocalException.cpp +2091 -0
  287. data/ext/ice/cpp/src/Ice/LocalObject.cpp +29 -0
  288. data/ext/ice/cpp/src/Ice/Locator.cpp +1946 -0
  289. data/ext/ice/cpp/src/Ice/LocatorF.cpp +39 -0
  290. data/ext/ice/cpp/src/Ice/LocatorInfo.cpp +917 -0
  291. data/ext/ice/cpp/src/Ice/LocatorInfo.h +193 -0
  292. data/ext/ice/cpp/src/Ice/LocatorInfoF.h +34 -0
  293. data/ext/ice/cpp/src/Ice/Logger.cpp +40 -0
  294. data/ext/ice/cpp/src/Ice/LoggerAdminI.cpp +862 -0
  295. data/ext/ice/cpp/src/Ice/LoggerAdminI.h +46 -0
  296. data/ext/ice/cpp/src/Ice/LoggerF.cpp +38 -0
  297. data/ext/ice/cpp/src/Ice/LoggerI.cpp +199 -0
  298. data/ext/ice/cpp/src/Ice/LoggerI.h +57 -0
  299. data/ext/ice/cpp/src/Ice/LoggerUtil.cpp +107 -0
  300. data/ext/ice/cpp/src/Ice/Makefile +190 -0
  301. data/ext/ice/cpp/src/Ice/Metrics.cpp +2159 -0
  302. data/ext/ice/cpp/src/Ice/MetricsAdminI.cpp +669 -0
  303. data/ext/ice/cpp/src/Ice/MetricsObserverI.cpp +14 -0
  304. data/ext/ice/cpp/src/Ice/Network.cpp +2694 -0
  305. data/ext/ice/cpp/src/Ice/Network.h +291 -0
  306. data/ext/ice/cpp/src/Ice/NetworkF.h +28 -0
  307. data/ext/ice/cpp/src/Ice/NetworkProxy.cpp +325 -0
  308. data/ext/ice/cpp/src/Ice/NetworkProxy.h +74 -0
  309. data/ext/ice/cpp/src/Ice/NetworkProxyF.h +26 -0
  310. data/ext/ice/cpp/src/Ice/Object.cpp +440 -0
  311. data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +41 -0
  312. data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +38 -0
  313. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +241 -0
  314. data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.h +52 -0
  315. data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +1498 -0
  316. data/ext/ice/cpp/src/Ice/ObjectAdapterI.h +155 -0
  317. data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +41 -0
  318. data/ext/ice/cpp/src/Ice/ObjectFactoryF.cpp +38 -0
  319. data/ext/ice/cpp/src/Ice/ObjectFactoryManager.cpp +140 -0
  320. data/ext/ice/cpp/src/Ice/ObjectFactoryManager.h +43 -0
  321. data/ext/ice/cpp/src/Ice/ObserverHelper.cpp +84 -0
  322. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.cpp +407 -0
  323. data/ext/ice/cpp/src/Ice/OpaqueEndpointI.h +70 -0
  324. data/ext/ice/cpp/src/Ice/Outgoing.cpp +737 -0
  325. data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +874 -0
  326. data/ext/ice/cpp/src/Ice/Plugin.cpp +43 -0
  327. data/ext/ice/cpp/src/Ice/PluginF.cpp +38 -0
  328. data/ext/ice/cpp/src/Ice/PluginManagerI.cpp +503 -0
  329. data/ext/ice/cpp/src/Ice/PluginManagerI.h +67 -0
  330. data/ext/ice/cpp/src/Ice/Process.cpp +299 -0
  331. data/ext/ice/cpp/src/Ice/ProcessF.cpp +39 -0
  332. data/ext/ice/cpp/src/Ice/Properties.cpp +45 -0
  333. data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +555 -0
  334. data/ext/ice/cpp/src/Ice/PropertiesAdminI.cpp +207 -0
  335. data/ext/ice/cpp/src/Ice/PropertiesAdminI.h +45 -0
  336. data/ext/ice/cpp/src/Ice/PropertiesF.cpp +39 -0
  337. data/ext/ice/cpp/src/Ice/PropertiesI.cpp +759 -0
  338. data/ext/ice/cpp/src/Ice/PropertiesI.h +78 -0
  339. data/ext/ice/cpp/src/Ice/PropertyNames.cpp +1293 -0
  340. data/ext/ice/cpp/src/Ice/PropertyNames.h +81 -0
  341. data/ext/ice/cpp/src/Ice/Protocol.cpp +137 -0
  342. data/ext/ice/cpp/src/Ice/ProtocolInstance.cpp +98 -0
  343. data/ext/ice/cpp/src/Ice/ProtocolInstance.h +91 -0
  344. data/ext/ice/cpp/src/Ice/ProtocolInstanceF.h +26 -0
  345. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +51 -0
  346. data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.h +67 -0
  347. data/ext/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +26 -0
  348. data/ext/ice/cpp/src/Ice/Proxy.cpp +1810 -0
  349. data/ext/ice/cpp/src/Ice/ProxyFactory.cpp +305 -0
  350. data/ext/ice/cpp/src/Ice/ProxyFactory.h +57 -0
  351. data/ext/ice/cpp/src/Ice/Reference.cpp +1947 -0
  352. data/ext/ice/cpp/src/Ice/Reference.h +305 -0
  353. data/ext/ice/cpp/src/Ice/ReferenceFactory.cpp +937 -0
  354. data/ext/ice/cpp/src/Ice/ReferenceFactory.h +81 -0
  355. data/ext/ice/cpp/src/Ice/ReferenceFactoryF.h +24 -0
  356. data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +958 -0
  357. data/ext/ice/cpp/src/Ice/ReplyStatus.h +29 -0
  358. data/ext/ice/cpp/src/Ice/RequestHandler.cpp +40 -0
  359. data/ext/ice/cpp/src/Ice/RequestHandler.h +90 -0
  360. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.cpp +70 -0
  361. data/ext/ice/cpp/src/Ice/RequestHandlerFactory.h +41 -0
  362. data/ext/ice/cpp/src/Ice/ResponseHandler.cpp +20 -0
  363. data/ext/ice/cpp/src/Ice/ResponseHandler.h +39 -0
  364. data/ext/ice/cpp/src/Ice/RetryQueue.cpp +154 -0
  365. data/ext/ice/cpp/src/Ice/RetryQueue.h +69 -0
  366. data/ext/ice/cpp/src/Ice/RetryQueueF.h +24 -0
  367. data/ext/ice/cpp/src/Ice/Router.cpp +849 -0
  368. data/ext/ice/cpp/src/Ice/RouterF.cpp +39 -0
  369. data/ext/ice/cpp/src/Ice/RouterInfo.cpp +381 -0
  370. data/ext/ice/cpp/src/Ice/RouterInfo.h +148 -0
  371. data/ext/ice/cpp/src/Ice/RouterInfoF.h +30 -0
  372. data/ext/ice/cpp/src/Ice/Selector.cpp +926 -0
  373. data/ext/ice/cpp/src/Ice/Selector.h +231 -0
  374. data/ext/ice/cpp/src/Ice/ServantLocator.cpp +41 -0
  375. data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +38 -0
  376. data/ext/ice/cpp/src/Ice/ServantManager.cpp +495 -0
  377. data/ext/ice/cpp/src/Ice/ServantManager.h +74 -0
  378. data/ext/ice/cpp/src/Ice/Service.cpp +1897 -0
  379. data/ext/ice/cpp/src/Ice/SharedContext.h +51 -0
  380. data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +34 -0
  381. data/ext/ice/cpp/src/Ice/SliceChecksums.cpp +80 -0
  382. data/ext/ice/cpp/src/Ice/SlicedData.cpp +80 -0
  383. data/ext/ice/cpp/src/Ice/Stream.cpp +53 -0
  384. data/ext/ice/cpp/src/Ice/StreamI.cpp +832 -0
  385. data/ext/ice/cpp/src/Ice/StreamI.h +198 -0
  386. data/ext/ice/cpp/src/Ice/StreamSocket.cpp +521 -0
  387. data/ext/ice/cpp/src/Ice/StreamSocket.h +85 -0
  388. data/ext/ice/cpp/src/Ice/StringConverterPlugin.cpp +145 -0
  389. data/ext/ice/cpp/src/Ice/SysLoggerI.cpp +167 -0
  390. data/ext/ice/cpp/src/Ice/SysLoggerI.h +43 -0
  391. data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +235 -0
  392. data/ext/ice/cpp/src/Ice/TcpAcceptor.h +67 -0
  393. data/ext/ice/cpp/src/Ice/TcpConnector.cpp +133 -0
  394. data/ext/ice/cpp/src/Ice/TcpConnector.h +51 -0
  395. data/ext/ice/cpp/src/Ice/TcpEndpointI.cpp +397 -0
  396. data/ext/ice/cpp/src/Ice/TcpEndpointI.h +93 -0
  397. data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +127 -0
  398. data/ext/ice/cpp/src/Ice/TcpTransceiver.h +61 -0
  399. data/ext/ice/cpp/src/Ice/ThreadPool.cpp +1357 -0
  400. data/ext/ice/cpp/src/Ice/ThreadPool.h +399 -0
  401. data/ext/ice/cpp/src/Ice/TraceLevels.cpp +43 -0
  402. data/ext/ice/cpp/src/Ice/TraceLevels.h +50 -0
  403. data/ext/ice/cpp/src/Ice/TraceLevelsF.h +26 -0
  404. data/ext/ice/cpp/src/Ice/TraceUtil.cpp +452 -0
  405. data/ext/ice/cpp/src/Ice/TraceUtil.h +28 -0
  406. data/ext/ice/cpp/src/Ice/Transceiver.cpp +24 -0
  407. data/ext/ice/cpp/src/Ice/Transceiver.h +52 -0
  408. data/ext/ice/cpp/src/Ice/TransceiverF.h +38 -0
  409. data/ext/ice/cpp/src/Ice/UdpConnector.cpp +144 -0
  410. data/ext/ice/cpp/src/Ice/UdpConnector.h +51 -0
  411. data/ext/ice/cpp/src/Ice/UdpEndpointI.cpp +483 -0
  412. data/ext/ice/cpp/src/Ice/UdpEndpointI.h +95 -0
  413. data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +1156 -0
  414. data/ext/ice/cpp/src/Ice/UdpTransceiver.h +123 -0
  415. data/ext/ice/cpp/src/Ice/Version.cpp +46 -0
  416. data/ext/ice/cpp/src/Ice/WSAcceptor.cpp +103 -0
  417. data/ext/ice/cpp/src/Ice/WSAcceptor.h +61 -0
  418. data/ext/ice/cpp/src/Ice/WSConnector.cpp +113 -0
  419. data/ext/ice/cpp/src/Ice/WSConnector.h +51 -0
  420. data/ext/ice/cpp/src/Ice/WSEndpoint.cpp +441 -0
  421. data/ext/ice/cpp/src/Ice/WSEndpoint.h +97 -0
  422. data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +1728 -0
  423. data/ext/ice/cpp/src/Ice/WSTransceiver.h +149 -0
  424. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +594 -0
  425. data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +1035 -0
  426. data/ext/ice/cpp/src/IceDiscovery/LocatorI.cpp +208 -0
  427. data/ext/ice/cpp/src/IceDiscovery/LocatorI.h +78 -0
  428. data/ext/ice/cpp/src/IceDiscovery/LookupI.cpp +308 -0
  429. data/ext/ice/cpp/src/IceDiscovery/LookupI.h +183 -0
  430. data/ext/ice/cpp/src/IceDiscovery/Makefile +61 -0
  431. data/ext/ice/cpp/src/IceDiscovery/PluginI.cpp +148 -0
  432. data/ext/ice/cpp/src/IceDiscovery/PluginI.h +39 -0
  433. data/ext/ice/cpp/src/IceSSL/AcceptorI.cpp +258 -0
  434. data/ext/ice/cpp/src/IceSSL/AcceptorI.h +66 -0
  435. data/ext/ice/cpp/src/IceSSL/Certificate.cpp +1334 -0
  436. data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +42 -0
  437. data/ext/ice/cpp/src/IceSSL/ConnectorI.cpp +151 -0
  438. data/ext/ice/cpp/src/IceSSL/ConnectorI.h +56 -0
  439. data/ext/ice/cpp/src/IceSSL/EndpointI.cpp +397 -0
  440. data/ext/ice/cpp/src/IceSSL/EndpointI.h +96 -0
  441. data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +41 -0
  442. data/ext/ice/cpp/src/IceSSL/Instance.cpp +38 -0
  443. data/ext/ice/cpp/src/IceSSL/Instance.h +42 -0
  444. data/ext/ice/cpp/src/IceSSL/InstanceF.h +34 -0
  445. data/ext/ice/cpp/src/IceSSL/Makefile +82 -0
  446. data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +1001 -0
  447. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +607 -0
  448. data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +75 -0
  449. data/ext/ice/cpp/src/IceSSL/PluginI.cpp +102 -0
  450. data/ext/ice/cpp/src/IceSSL/PluginI.h +56 -0
  451. data/ext/ice/cpp/src/IceSSL/RFC2253.cpp +541 -0
  452. data/ext/ice/cpp/src/IceSSL/RFC2253.h +67 -0
  453. data/ext/ice/cpp/src/IceSSL/SChannelEngine.cpp +729 -0
  454. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +1062 -0
  455. data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.h +130 -0
  456. data/ext/ice/cpp/src/IceSSL/SSLEngine.cpp +291 -0
  457. data/ext/ice/cpp/src/IceSSL/SSLEngine.h +264 -0
  458. data/ext/ice/cpp/src/IceSSL/SSLEngineF.h +41 -0
  459. data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +1514 -0
  460. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +609 -0
  461. data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +91 -0
  462. data/ext/ice/cpp/src/IceSSL/TrustManager.cpp +246 -0
  463. data/ext/ice/cpp/src/IceSSL/TrustManager.h +51 -0
  464. data/ext/ice/cpp/src/IceSSL/TrustManagerF.h +26 -0
  465. data/ext/ice/cpp/src/IceSSL/Util.cpp +1423 -0
  466. data/ext/ice/cpp/src/IceSSL/Util.h +136 -0
  467. data/ext/ice/cpp/src/IceUtil/ArgVector.cpp +65 -0
  468. data/ext/ice/cpp/src/IceUtil/ArgVector.h +41 -0
  469. data/ext/ice/cpp/src/IceUtil/Cond.cpp +386 -0
  470. data/ext/ice/cpp/src/IceUtil/ConvertUTF.cpp +477 -0
  471. data/ext/ice/cpp/src/IceUtil/ConvertUTF.h +144 -0
  472. data/ext/ice/cpp/src/IceUtil/CountDownLatch.cpp +184 -0
  473. data/ext/ice/cpp/src/IceUtil/CtrlCHandler.cpp +273 -0
  474. data/ext/ice/cpp/src/IceUtil/Exception.cpp +782 -0
  475. data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +532 -0
  476. data/ext/ice/cpp/src/IceUtil/FileUtil.h +159 -0
  477. data/ext/ice/cpp/src/IceUtil/InputUtil.cpp +41 -0
  478. data/ext/ice/cpp/src/IceUtil/Makefile +68 -0
  479. data/ext/ice/cpp/src/IceUtil/MutexProtocol.cpp +24 -0
  480. data/ext/ice/cpp/src/IceUtil/Options.cpp +1049 -0
  481. data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +591 -0
  482. data/ext/ice/cpp/src/IceUtil/Random.cpp +185 -0
  483. data/ext/ice/cpp/src/IceUtil/RecMutex.cpp +257 -0
  484. data/ext/ice/cpp/src/IceUtil/SHA1.cpp +126 -0
  485. data/ext/ice/cpp/src/IceUtil/Shared.cpp +200 -0
  486. data/ext/ice/cpp/src/IceUtil/StopWatch.h +54 -0
  487. data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +450 -0
  488. data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +842 -0
  489. data/ext/ice/cpp/src/IceUtil/Thread.cpp +809 -0
  490. data/ext/ice/cpp/src/IceUtil/ThreadException.cpp +172 -0
  491. data/ext/ice/cpp/src/IceUtil/Time.cpp +306 -0
  492. data/ext/ice/cpp/src/IceUtil/Timer.cpp +251 -0
  493. data/ext/ice/cpp/src/IceUtil/UUID.cpp +174 -0
  494. data/ext/ice/cpp/src/IceUtil/Unicode.cpp +131 -0
  495. data/ext/ice/cpp/src/IceUtil/Unicode.h +49 -0
  496. data/ext/ice/cpp/src/Slice/CPlusPlusUtil.cpp +1139 -0
  497. data/ext/ice/cpp/src/Slice/Checksum.cpp +452 -0
  498. data/ext/ice/cpp/src/Slice/CsUtil.cpp +2650 -0
  499. data/ext/ice/cpp/src/Slice/DotNetNames.cpp +146 -0
  500. data/ext/ice/cpp/src/Slice/FileTracker.cpp +203 -0
  501. data/ext/ice/cpp/src/Slice/Grammar.cpp +4755 -0
  502. data/ext/ice/cpp/src/Slice/Grammar.h +98 -0
  503. data/ext/ice/cpp/src/Slice/GrammarUtil.h +234 -0
  504. data/ext/ice/cpp/src/Slice/JavaUtil.cpp +4376 -0
  505. data/ext/ice/cpp/src/Slice/MD5.cpp +57 -0
  506. data/ext/ice/cpp/src/Slice/MD5.h +44 -0
  507. data/ext/ice/cpp/src/Slice/MD5I.cpp +385 -0
  508. data/ext/ice/cpp/src/Slice/MD5I.h +91 -0
  509. data/ext/ice/cpp/src/Slice/Makefile +65 -0
  510. data/ext/ice/cpp/src/Slice/PHPUtil.cpp +156 -0
  511. data/ext/ice/cpp/src/Slice/Parser.cpp +6386 -0
  512. data/ext/ice/cpp/src/Slice/Preprocessor.cpp +686 -0
  513. data/ext/ice/cpp/src/Slice/Python.cpp +675 -0
  514. data/ext/ice/cpp/src/Slice/PythonUtil.cpp +2614 -0
  515. data/ext/ice/cpp/src/Slice/Ruby.cpp +317 -0
  516. data/ext/ice/cpp/src/Slice/RubyUtil.cpp +1774 -0
  517. data/ext/ice/cpp/src/Slice/Scanner.cpp +2426 -0
  518. data/ext/ice/cpp/src/Slice/Util.cpp +325 -0
  519. data/ext/ice/mcpp/config.h.Darwin +227 -0
  520. data/ext/ice/mcpp/config.h.Linux +227 -0
  521. data/ext/ice/mcpp/config.h.MINGW +7 -0
  522. data/ext/ice/mcpp/configed.H +382 -0
  523. data/ext/ice/mcpp/directive.c +1699 -0
  524. data/ext/ice/mcpp/eval.c +1673 -0
  525. data/ext/ice/mcpp/expand.c +2980 -0
  526. data/ext/ice/mcpp/internal.H +564 -0
  527. data/ext/ice/mcpp/main.c +1131 -0
  528. data/ext/ice/mcpp/mbchar.c +869 -0
  529. data/ext/ice/mcpp/mcpp_lib.h +31 -0
  530. data/ext/ice/mcpp/mcpp_out.h +13 -0
  531. data/ext/ice/mcpp/support.c +2811 -0
  532. data/ext/ice/mcpp/system.H +396 -0
  533. data/ext/ice/mcpp/system.c +4940 -0
  534. data/ice.gemspec +41 -0
  535. data/lib/Glacier2.rb +12 -0
  536. data/lib/Glacier2/Metrics.rb +99 -0
  537. data/lib/Glacier2/PermissionsVerifier.rb +168 -0
  538. data/lib/Glacier2/PermissionsVerifierF.rb +34 -0
  539. data/lib/Glacier2/Router.rb +141 -0
  540. data/lib/Glacier2/RouterF.rb +29 -0
  541. data/lib/Glacier2/SSLInfo.rb +79 -0
  542. data/lib/Glacier2/Session.rb +470 -0
  543. data/lib/Ice.rb +659 -0
  544. data/lib/Ice/BuiltinSequences.rb +64 -0
  545. data/lib/Ice/Communicator.rb +93 -0
  546. data/lib/Ice/CommunicatorF.rb +28 -0
  547. data/lib/Ice/Connection.rb +414 -0
  548. data/lib/Ice/ConnectionF.rb +36 -0
  549. data/lib/Ice/Current.rb +152 -0
  550. data/lib/Ice/Endpoint.rb +265 -0
  551. data/lib/Ice/EndpointF.rb +52 -0
  552. data/lib/Ice/EndpointTypes.rb +77 -0
  553. data/lib/Ice/FacetMap.rb +28 -0
  554. data/lib/Ice/Identity.rb +70 -0
  555. data/lib/Ice/ImplicitContext.rb +59 -0
  556. data/lib/Ice/ImplicitContextF.rb +28 -0
  557. data/lib/Ice/Instrumentation.rb +425 -0
  558. data/lib/Ice/InstrumentationF.rb +35 -0
  559. data/lib/Ice/LocalException.rb +1081 -0
  560. data/lib/Ice/Locator.rb +314 -0
  561. data/lib/Ice/LocatorF.rb +34 -0
  562. data/lib/Ice/Logger.rb +57 -0
  563. data/lib/Ice/LoggerF.rb +28 -0
  564. data/lib/Ice/Metrics.rb +696 -0
  565. data/lib/Ice/ObjectAdapterF.rb +28 -0
  566. data/lib/Ice/ObjectFactory.rb +53 -0
  567. data/lib/Ice/ObjectFactoryF.rb +28 -0
  568. data/lib/Ice/Plugin.rb +87 -0
  569. data/lib/Ice/PluginF.rb +32 -0
  570. data/lib/Ice/Process.rb +93 -0
  571. data/lib/Ice/ProcessF.rb +29 -0
  572. data/lib/Ice/Properties.rb +65 -0
  573. data/lib/Ice/PropertiesAdmin.rb +104 -0
  574. data/lib/Ice/PropertiesF.rb +33 -0
  575. data/lib/Ice/Router.rb +163 -0
  576. data/lib/Ice/RouterF.rb +29 -0
  577. data/lib/Ice/SliceChecksumDict.rb +28 -0
  578. data/lib/Ice/Version.rb +100 -0
  579. data/lib/IceBox.rb +10 -0
  580. data/lib/IceBox/IceBox.rb +272 -0
  581. data/lib/IceGrid.rb +17 -0
  582. data/lib/IceGrid/Admin.rb +1076 -0
  583. data/lib/IceGrid/Descriptor.rb +1505 -0
  584. data/lib/IceGrid/Exception.rb +401 -0
  585. data/lib/IceGrid/FileParser.rb +105 -0
  586. data/lib/IceGrid/Locator.rb +105 -0
  587. data/lib/IceGrid/Observer.rb +571 -0
  588. data/lib/IceGrid/Query.rb +168 -0
  589. data/lib/IceGrid/Registry.rb +120 -0
  590. data/lib/IceGrid/Session.rb +114 -0
  591. data/lib/IceGrid/UserAccountMapper.rb +101 -0
  592. data/lib/IcePatch2.rb +10 -0
  593. data/lib/IcePatch2/FileInfo.rb +75 -0
  594. data/lib/IcePatch2/FileServer.rb +141 -0
  595. data/lib/IceStorm.rb +11 -0
  596. data/lib/IceStorm/IceStorm.rb +463 -0
  597. data/lib/IceStorm/Metrics.rb +155 -0
  598. data/slice/Freeze/BackgroundSaveEvictor.ice +111 -0
  599. data/slice/Freeze/CatalogData.ice +49 -0
  600. data/slice/Freeze/Connection.ice +111 -0
  601. data/slice/Freeze/ConnectionF.ice +20 -0
  602. data/slice/Freeze/DB.ice +37 -0
  603. data/slice/Freeze/Evictor.ice +339 -0
  604. data/slice/Freeze/EvictorF.ice +22 -0
  605. data/slice/Freeze/EvictorStorage.ice +72 -0
  606. data/slice/Freeze/Exception.ice +100 -0
  607. data/slice/Freeze/Transaction.ice +57 -0
  608. data/slice/Freeze/TransactionalEvictor.ice +50 -0
  609. data/slice/Glacier2/Metrics.ice +77 -0
  610. data/slice/Glacier2/PermissionsVerifier.ice +105 -0
  611. data/slice/Glacier2/PermissionsVerifierF.ice +21 -0
  612. data/slice/Glacier2/Router.ice +178 -0
  613. data/slice/Glacier2/RouterF.ice +20 -0
  614. data/slice/Glacier2/SSLInfo.ice +50 -0
  615. data/slice/Glacier2/Session.ice +273 -0
  616. data/slice/Ice/BuiltinSequences.ice +48 -0
  617. data/slice/Ice/Communicator.ice +567 -0
  618. data/slice/Ice/CommunicatorF.ice +20 -0
  619. data/slice/Ice/Connection.ice +323 -0
  620. data/slice/Ice/ConnectionF.ice +22 -0
  621. data/slice/Ice/Current.ice +160 -0
  622. data/slice/Ice/Endpoint.ice +227 -0
  623. data/slice/Ice/EndpointF.ice +32 -0
  624. data/slice/Ice/EndpointTypes.ice +38 -0
  625. data/slice/Ice/FacetMap.ice +25 -0
  626. data/slice/Ice/Identity.ice +59 -0
  627. data/slice/Ice/ImplicitContext.ice +109 -0
  628. data/slice/Ice/ImplicitContextF.ice +20 -0
  629. data/slice/Ice/Instrumentation.ice +499 -0
  630. data/slice/Ice/InstrumentationF.ice +26 -0
  631. data/slice/Ice/LocalException.ice +1015 -0
  632. data/slice/Ice/Locator.ice +227 -0
  633. data/slice/Ice/LocatorF.ice +21 -0
  634. data/slice/Ice/Logger.ice +86 -0
  635. data/slice/Ice/LoggerF.ice +20 -0
  636. data/slice/Ice/Metrics.ice +422 -0
  637. data/slice/Ice/ObjectAdapter.ice +673 -0
  638. data/slice/Ice/ObjectAdapterF.ice +20 -0
  639. data/slice/Ice/ObjectFactory.ice +60 -0
  640. data/slice/Ice/ObjectFactoryF.ice +20 -0
  641. data/slice/Ice/Plugin.ice +117 -0
  642. data/slice/Ice/PluginF.ice +21 -0
  643. data/slice/Ice/Process.ice +54 -0
  644. data/slice/Ice/ProcessF.ice +20 -0
  645. data/slice/Ice/Properties.ice +228 -0
  646. data/slice/Ice/PropertiesAdmin.ice +75 -0
  647. data/slice/Ice/PropertiesF.ice +21 -0
  648. data/slice/Ice/RemoteLogger.ice +232 -0
  649. data/slice/Ice/Router.ice +83 -0
  650. data/slice/Ice/RouterF.ice +20 -0
  651. data/slice/Ice/ServantLocator.ice +117 -0
  652. data/slice/Ice/ServantLocatorF.ice +20 -0
  653. data/slice/Ice/SliceChecksumDict.ice +25 -0
  654. data/slice/Ice/Version.ice +39 -0
  655. data/slice/IceBox/IceBox.ice +194 -0
  656. data/slice/IceDiscovery/IceDiscovery.ice +32 -0
  657. data/slice/IceGrid/Admin.ice +1578 -0
  658. data/slice/IceGrid/Descriptor.ice +1079 -0
  659. data/slice/IceGrid/Discovery.ice +73 -0
  660. data/slice/IceGrid/Exception.ice +383 -0
  661. data/slice/IceGrid/FileParser.ice +61 -0
  662. data/slice/IceGrid/Locator.ice +56 -0
  663. data/slice/IceGrid/Observer.ice +394 -0
  664. data/slice/IceGrid/PluginFacade.ice +316 -0
  665. data/slice/IceGrid/Query.ice +130 -0
  666. data/slice/IceGrid/Registry.ice +138 -0
  667. data/slice/IceGrid/Session.ice +124 -0
  668. data/slice/IceGrid/UserAccountMapper.ice +58 -0
  669. data/slice/IcePatch2/FileInfo.ice +49 -0
  670. data/slice/IcePatch2/FileServer.ice +129 -0
  671. data/slice/IceSSL/ConnectionInfo.ice +34 -0
  672. data/slice/IceSSL/EndpointInfo.ice +41 -0
  673. data/slice/IceStorm/IceStorm.ice +405 -0
  674. data/slice/IceStorm/Metrics.ice +71 -0
  675. metadata +737 -0
@@ -0,0 +1,41 @@
1
+ // **********************************************************************
2
+ //
3
+ // Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
4
+ //
5
+ // This copy of Ice is licensed to you under the terms described in the
6
+ // ICE_LICENSE file included in this distribution.
7
+ //
8
+ // **********************************************************************
9
+ //
10
+ // Ice version 3.6b
11
+ //
12
+ // <auto-generated>
13
+ //
14
+ // Generated from file `ObjectAdapter.ice'
15
+ //
16
+ // Warning: do not edit this file.
17
+ //
18
+ // </auto-generated>
19
+ //
20
+
21
+ #ifndef ICE_API_EXPORTS
22
+ # define ICE_API_EXPORTS
23
+ #endif
24
+ #include <Ice/ObjectAdapter.h>
25
+ #include <IceUtil/PushDisableWarnings.h>
26
+ #include <Ice/BasicStream.h>
27
+ #include <IceUtil/Iterator.h>
28
+ #include <IceUtil/PopDisableWarnings.h>
29
+
30
+ #ifndef ICE_IGNORE_VERSION
31
+ # if ICE_INT_VERSION != 30651
32
+ # error Ice version mismatch: an exact match is required for beta generated code
33
+ # endif
34
+ #endif
35
+
36
+ namespace
37
+ {
38
+
39
+ }
40
+
41
+ ICE_DECLSPEC_EXPORT ::Ice::LocalObject* Ice::upCast(::Ice::ObjectAdapter* p) { return p; }
@@ -0,0 +1,38 @@
1
+ // **********************************************************************
2
+ //
3
+ // Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
4
+ //
5
+ // This copy of Ice is licensed to you under the terms described in the
6
+ // ICE_LICENSE file included in this distribution.
7
+ //
8
+ // **********************************************************************
9
+ //
10
+ // Ice version 3.6b
11
+ //
12
+ // <auto-generated>
13
+ //
14
+ // Generated from file `ObjectAdapterF.ice'
15
+ //
16
+ // Warning: do not edit this file.
17
+ //
18
+ // </auto-generated>
19
+ //
20
+
21
+ #ifndef ICE_API_EXPORTS
22
+ # define ICE_API_EXPORTS
23
+ #endif
24
+ #include <Ice/ObjectAdapterF.h>
25
+ #include <IceUtil/PushDisableWarnings.h>
26
+ #include <IceUtil/Iterator.h>
27
+ #include <IceUtil/PopDisableWarnings.h>
28
+
29
+ #ifndef ICE_IGNORE_VERSION
30
+ # if ICE_INT_VERSION != 30651
31
+ # error Ice version mismatch: an exact match is required for beta generated code
32
+ # endif
33
+ #endif
34
+
35
+ namespace
36
+ {
37
+
38
+ }
@@ -0,0 +1,241 @@
1
+ // **********************************************************************
2
+ //
3
+ // Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
4
+ //
5
+ // This copy of Ice is licensed to you under the terms described in the
6
+ // ICE_LICENSE file included in this distribution.
7
+ //
8
+ // **********************************************************************
9
+
10
+ #include <Ice/ObjectAdapterFactory.h>
11
+ #include <Ice/ObjectAdapterI.h>
12
+ #include <Ice/Object.h>
13
+ #include <Ice/LocalException.h>
14
+ #include <Ice/Functional.h>
15
+ #include <IceUtil/UUID.h>
16
+
17
+ using namespace std;
18
+ using namespace Ice;
19
+ using namespace IceInternal;
20
+
21
+ IceUtil::Shared* IceInternal::upCast(ObjectAdapterFactory* p) { return p; }
22
+
23
+ void
24
+ IceInternal::ObjectAdapterFactory::shutdown()
25
+ {
26
+ list<ObjectAdapterIPtr> adapters;
27
+
28
+ {
29
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
30
+
31
+ //
32
+ // Ignore shutdown requests if the object adapter factory has
33
+ // already been shut down.
34
+ //
35
+ if(!_instance)
36
+ {
37
+ return;
38
+ }
39
+
40
+ adapters = _adapters;
41
+
42
+ _instance = 0;
43
+ _communicator = 0;
44
+
45
+ notifyAll();
46
+ }
47
+
48
+ //
49
+ // Deactivate outside the thread synchronization, to avoid
50
+ // deadlocks.
51
+ //
52
+ for_each(adapters.begin(), adapters.end(), IceUtil::voidMemFun(&ObjectAdapter::deactivate));
53
+ }
54
+
55
+ void
56
+ IceInternal::ObjectAdapterFactory::waitForShutdown()
57
+ {
58
+ list<ObjectAdapterIPtr> adapters;
59
+
60
+ {
61
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
62
+
63
+ //
64
+ // First we wait for the shutdown of the factory itself.
65
+ //
66
+ while(_instance)
67
+ {
68
+ wait();
69
+ }
70
+
71
+ adapters = _adapters;
72
+ }
73
+
74
+ //
75
+ // Now we wait for deactivation of each object adapter.
76
+ //
77
+ for_each(adapters.begin(), adapters.end(), IceUtil::voidMemFun(&ObjectAdapter::waitForDeactivate));
78
+ }
79
+
80
+ bool
81
+ IceInternal::ObjectAdapterFactory::isShutdown() const
82
+ {
83
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
84
+
85
+ return _instance == 0;
86
+ }
87
+
88
+ void
89
+ IceInternal::ObjectAdapterFactory::destroy()
90
+ {
91
+ //
92
+ // First wait for shutdown to finish.
93
+ //
94
+ waitForShutdown();
95
+
96
+ list<ObjectAdapterIPtr> adapters;
97
+
98
+ {
99
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
100
+ adapters = _adapters;
101
+ }
102
+
103
+ //
104
+ // Now we destroy each object adapter.
105
+ //
106
+ for_each(adapters.begin(), adapters.end(), IceUtil::voidMemFun(&ObjectAdapter::destroy));
107
+
108
+ {
109
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
110
+ _adapters.clear();
111
+ }
112
+ }
113
+
114
+ void
115
+ IceInternal::ObjectAdapterFactory::updateObservers(void (ObjectAdapterI::*fn)())
116
+ {
117
+ list<ObjectAdapterIPtr> adapters;
118
+
119
+ {
120
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
121
+ adapters = _adapters;
122
+ }
123
+
124
+ for_each(adapters.begin(), adapters.end(), IceUtil::voidMemFun(fn));
125
+ }
126
+
127
+ ObjectAdapterPtr
128
+ IceInternal::ObjectAdapterFactory::createObjectAdapter(const string& name, const RouterPrx& router)
129
+ {
130
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
131
+
132
+ if(!_instance)
133
+ {
134
+ throw CommunicatorDestroyedException(__FILE__, __LINE__);
135
+ }
136
+
137
+ ObjectAdapterIPtr adapter;
138
+ if(name.empty())
139
+ {
140
+ string uuid = IceUtil::generateUUID();
141
+ adapter = new ObjectAdapterI(_instance, _communicator, this, uuid, true);
142
+ adapter->initialize(0);
143
+ }
144
+ else
145
+ {
146
+ if(_adapterNamesInUse.find(name) != _adapterNamesInUse.end())
147
+ {
148
+ throw AlreadyRegisteredException(__FILE__, __LINE__, "object adapter", name);
149
+ }
150
+ adapter = new ObjectAdapterI(_instance, _communicator, this, name, false);
151
+ adapter->initialize(router);
152
+ _adapterNamesInUse.insert(name);
153
+ }
154
+
155
+ _adapters.push_back(adapter);
156
+ return adapter;
157
+ }
158
+
159
+ ObjectAdapterPtr
160
+ IceInternal::ObjectAdapterFactory::findObjectAdapter(const ObjectPrx& proxy)
161
+ {
162
+ list<ObjectAdapterIPtr> adapters;
163
+ {
164
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
165
+
166
+ if(!_instance)
167
+ {
168
+ return 0;
169
+ }
170
+
171
+ adapters = _adapters;
172
+ }
173
+
174
+ for(list<ObjectAdapterIPtr>::iterator p = adapters.begin(); p != adapters.end(); ++p)
175
+ {
176
+ try
177
+ {
178
+ if((*p)->isLocal(proxy))
179
+ {
180
+ return *p;
181
+ }
182
+ }
183
+ catch(const ObjectAdapterDeactivatedException&)
184
+ {
185
+ // Ignore.
186
+ }
187
+ }
188
+
189
+ return 0;
190
+ }
191
+
192
+ void
193
+ IceInternal::ObjectAdapterFactory::removeObjectAdapter(const ObjectAdapterPtr& adapter)
194
+ {
195
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
196
+
197
+ if(!_instance)
198
+ {
199
+ return;
200
+ }
201
+
202
+ for(list<ObjectAdapterIPtr>::iterator p = _adapters.begin(); p != _adapters.end(); ++p)
203
+ {
204
+ if(*p == adapter)
205
+ {
206
+ _adapters.erase(p);
207
+ break;
208
+ }
209
+ }
210
+ _adapterNamesInUse.erase(adapter->getName());
211
+ }
212
+
213
+ void
214
+ IceInternal::ObjectAdapterFactory::flushAsyncBatchRequests(const CommunicatorFlushBatchPtr& outAsync) const
215
+ {
216
+ list<ObjectAdapterIPtr> adapters;
217
+ {
218
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
219
+
220
+ adapters = _adapters;
221
+ }
222
+
223
+ for(list<ObjectAdapterIPtr>::const_iterator p = adapters.begin(); p != adapters.end(); ++p)
224
+ {
225
+ (*p)->flushAsyncBatchRequests(outAsync);
226
+ }
227
+ }
228
+
229
+ IceInternal::ObjectAdapterFactory::ObjectAdapterFactory(const InstancePtr& instance,
230
+ const CommunicatorPtr& communicator) :
231
+ _instance(instance),
232
+ _communicator(communicator)
233
+ {
234
+ }
235
+
236
+ IceInternal::ObjectAdapterFactory::~ObjectAdapterFactory()
237
+ {
238
+ assert(!_instance);
239
+ assert(!_communicator);
240
+ assert(_adapters.empty());
241
+ }
@@ -0,0 +1,52 @@
1
+ // **********************************************************************
2
+ //
3
+ // Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
4
+ //
5
+ // This copy of Ice is licensed to you under the terms described in the
6
+ // ICE_LICENSE file included in this distribution.
7
+ //
8
+ // **********************************************************************
9
+
10
+ #ifndef ICE_OBJECT_ADAPTER_FACTORY_H
11
+ #define ICE_OBJECT_ADAPTER_FACTORY_H
12
+
13
+ #include <Ice/ObjectAdapterI.h>
14
+ #include <IceUtil/RecMutex.h>
15
+ #include <IceUtil/Monitor.h>
16
+
17
+ #include <set>
18
+
19
+ namespace IceInternal
20
+ {
21
+
22
+ class ObjectAdapterFactory : public ::IceUtil::Shared, public ::IceUtil::Monitor< ::IceUtil::RecMutex>
23
+ {
24
+ public:
25
+
26
+ void shutdown();
27
+ void waitForShutdown();
28
+ bool isShutdown() const;
29
+ void destroy();
30
+
31
+ void updateObservers(void (Ice::ObjectAdapterI::*)());
32
+
33
+ ::Ice::ObjectAdapterPtr createObjectAdapter(const std::string&, const Ice::RouterPrx&);
34
+ ::Ice::ObjectAdapterPtr findObjectAdapter(const ::Ice::ObjectPrx&);
35
+ void removeObjectAdapter(const ::Ice::ObjectAdapterPtr&);
36
+ void flushAsyncBatchRequests(const CommunicatorFlushBatchPtr&) const;
37
+
38
+ private:
39
+
40
+ ObjectAdapterFactory(const InstancePtr&, const ::Ice::CommunicatorPtr&);
41
+ virtual ~ObjectAdapterFactory();
42
+ friend class Instance;
43
+
44
+ InstancePtr _instance;
45
+ ::Ice::CommunicatorPtr _communicator;
46
+ std::set<std::string> _adapterNamesInUse;
47
+ std::list<Ice::ObjectAdapterIPtr> _adapters;
48
+ };
49
+
50
+ }
51
+
52
+ #endif
@@ -0,0 +1,1498 @@
1
+ // **********************************************************************
2
+ //
3
+ // Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
4
+ //
5
+ // This copy of Ice is licensed to you under the terms described in the
6
+ // ICE_LICENSE file included in this distribution.
7
+ //
8
+ // **********************************************************************
9
+
10
+ #include <IceUtil/UUID.h>
11
+ #include <Ice/ObjectAdapterI.h>
12
+ #include <Ice/ObjectAdapterFactory.h>
13
+ #include <Ice/Instance.h>
14
+ #include <Ice/Proxy.h>
15
+ #include <Ice/ProxyFactory.h>
16
+ #include <Ice/ReferenceFactory.h>
17
+ #include <Ice/EndpointI.h>
18
+ #include <Ice/EndpointFactoryManager.h>
19
+ #include <Ice/ConnectionFactory.h>
20
+ #include <Ice/ServantManager.h>
21
+ #include <Ice/RouterInfo.h>
22
+ #include <Ice/LocalException.h>
23
+ #include <Ice/Properties.h>
24
+ #include <Ice/Functional.h>
25
+ #include <Ice/LocatorInfo.h>
26
+ #include <Ice/Locator.h>
27
+ #include <Ice/LoggerUtil.h>
28
+ #include <Ice/ThreadPool.h>
29
+ #include <Ice/Communicator.h>
30
+ #include <Ice/Router.h>
31
+ #include <Ice/DefaultsAndOverrides.h>
32
+ #include <Ice/TraceLevels.h>
33
+ #include <Ice/PropertyNames.h>
34
+
35
+ #ifdef _WIN32
36
+ # include <sys/timeb.h>
37
+ #else
38
+ # include <sys/time.h>
39
+ #endif
40
+
41
+ #include <iterator>
42
+
43
+ using namespace std;
44
+ using namespace Ice;
45
+ using namespace IceInternal;
46
+
47
+ namespace
48
+ {
49
+ inline void checkIdentity(const Identity& ident)
50
+ {
51
+ if(ident.name.empty())
52
+ {
53
+ throw IllegalIdentityException(__FILE__, __LINE__, ident);
54
+ }
55
+ }
56
+
57
+ inline void checkServant(const ObjectPtr& servant)
58
+ {
59
+ if(!servant)
60
+ {
61
+ throw IllegalServantException(__FILE__, __LINE__, "cannot add null servant to Object Adapter");
62
+ }
63
+ }
64
+ }
65
+
66
+ string
67
+ Ice::ObjectAdapterI::getName() const
68
+ {
69
+ //
70
+ // No mutex lock necessary, _name is immutable.
71
+ //
72
+ return _noConfig ? string("") : _name;
73
+ }
74
+
75
+ CommunicatorPtr
76
+ Ice::ObjectAdapterI::getCommunicator() const
77
+ {
78
+ return _communicator;
79
+ }
80
+
81
+ void
82
+ Ice::ObjectAdapterI::activate()
83
+ {
84
+ LocatorInfoPtr locatorInfo;
85
+ bool registerProcess = false;
86
+ bool printAdapterReady = false;
87
+
88
+ {
89
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
90
+
91
+ checkForDeactivation();
92
+
93
+ //
94
+ // If we've previously been initialized we just need to activate the
95
+ // incoming connection factories and we're done.
96
+ //
97
+ if(_state != StateUninitialized)
98
+ {
99
+ for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(),
100
+ Ice::voidMemFun(&IncomingConnectionFactory::activate));
101
+ return;
102
+ }
103
+
104
+ //
105
+ // One off initializations of the adapter: update the
106
+ // locator registry and print the "adapter ready"
107
+ // message. We set set state to StateActivating to prevent
108
+ // deactivation from other threads while these one off
109
+ // initializations are done.
110
+ //
111
+ _state = StateActivating;
112
+
113
+ locatorInfo = _locatorInfo;
114
+ if(!_noConfig)
115
+ {
116
+ PropertiesPtr properties = _instance->initializationData().properties;
117
+ printAdapterReady = properties->getPropertyAsInt("Ice.PrintAdapterReady") > 0;
118
+ registerProcess = properties->getPropertyAsInt(_name + ".RegisterProcess") > 0;
119
+ }
120
+ }
121
+
122
+ try
123
+ {
124
+ Ice::Identity dummy;
125
+ dummy.name = "dummy";
126
+ updateLocatorRegistry(locatorInfo, createDirectProxy(dummy), registerProcess);
127
+ }
128
+ catch(const Ice::LocalException&)
129
+ {
130
+ //
131
+ // If we couldn't update the locator registry, we let the
132
+ // exception go through and don't activate the adapter to
133
+ // allow to user code to retry activating the adapter
134
+ // later.
135
+ //
136
+ {
137
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
138
+ _state = StateUninitialized;
139
+ notifyAll();
140
+ }
141
+ throw;
142
+ }
143
+
144
+ if(printAdapterReady)
145
+ {
146
+ cout << _name << " ready" << endl;
147
+ }
148
+
149
+ {
150
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
151
+ assert(_state == StateActivating);
152
+
153
+ for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(),
154
+ Ice::voidMemFun(&IncomingConnectionFactory::activate));
155
+
156
+ _state = StateActive;
157
+ notifyAll();
158
+ }
159
+ }
160
+
161
+ void
162
+ Ice::ObjectAdapterI::hold()
163
+ {
164
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
165
+
166
+ checkForDeactivation();
167
+ _state = StateHeld;
168
+
169
+ for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(),
170
+ Ice::voidMemFun(&IncomingConnectionFactory::hold));
171
+ }
172
+
173
+ void
174
+ Ice::ObjectAdapterI::waitForHold()
175
+ {
176
+ vector<IncomingConnectionFactoryPtr> incomingConnectionFactories;
177
+ {
178
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
179
+
180
+ checkForDeactivation();
181
+
182
+ incomingConnectionFactories = _incomingConnectionFactories;
183
+ }
184
+
185
+ for_each(incomingConnectionFactories.begin(), incomingConnectionFactories.end(),
186
+ Ice::constVoidMemFun(&IncomingConnectionFactory::waitUntilHolding));
187
+ }
188
+
189
+ void
190
+ Ice::ObjectAdapterI::deactivate()
191
+ {
192
+ {
193
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
194
+
195
+ //
196
+ // Wait for activation to complete. This is necessary to not
197
+ // get out of order locator updates.
198
+ //
199
+ while(_state == StateActivating || _state == StateDeactivating)
200
+ {
201
+ wait();
202
+ }
203
+ if(_state >= StateDeactivated)
204
+ {
205
+ return;
206
+ }
207
+ _state = StateDeactivating;
208
+ }
209
+
210
+ //
211
+ // NOTE: the router/locator infos and incoming connection
212
+ // facatory list are immutable at this point.
213
+ //
214
+
215
+ if(_routerInfo)
216
+ {
217
+ //
218
+ // Remove entry from the router manager.
219
+ //
220
+ _instance->routerManager()->erase(_routerInfo->getRouter());
221
+
222
+ //
223
+ // Clear this object adapter with the router.
224
+ //
225
+ _routerInfo->setAdapter(0);
226
+ }
227
+
228
+ try
229
+ {
230
+ updateLocatorRegistry(_locatorInfo, 0, false);
231
+ }
232
+ catch(const Ice::LocalException&)
233
+ {
234
+ //
235
+ // We can't throw exceptions in deactivate so we ignore
236
+ // failures to update the locator registry.
237
+ //
238
+ }
239
+
240
+ //
241
+ // Must be called outside the thread synchronization, because
242
+ // Connection::destroy() might block when sending a CloseConnection
243
+ // message.
244
+ //
245
+ for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(),
246
+ Ice::voidMemFun(&IncomingConnectionFactory::destroy));
247
+
248
+ //
249
+ // Must be called outside the thread synchronization, because
250
+ // changing the object adapter might block if there are still
251
+ // requests being dispatched.
252
+ //
253
+ _instance->outgoingConnectionFactory()->removeAdapter(this);
254
+
255
+ {
256
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
257
+ assert(_state == StateDeactivating);
258
+ _state = StateDeactivated;
259
+ notifyAll();
260
+ }
261
+ }
262
+
263
+ void
264
+ Ice::ObjectAdapterI::waitForDeactivate()
265
+ {
266
+ vector<IceInternal::IncomingConnectionFactoryPtr> incomingConnectionFactories;
267
+
268
+ {
269
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
270
+
271
+ //
272
+ // Wait for deactivation of the adapter itself, and for
273
+ // the return of all direct method calls using this adapter.
274
+ //
275
+ while((_state < StateDeactivated) || _directCount > 0)
276
+ {
277
+ wait();
278
+ }
279
+ if(_state > StateDeactivated)
280
+ {
281
+ return;
282
+ }
283
+ incomingConnectionFactories = _incomingConnectionFactories;
284
+ }
285
+
286
+ //
287
+ // Now we wait until all incoming connection factories are
288
+ // finished.
289
+ //
290
+ for_each(incomingConnectionFactories.begin(), incomingConnectionFactories.end(),
291
+ Ice::voidMemFun(&IncomingConnectionFactory::waitUntilFinished));
292
+ }
293
+
294
+ bool
295
+ Ice::ObjectAdapterI::isDeactivated() const
296
+ {
297
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
298
+
299
+ return _state >= StateDeactivated;
300
+ }
301
+
302
+ void
303
+ Ice::ObjectAdapterI::destroy()
304
+ {
305
+ //
306
+ // Deactivate and wait for completion.
307
+ //
308
+ deactivate();
309
+ waitForDeactivate();
310
+
311
+ {
312
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
313
+ assert(_state >= StateDeactivated);
314
+
315
+ //
316
+ // Only a single thread is allowed to destroy the object
317
+ // adapter. Other threads wait for the destruction to be
318
+ // completed.
319
+ //
320
+ while(_state == StateDestroying)
321
+ {
322
+ wait();
323
+ }
324
+ if(_state == StateDestroyed)
325
+ {
326
+ return;
327
+ }
328
+ _state = StateDestroying;
329
+ }
330
+
331
+ //
332
+ // Now it's also time to clean up our servants and servant
333
+ // locators.
334
+ //
335
+ _servantManager->destroy();
336
+
337
+ //
338
+ // Destroy the thread pool.
339
+ //
340
+ if(_threadPool)
341
+ {
342
+ _threadPool->destroy();
343
+ _threadPool->joinWithAllThreads();
344
+ }
345
+
346
+ if(_objectAdapterFactory)
347
+ {
348
+ _objectAdapterFactory->removeObjectAdapter(this);
349
+ }
350
+
351
+ {
352
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
353
+
354
+ //
355
+ // We're done, now we can throw away all incoming connection
356
+ // factories.
357
+ //
358
+ _incomingConnectionFactories.clear();
359
+
360
+ //
361
+ // Remove object references (some of them cyclic).
362
+ //
363
+ _instance = 0;
364
+ _threadPool = 0;
365
+ _routerEndpoints.clear();
366
+ _routerInfo = 0;
367
+ _publishedEndpoints.clear();
368
+ _locatorInfo = 0;
369
+ _reference = 0;
370
+ _objectAdapterFactory = 0;
371
+
372
+ _state = StateDestroyed;
373
+ notifyAll();
374
+ }
375
+ }
376
+
377
+ ObjectPrx
378
+ Ice::ObjectAdapterI::add(const ObjectPtr& object, const Identity& ident)
379
+ {
380
+ return addFacet(object, ident, "");
381
+ }
382
+
383
+ ObjectPrx
384
+ Ice::ObjectAdapterI::addFacet(const ObjectPtr& object, const Identity& ident, const string& facet)
385
+ {
386
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
387
+
388
+ checkForDeactivation();
389
+ checkServant(object);
390
+ checkIdentity(ident);
391
+
392
+ _servantManager->addServant(object, ident, facet);
393
+
394
+ return newProxy(ident, facet);
395
+ }
396
+
397
+ ObjectPrx
398
+ Ice::ObjectAdapterI::addWithUUID(const ObjectPtr& object)
399
+ {
400
+ return addFacetWithUUID(object, "");
401
+ }
402
+
403
+ ObjectPrx
404
+ Ice::ObjectAdapterI::addFacetWithUUID(const ObjectPtr& object, const string& facet)
405
+ {
406
+ Identity ident;
407
+ ident.name = IceUtil::generateUUID();
408
+ return addFacet(object, ident, facet);
409
+ }
410
+
411
+ void
412
+ Ice::ObjectAdapterI::addDefaultServant(const ObjectPtr& servant, const string& category)
413
+ {
414
+ checkServant(servant);
415
+
416
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
417
+
418
+ checkForDeactivation();
419
+ _servantManager->addDefaultServant(servant, category);
420
+ }
421
+
422
+ ObjectPtr
423
+ Ice::ObjectAdapterI::remove(const Identity& ident)
424
+ {
425
+ return removeFacet(ident, "");
426
+ }
427
+
428
+ ObjectPtr
429
+ Ice::ObjectAdapterI::removeFacet(const Identity& ident, const string& facet)
430
+ {
431
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
432
+
433
+ checkForDeactivation();
434
+ checkIdentity(ident);
435
+
436
+ return _servantManager->removeServant(ident, facet);
437
+ }
438
+
439
+ FacetMap
440
+ Ice::ObjectAdapterI::removeAllFacets(const Identity& ident)
441
+ {
442
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
443
+
444
+ checkForDeactivation();
445
+ checkIdentity(ident);
446
+
447
+ return _servantManager->removeAllFacets(ident);
448
+ }
449
+
450
+ ObjectPtr
451
+ Ice::ObjectAdapterI::removeDefaultServant(const string& category)
452
+ {
453
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
454
+
455
+ checkForDeactivation();
456
+
457
+ return _servantManager->removeDefaultServant(category);
458
+ }
459
+
460
+ ObjectPtr
461
+ Ice::ObjectAdapterI::find(const Identity& ident) const
462
+ {
463
+ return findFacet(ident, "");
464
+ }
465
+
466
+ ObjectPtr
467
+ Ice::ObjectAdapterI::findFacet(const Identity& ident, const string& facet) const
468
+ {
469
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
470
+
471
+ checkForDeactivation();
472
+ checkIdentity(ident);
473
+
474
+ return _servantManager->findServant(ident, facet);
475
+ }
476
+
477
+ FacetMap
478
+ Ice::ObjectAdapterI::findAllFacets(const Identity& ident) const
479
+ {
480
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
481
+
482
+ checkForDeactivation();
483
+ checkIdentity(ident);
484
+
485
+ return _servantManager->findAllFacets(ident);
486
+ }
487
+
488
+ ObjectPtr
489
+ Ice::ObjectAdapterI::findByProxy(const ObjectPrx& proxy) const
490
+ {
491
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
492
+
493
+ checkForDeactivation();
494
+
495
+ ReferencePtr ref = proxy->__reference();
496
+ return findFacet(ref->getIdentity(), ref->getFacet());
497
+ }
498
+
499
+ ObjectPtr
500
+ Ice::ObjectAdapterI::findDefaultServant(const string& category) const
501
+ {
502
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
503
+
504
+ checkForDeactivation();
505
+
506
+ return _servantManager->findDefaultServant(category);
507
+ }
508
+
509
+ void
510
+ Ice::ObjectAdapterI::addServantLocator(const ServantLocatorPtr& locator, const string& prefix)
511
+ {
512
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
513
+
514
+ checkForDeactivation();
515
+
516
+ _servantManager->addServantLocator(locator, prefix);
517
+ }
518
+
519
+ ServantLocatorPtr
520
+ Ice::ObjectAdapterI::removeServantLocator(const string& prefix)
521
+ {
522
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
523
+
524
+ checkForDeactivation();
525
+
526
+ return _servantManager->removeServantLocator(prefix);
527
+ }
528
+
529
+ ServantLocatorPtr
530
+ Ice::ObjectAdapterI::findServantLocator(const string& prefix) const
531
+ {
532
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
533
+
534
+ checkForDeactivation();
535
+
536
+ return _servantManager->findServantLocator(prefix);
537
+ }
538
+
539
+ ObjectPrx
540
+ Ice::ObjectAdapterI::createProxy(const Identity& ident) const
541
+ {
542
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
543
+
544
+ checkForDeactivation();
545
+ checkIdentity(ident);
546
+
547
+ return newProxy(ident, "");
548
+ }
549
+
550
+ ObjectPrx
551
+ Ice::ObjectAdapterI::createDirectProxy(const Identity& ident) const
552
+ {
553
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
554
+
555
+ checkForDeactivation();
556
+ checkIdentity(ident);
557
+
558
+ return newDirectProxy(ident, "");
559
+ }
560
+
561
+ ObjectPrx
562
+ Ice::ObjectAdapterI::createIndirectProxy(const Identity& ident) const
563
+ {
564
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
565
+
566
+ checkForDeactivation();
567
+ checkIdentity(ident);
568
+
569
+ return newIndirectProxy(ident, "", _id);
570
+ }
571
+
572
+ void
573
+ Ice::ObjectAdapterI::setLocator(const LocatorPrx& locator)
574
+ {
575
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
576
+
577
+ checkForDeactivation();
578
+
579
+ _locatorInfo = _instance->locatorManager()->get(locator);
580
+ }
581
+
582
+ LocatorPrx
583
+ Ice::ObjectAdapterI::getLocator() const
584
+ {
585
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
586
+
587
+ if(!_locatorInfo)
588
+ {
589
+ return 0;
590
+ }
591
+ else
592
+ {
593
+ return _locatorInfo->getLocator();
594
+ }
595
+ }
596
+
597
+
598
+ void
599
+ Ice::ObjectAdapterI::refreshPublishedEndpoints()
600
+ {
601
+ LocatorInfoPtr locatorInfo;
602
+ bool registerProcess = false;
603
+ vector<EndpointIPtr> oldPublishedEndpoints;
604
+
605
+ {
606
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
607
+
608
+ checkForDeactivation();
609
+
610
+ oldPublishedEndpoints = _publishedEndpoints;
611
+ _publishedEndpoints = parsePublishedEndpoints();
612
+
613
+ locatorInfo = _locatorInfo;
614
+ if(!_noConfig)
615
+ {
616
+ registerProcess =
617
+ _instance->initializationData().properties->getPropertyAsInt(_name + ".RegisterProcess") > 0;
618
+ }
619
+ }
620
+
621
+ try
622
+ {
623
+ Ice::Identity dummy;
624
+ dummy.name = "dummy";
625
+ updateLocatorRegistry(locatorInfo, createDirectProxy(dummy), registerProcess);
626
+ }
627
+ catch(const Ice::LocalException&)
628
+ {
629
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
630
+
631
+ //
632
+ // Restore the old published endpoints.
633
+ //
634
+ _publishedEndpoints = oldPublishedEndpoints;
635
+ throw;
636
+ }
637
+ }
638
+
639
+ EndpointSeq
640
+ Ice::ObjectAdapterI::getEndpoints() const
641
+ {
642
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
643
+
644
+ EndpointSeq endpoints;
645
+ transform(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(),
646
+ back_inserter(endpoints), Ice::constMemFun(&IncomingConnectionFactory::endpoint));
647
+ return endpoints;
648
+ }
649
+
650
+ EndpointSeq
651
+ Ice::ObjectAdapterI::getPublishedEndpoints() const
652
+ {
653
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
654
+
655
+ EndpointSeq endpoints;
656
+ copy(_publishedEndpoints.begin(), _publishedEndpoints.end(), back_inserter(endpoints));
657
+ return endpoints;
658
+ }
659
+
660
+ bool
661
+ Ice::ObjectAdapterI::isLocal(const ObjectPrx& proxy) const
662
+ {
663
+ //
664
+ // NOTE: it's important that isLocal() doesn't perform any blocking operations as
665
+ // it can be called for AMI invocations if the proxy has no delegate set yet.
666
+ //
667
+
668
+ ReferencePtr ref = proxy->__reference();
669
+ if(ref->isWellKnown())
670
+ {
671
+ //
672
+ // Check the active servant map to see if the well-known
673
+ // proxy is for a local object.
674
+ //
675
+ return _servantManager->hasServant(ref->getIdentity());
676
+ }
677
+ else if(ref->isIndirect())
678
+ {
679
+ //
680
+ // Proxy is local if the reference adapter id matches this
681
+ // adapter id or replica group id.
682
+ //
683
+ return ref->getAdapterId() == _id || ref->getAdapterId() == _replicaGroupId;
684
+ }
685
+ else
686
+ {
687
+ vector<EndpointIPtr> endpoints = ref->getEndpoints();
688
+
689
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
690
+ checkForDeactivation();
691
+
692
+ //
693
+ // Proxies which have at least one endpoint in common with the
694
+ // endpoints used by this object adapter are considered local.
695
+ //
696
+ for(vector<EndpointIPtr>::const_iterator p = endpoints.begin(); p != endpoints.end(); ++p)
697
+ {
698
+ for(vector<IncomingConnectionFactoryPtr>::const_iterator q = _incomingConnectionFactories.begin();
699
+ q != _incomingConnectionFactories.end(); ++q)
700
+ {
701
+ if((*p)->equivalent((*q)->endpoint()))
702
+ {
703
+ return true;
704
+ }
705
+ }
706
+
707
+ for(vector<EndpointIPtr>::const_iterator r = _publishedEndpoints.begin();
708
+ r != _publishedEndpoints.end(); ++r)
709
+ {
710
+ if((*p)->equivalent(*r))
711
+ {
712
+ return true;
713
+ }
714
+ }
715
+ }
716
+
717
+ //
718
+ // Proxies which have at least one endpoint in common with the
719
+ // router's server proxy endpoints (if any), are also considered
720
+ // local.
721
+ //
722
+ if(_routerInfo && _routerInfo->getRouter() == proxy->ice_getRouter())
723
+ {
724
+ for(vector<EndpointIPtr>::const_iterator p = endpoints.begin(); p != endpoints.end(); ++p)
725
+ {
726
+ for(vector<EndpointIPtr>::const_iterator r = _routerEndpoints.begin(); r != _routerEndpoints.end(); ++r)
727
+ {
728
+ if((*p)->equivalent(*r))
729
+ {
730
+ return true;
731
+ }
732
+ }
733
+ }
734
+ }
735
+ }
736
+
737
+ return false;
738
+ }
739
+
740
+ void
741
+ Ice::ObjectAdapterI::flushAsyncBatchRequests(const CommunicatorFlushBatchPtr& outAsync)
742
+ {
743
+ vector<IncomingConnectionFactoryPtr> f;
744
+ {
745
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
746
+ f = _incomingConnectionFactories;
747
+ }
748
+
749
+ for(vector<IncomingConnectionFactoryPtr>::const_iterator p = f.begin(); p != f.end(); ++p)
750
+ {
751
+ (*p)->flushAsyncBatchRequests(outAsync);
752
+ }
753
+ }
754
+
755
+ void
756
+ Ice::ObjectAdapterI::updateConnectionObservers()
757
+ {
758
+ vector<IncomingConnectionFactoryPtr> f;
759
+ {
760
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
761
+ f = _incomingConnectionFactories;
762
+ }
763
+ for_each(f.begin(), f.end(), Ice::voidMemFun(&IncomingConnectionFactory::updateConnectionObservers));
764
+ }
765
+
766
+ void
767
+ Ice::ObjectAdapterI::updateThreadObservers()
768
+ {
769
+ ThreadPoolPtr threadPool;
770
+ {
771
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
772
+ threadPool = _threadPool;
773
+ }
774
+ if(threadPool)
775
+ {
776
+ threadPool->updateObservers();
777
+ }
778
+ }
779
+
780
+ void
781
+ Ice::ObjectAdapterI::incDirectCount()
782
+ {
783
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
784
+
785
+ checkForDeactivation();
786
+
787
+ assert(_directCount >= 0);
788
+ ++_directCount;
789
+ }
790
+
791
+ void
792
+ Ice::ObjectAdapterI::decDirectCount()
793
+ {
794
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
795
+
796
+ // Not check for deactivation here!
797
+
798
+ assert(_instance); // Must not be called after destroy().
799
+
800
+ assert(_directCount > 0);
801
+ if(--_directCount == 0)
802
+ {
803
+ notifyAll();
804
+ }
805
+ }
806
+
807
+ ThreadPoolPtr
808
+ Ice::ObjectAdapterI::getThreadPool() const
809
+ {
810
+ // No mutex lock necessary, _threadPool and _instance are
811
+ // immutable after creation until they are removed in
812
+ // destroy().
813
+
814
+ // Not check for deactivation here!
815
+
816
+ assert(_instance); // Must not be called after destroy().
817
+
818
+ if(_threadPool)
819
+ {
820
+ return _threadPool;
821
+ }
822
+ else
823
+ {
824
+ return _instance->serverThreadPool();
825
+ }
826
+ }
827
+
828
+ ServantManagerPtr
829
+ Ice::ObjectAdapterI::getServantManager() const
830
+ {
831
+ //
832
+ // No mutex lock necessary, _servantManager is immutable.
833
+ //
834
+ return _servantManager;
835
+ }
836
+
837
+ IceInternal::ACMConfig
838
+ Ice::ObjectAdapterI::getACM() const
839
+ {
840
+ // Not check for deactivation here!
841
+
842
+ assert(_instance); // Must not be called after destroy().
843
+ return _acm;
844
+ }
845
+
846
+ //
847
+ // COMPILERFIX: The ObjectAdapterI setup is broken out into a separate initialize
848
+ // function because when it was part of the constructor C++Builder 2010 apps would
849
+ // crash if an execption was thrown from any calls within the constructor.
850
+ //
851
+ Ice::ObjectAdapterI::ObjectAdapterI(const InstancePtr& instance, const CommunicatorPtr& communicator,
852
+ const ObjectAdapterFactoryPtr& objectAdapterFactory, const string& name,
853
+ /*const RouterPrx& router,*/ bool noConfig) :
854
+ _state(StateUninitialized),
855
+ _instance(instance),
856
+ _communicator(communicator),
857
+ _objectAdapterFactory(objectAdapterFactory),
858
+ _servantManager(new ServantManager(instance, name)),
859
+ _name(name),
860
+ _directCount(0),
861
+ _noConfig(noConfig),
862
+ _messageSizeMax(0)
863
+ {
864
+ }
865
+
866
+ void
867
+ Ice::ObjectAdapterI::initialize(const RouterPrx& router)
868
+ {
869
+ if(_noConfig)
870
+ {
871
+ _reference = _instance->referenceFactory()->create("dummy -t", "");
872
+ const_cast<ACMConfig&>(_acm) = _instance->serverACM();
873
+ return;
874
+ }
875
+
876
+ PropertiesPtr properties = _instance->initializationData().properties;
877
+ StringSeq unknownProps;
878
+ bool noProps = filterProperties(unknownProps);
879
+
880
+ //
881
+ // Warn about unknown object adapter properties.
882
+ //
883
+ if(unknownProps.size() != 0 && properties->getPropertyAsIntWithDefault("Ice.Warn.UnknownProperties", 1) > 0)
884
+ {
885
+ Warning out(_instance->initializationData().logger);
886
+ out << "found unknown properties for object adapter `" << _name << "':";
887
+ for(unsigned int i = 0; i < unknownProps.size(); ++i)
888
+ {
889
+ out << "\n " << unknownProps[i];
890
+ }
891
+ }
892
+
893
+ try
894
+ {
895
+ //
896
+ // Make sure named adapter has some configuration
897
+ //
898
+ if(router == 0 && noProps)
899
+ {
900
+ InitializationException ex(__FILE__, __LINE__);
901
+ ex.reason = "object adapter `" + _name + "' requires configuration";
902
+ throw ex;
903
+ }
904
+
905
+ const_cast<string&>(_id) = properties->getProperty(_name + ".AdapterId");
906
+ const_cast<string&>(_replicaGroupId) = properties->getProperty(_name + ".ReplicaGroupId");
907
+
908
+ //
909
+ // Setup a reference to be used to get the default proxy options
910
+ // when creating new proxies. By default, create twoway proxies.
911
+ //
912
+ string proxyOptions = properties->getPropertyWithDefault(_name + ".ProxyOptions", "-t");
913
+ try
914
+ {
915
+ _reference = _instance->referenceFactory()->create("dummy " + proxyOptions, "");
916
+ }
917
+ catch(const ProxyParseException&)
918
+ {
919
+ InitializationException ex(__FILE__, __LINE__);
920
+ ex.reason = "invalid proxy options `" + proxyOptions + "' for object adapter `" + _name + "'";
921
+ throw ex;
922
+ }
923
+
924
+ const_cast<ACMConfig&>(_acm) =
925
+ ACMConfig(properties, _communicator->getLogger(), _name + ".ACM", _instance->serverACM());
926
+
927
+ {
928
+ const int defaultMessageSizeMax = static_cast<int>(_instance->messageSizeMax() / 1024);
929
+ Int num = properties->getPropertyAsIntWithDefault(_name + ".MessageSizeMax", defaultMessageSizeMax);
930
+ if(num < 1 || static_cast<size_t>(num) > static_cast<size_t>(0x7fffffff / 1024))
931
+ {
932
+ const_cast<size_t&>(_messageSizeMax) = static_cast<size_t>(0x7fffffff);
933
+ }
934
+ else
935
+ {
936
+ const_cast<size_t&>(_messageSizeMax) = static_cast<size_t>(num) * 1024;
937
+ }
938
+ }
939
+
940
+ int threadPoolSize = properties->getPropertyAsInt(_name + ".ThreadPool.Size");
941
+ int threadPoolSizeMax = properties->getPropertyAsInt(_name + ".ThreadPool.SizeMax");
942
+ bool hasPriority = properties->getProperty(_name + ".ThreadPool.ThreadPriority") != "";
943
+
944
+ //
945
+ // Create the per-adapter thread pool, if necessary. This is done before the creation of the incoming
946
+ // connection factory as the thread pool is needed during creation for the call to incFdsInUse.
947
+ //
948
+ if(threadPoolSize > 0 || threadPoolSizeMax > 0 || hasPriority)
949
+ {
950
+ _threadPool = new ThreadPool(_instance, _name + ".ThreadPool", 0);
951
+ }
952
+
953
+ if(!router)
954
+ {
955
+ const_cast<RouterPrx&>(router) = RouterPrx::uncheckedCast(
956
+ _instance->proxyFactory()->propertyToProxy(_name + ".Router"));
957
+ }
958
+ if(router)
959
+ {
960
+ _routerInfo = _instance->routerManager()->get(router);
961
+ if(_routerInfo)
962
+ {
963
+ //
964
+ // Make sure this router is not already registered with another adapter.
965
+ //
966
+ if(_routerInfo->getAdapter())
967
+ {
968
+ throw AlreadyRegisteredException(__FILE__, __LINE__, "object adapter with router",
969
+ _instance->identityToString(router->ice_getIdentity()));
970
+ }
971
+
972
+ //
973
+ // Add the router's server proxy endpoints to this object
974
+ // adapter.
975
+ //
976
+ vector<EndpointIPtr> endpoints = _routerInfo->getServerEndpoints();
977
+ copy(endpoints.begin(), endpoints.end(), back_inserter(_routerEndpoints));
978
+ sort(_routerEndpoints.begin(), _routerEndpoints.end()); // Must be sorted.
979
+ _routerEndpoints.erase(unique(_routerEndpoints.begin(), _routerEndpoints.end()),
980
+ _routerEndpoints.end());
981
+
982
+ //
983
+ // Associate this object adapter with the router. This way,
984
+ // new outgoing connections to the router's client proxy will
985
+ // use this object adapter for callbacks.
986
+ //
987
+ _routerInfo->setAdapter(this);
988
+
989
+ //
990
+ // Also modify all existing outgoing connections to the
991
+ // router's client proxy to use this object adapter for
992
+ // callbacks.
993
+ //
994
+ _instance->outgoingConnectionFactory()->setRouterInfo(_routerInfo);
995
+ }
996
+ }
997
+ else
998
+ {
999
+ //
1000
+ // Parse the endpoints, but don't store them in the adapter.
1001
+ // The connection factory might change it, for example, to
1002
+ // fill in the real port number.
1003
+ //
1004
+ vector<EndpointIPtr> endpoints = parseEndpoints(properties->getProperty(_name + ".Endpoints"), true);
1005
+ for(vector<EndpointIPtr>::iterator p = endpoints.begin(); p != endpoints.end(); ++p)
1006
+ {
1007
+ IncomingConnectionFactoryPtr factory = new IncomingConnectionFactory(_instance, *p, this);
1008
+ factory->initialize(_name);
1009
+ _incomingConnectionFactories.push_back(factory);
1010
+ }
1011
+
1012
+ if(endpoints.empty())
1013
+ {
1014
+ TraceLevelsPtr tl = _instance->traceLevels();
1015
+ if(tl->network >= 2)
1016
+ {
1017
+ Trace out(_instance->initializationData().logger, tl->networkCat);
1018
+ out << "created adapter `" << _name << "' without endpoints";
1019
+ }
1020
+ }
1021
+
1022
+ //
1023
+ // Parse the published endpoints.
1024
+ //
1025
+ _publishedEndpoints = parsePublishedEndpoints();
1026
+ }
1027
+
1028
+ if(!properties->getProperty(_name + ".Locator").empty())
1029
+ {
1030
+ setLocator(LocatorPrx::uncheckedCast(_instance->proxyFactory()->propertyToProxy(_name + ".Locator")));
1031
+ }
1032
+ else
1033
+ {
1034
+ setLocator(_instance->referenceFactory()->getDefaultLocator());
1035
+ }
1036
+ }
1037
+ catch(...)
1038
+ {
1039
+ destroy();
1040
+ throw;
1041
+ }
1042
+ }
1043
+
1044
+ Ice::ObjectAdapterI::~ObjectAdapterI()
1045
+ {
1046
+ if(_state < StateDeactivated)
1047
+ {
1048
+ Warning out(_instance->initializationData().logger);
1049
+ out << "object adapter `" << getName() << "' has not been deactivated";
1050
+ }
1051
+ else if(_state != StateDestroyed)
1052
+ {
1053
+ Warning out(_instance->initializationData().logger);
1054
+ out << "object adapter `" << getName() << "' has not been destroyed";
1055
+ }
1056
+ else
1057
+ {
1058
+ //assert(!_servantManager); // We don't clear this reference, it needs to be immutable.
1059
+ assert(!_threadPool);
1060
+ assert(_incomingConnectionFactories.empty());
1061
+ assert(_directCount == 0);
1062
+ }
1063
+ }
1064
+
1065
+ ObjectPrx
1066
+ Ice::ObjectAdapterI::newProxy(const Identity& ident, const string& facet) const
1067
+ {
1068
+ if(_id.empty())
1069
+ {
1070
+ return newDirectProxy(ident, facet);
1071
+ }
1072
+ else if(_replicaGroupId.empty())
1073
+ {
1074
+ return newIndirectProxy(ident, facet, _id);
1075
+ }
1076
+ else
1077
+ {
1078
+ return newIndirectProxy(ident, facet, _replicaGroupId);
1079
+ }
1080
+ }
1081
+
1082
+ ObjectPrx
1083
+ Ice::ObjectAdapterI::newDirectProxy(const Identity& ident, const string& facet) const
1084
+ {
1085
+ vector<EndpointIPtr> endpoints = _publishedEndpoints;
1086
+
1087
+ //
1088
+ // Now we also add the endpoints of the router's server proxy, if
1089
+ // any. This way, object references created by this object adapter
1090
+ // will also point to the router's server proxy endpoints.
1091
+ //
1092
+ copy(_routerEndpoints.begin(), _routerEndpoints.end(), back_inserter(endpoints));
1093
+
1094
+ //
1095
+ // Create a reference and return a proxy for this reference.
1096
+ //
1097
+ ReferencePtr ref = _instance->referenceFactory()->create(ident, facet, _reference, endpoints);
1098
+ return _instance->proxyFactory()->referenceToProxy(ref);
1099
+ }
1100
+
1101
+ ObjectPrx
1102
+ Ice::ObjectAdapterI::newIndirectProxy(const Identity& ident, const string& facet, const string& id) const
1103
+ {
1104
+ //
1105
+ // Create an indirect reference with the given adapter id.
1106
+ //
1107
+ ReferencePtr ref = _instance->referenceFactory()->create(ident, facet, _reference, id);
1108
+
1109
+ //
1110
+ // Return a proxy for the reference.
1111
+ //
1112
+ return _instance->proxyFactory()->referenceToProxy(ref);
1113
+ }
1114
+
1115
+ void
1116
+ Ice::ObjectAdapterI::checkForDeactivation() const
1117
+ {
1118
+ if(_state >= StateDeactivating)
1119
+ {
1120
+ ObjectAdapterDeactivatedException ex(__FILE__, __LINE__);
1121
+ ex.name = getName();
1122
+ throw ex;
1123
+ }
1124
+ }
1125
+
1126
+ vector<EndpointIPtr>
1127
+ Ice::ObjectAdapterI::parseEndpoints(const string& endpts, bool oaEndpoints) const
1128
+ {
1129
+ string::size_type beg;
1130
+ string::size_type end = 0;
1131
+
1132
+ vector<EndpointIPtr> endpoints;
1133
+ while(end < endpts.length())
1134
+ {
1135
+ const string delim = " \t\n\r";
1136
+
1137
+ beg = endpts.find_first_not_of(delim, end);
1138
+ if(beg == string::npos)
1139
+ {
1140
+ break;
1141
+ }
1142
+
1143
+ end = beg;
1144
+ while(true)
1145
+ {
1146
+ end = endpts.find(':', end);
1147
+ if(end == string::npos)
1148
+ {
1149
+ end = endpts.length();
1150
+ break;
1151
+ }
1152
+ else
1153
+ {
1154
+ bool quoted = false;
1155
+ string::size_type quote = beg;
1156
+ while(true)
1157
+ {
1158
+ quote = endpts.find('\"', quote);
1159
+ if(quote == string::npos || end < quote)
1160
+ {
1161
+ break;
1162
+ }
1163
+ else
1164
+ {
1165
+ quote = endpts.find('\"', ++quote);
1166
+ if(quote == string::npos)
1167
+ {
1168
+ break;
1169
+ }
1170
+ else if(end < quote)
1171
+ {
1172
+ quoted = true;
1173
+ break;
1174
+ }
1175
+ ++quote;
1176
+ }
1177
+ }
1178
+ if(!quoted)
1179
+ {
1180
+ break;
1181
+ }
1182
+ ++end;
1183
+ }
1184
+ }
1185
+
1186
+ if(end == beg)
1187
+ {
1188
+ ++end;
1189
+ continue;
1190
+ }
1191
+
1192
+ string s = endpts.substr(beg, end - beg);
1193
+ EndpointIPtr endp = _instance->endpointFactoryManager()->create(s, oaEndpoints);
1194
+ if(endp == 0)
1195
+ {
1196
+ EndpointParseException ex(__FILE__, __LINE__);
1197
+ ex.str = "invalid object adapter endpoint `" + s + "'";
1198
+ throw ex;
1199
+ }
1200
+ endpoints.push_back(endp);
1201
+
1202
+ ++end;
1203
+ }
1204
+
1205
+ return endpoints;
1206
+ }
1207
+
1208
+ std::vector<EndpointIPtr>
1209
+ ObjectAdapterI::parsePublishedEndpoints()
1210
+ {
1211
+ //
1212
+ // Parse published endpoints. If set, these are used in proxies
1213
+ // instead of the connection factory endpoints.
1214
+ //
1215
+ string endpts = _communicator->getProperties()->getProperty(_name + ".PublishedEndpoints");
1216
+ vector<EndpointIPtr> endpoints = parseEndpoints(endpts, false);
1217
+ if(endpoints.empty())
1218
+ {
1219
+ //
1220
+ // If the PublishedEndpoints property isn't set, we compute the published enpdoints
1221
+ // from the OA endpoints, expanding any endpoints that may be listening on INADDR_ANY
1222
+ // to include actual addresses in the published endpoints.
1223
+ //
1224
+ for(unsigned int i = 0; i < _incomingConnectionFactories.size(); ++i)
1225
+ {
1226
+ vector<EndpointIPtr> endps = _incomingConnectionFactories[i]->endpoint()->expand();
1227
+ endpoints.insert(endpoints.end(), endps.begin(), endps.end());
1228
+ }
1229
+ }
1230
+
1231
+ if(_instance->traceLevels()->network >= 1 && !endpoints.empty())
1232
+ {
1233
+ Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
1234
+ out << "published endpoints for object adapter `" << getName() << "':\n";
1235
+ for(unsigned int i = 0; i < endpoints.size(); ++i)
1236
+ {
1237
+ if(i > 0)
1238
+ {
1239
+ out << ":";
1240
+ }
1241
+ out << endpoints[i]->toString();
1242
+ }
1243
+ }
1244
+
1245
+ return endpoints;
1246
+ }
1247
+
1248
+ void
1249
+ ObjectAdapterI::updateLocatorRegistry(const IceInternal::LocatorInfoPtr& locatorInfo,
1250
+ const Ice::ObjectPrx& proxy,
1251
+ bool registerProcess)
1252
+ {
1253
+ if(!registerProcess && _id.empty())
1254
+ {
1255
+ return; // Nothing to update.
1256
+ }
1257
+
1258
+ //
1259
+ // Call on the locator registry outside the synchronization to
1260
+ // blocking other threads that need to lock this OA.
1261
+ //
1262
+ LocatorRegistryPrx locatorRegistry = locatorInfo ? locatorInfo->getLocatorRegistry() : LocatorRegistryPrx();
1263
+ string serverId;
1264
+ if(registerProcess)
1265
+ {
1266
+ assert(_instance);
1267
+ serverId = _instance->initializationData().properties->getProperty("Ice.ServerId");
1268
+
1269
+ if(!locatorRegistry)
1270
+ {
1271
+ Warning out(_instance->initializationData().logger);
1272
+ out << "object adapter `" << getName() << "' cannot register the process without a locator registry";
1273
+ }
1274
+ else if(serverId.empty())
1275
+ {
1276
+ Warning out(_instance->initializationData().logger);
1277
+ out << "object adapter `" << getName() << "' cannot register the process without a value for Ice.ServerId";
1278
+ }
1279
+ }
1280
+
1281
+ if(!locatorRegistry)
1282
+ {
1283
+ return;
1284
+ }
1285
+
1286
+ if(!_id.empty())
1287
+ {
1288
+ try
1289
+ {
1290
+ if(_replicaGroupId.empty())
1291
+ {
1292
+ locatorRegistry->setAdapterDirectProxy(_id, proxy);
1293
+ }
1294
+ else
1295
+ {
1296
+ locatorRegistry->setReplicatedAdapterDirectProxy(_id, _replicaGroupId, proxy);
1297
+ }
1298
+ }
1299
+ catch(const AdapterNotFoundException&)
1300
+ {
1301
+ if(_instance->traceLevels()->location >= 1)
1302
+ {
1303
+ Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat);
1304
+ out << "couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n";
1305
+ out << "the object adapter is not known to the locator registry";
1306
+ }
1307
+
1308
+ NotRegisteredException ex(__FILE__, __LINE__);
1309
+ ex.kindOfObject = "object adapter";
1310
+ ex.id = _id;
1311
+ throw ex;
1312
+ }
1313
+ catch(const InvalidReplicaGroupIdException&)
1314
+ {
1315
+ if(_instance->traceLevels()->location >= 1)
1316
+ {
1317
+ Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat);
1318
+ out << "couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n";
1319
+ out << "the replica group `" << _replicaGroupId << "' is not known to the locator registry";
1320
+ }
1321
+
1322
+ NotRegisteredException ex(__FILE__, __LINE__);
1323
+ ex.kindOfObject = "replica group";
1324
+ ex.id = _replicaGroupId;
1325
+ throw ex;
1326
+ }
1327
+ catch(const AdapterAlreadyActiveException&)
1328
+ {
1329
+ if(_instance->traceLevels()->location >= 1)
1330
+ {
1331
+ Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat);
1332
+ out << "couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n";
1333
+ out << "the object adapter endpoints are already set";
1334
+ }
1335
+
1336
+ ObjectAdapterIdInUseException ex(__FILE__, __LINE__);
1337
+ ex.id = _id;
1338
+ throw ex;
1339
+ }
1340
+ catch(const LocalException& ex)
1341
+ {
1342
+ if(_instance->traceLevels()->location >= 1)
1343
+ {
1344
+ Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat);
1345
+ out << "couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n" << ex;
1346
+ }
1347
+ throw; // TODO: Shall we raise a special exception instead of a non obvious local exception?
1348
+ }
1349
+
1350
+ if(_instance->traceLevels()->location >= 1)
1351
+ {
1352
+ Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat);
1353
+ out << "updated object adapter `" + _id + "' endpoints with the locator registry\n";
1354
+ out << "endpoints = ";
1355
+ if(proxy)
1356
+ {
1357
+ EndpointSeq endpts = proxy ? proxy->ice_getEndpoints() : EndpointSeq();
1358
+ ostringstream o;
1359
+ transform(endpts.begin(), endpts.end(), ostream_iterator<string>(o, endpts.size() > 1 ? ":" : ""),
1360
+ Ice::constMemFun(&Endpoint::toString));
1361
+ out << o.str();
1362
+ }
1363
+ }
1364
+ }
1365
+
1366
+ if(registerProcess && !serverId.empty())
1367
+ {
1368
+ {
1369
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
1370
+
1371
+ if(_processId.name == "")
1372
+ {
1373
+ ProcessPtr servant = new ProcessI(_communicator);
1374
+ _processId = addWithUUID(servant)->ice_getIdentity();
1375
+ }
1376
+ }
1377
+
1378
+ try
1379
+ {
1380
+ locatorRegistry->setServerProcessProxy(serverId, ProcessPrx::uncheckedCast(createDirectProxy(_processId)));
1381
+ }
1382
+ catch(const ServerNotFoundException&)
1383
+ {
1384
+ if(_instance->traceLevels()->location >= 1)
1385
+ {
1386
+ Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat);
1387
+ out << "couldn't register server `" + serverId + "' with the locator registry:\n";
1388
+ out << "the server is not known to the locator registry";
1389
+ }
1390
+
1391
+ NotRegisteredException ex(__FILE__, __LINE__);
1392
+ ex.kindOfObject = "server";
1393
+ ex.id = serverId;
1394
+ throw ex;
1395
+ }
1396
+ catch(const Ice::LocalException& ex)
1397
+ {
1398
+ if(_instance->traceLevels()->location >= 1)
1399
+ {
1400
+ Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat);
1401
+ out << "couldn't register server `" + serverId + "' with the locator registry:\n" << ex;
1402
+ }
1403
+ throw; // TODO: Shall we raise a special exception instead of a non obvious local exception?
1404
+ }
1405
+
1406
+ if(_instance->traceLevels()->location >= 1)
1407
+ {
1408
+ Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat);
1409
+ out << "registered server `" + serverId + "' with the locator registry";
1410
+ }
1411
+ }
1412
+ }
1413
+
1414
+ bool
1415
+ Ice::ObjectAdapterI::filterProperties(StringSeq& unknownProps)
1416
+ {
1417
+ static const string suffixes[] =
1418
+ {
1419
+ "ACM",
1420
+ "ACM.Close",
1421
+ "ACM.Heartbeat",
1422
+ "ACM.Timeout",
1423
+ "AdapterId",
1424
+ "Endpoints",
1425
+ "Locator",
1426
+ "Locator.EncodingVersion",
1427
+ "Locator.EndpointSelection",
1428
+ "Locator.ConnectionCached",
1429
+ "Locator.PreferSecure",
1430
+ "Locator.CollocationOptimized",
1431
+ "Locator.Router",
1432
+ "MessageSizeMax",
1433
+ "PublishedEndpoints",
1434
+ "RegisterProcess",
1435
+ "ReplicaGroupId",
1436
+ "Router",
1437
+ "Router.EncodingVersion",
1438
+ "Router.EndpointSelection",
1439
+ "Router.ConnectionCached",
1440
+ "Router.PreferSecure",
1441
+ "Router.CollocationOptimized",
1442
+ "Router.Locator",
1443
+ "Router.Locator.EndpointSelection",
1444
+ "Router.Locator.ConnectionCached",
1445
+ "Router.Locator.PreferSecure",
1446
+ "Router.Locator.CollocationOptimized",
1447
+ "Router.Locator.LocatorCacheTimeout",
1448
+ "Router.Locator.InvocationTimeout",
1449
+ "Router.LocatorCacheTimeout",
1450
+ "Router.InvocationTimeout",
1451
+ "ProxyOptions",
1452
+ "ThreadPool.Size",
1453
+ "ThreadPool.SizeMax",
1454
+ "ThreadPool.SizeWarn",
1455
+ "ThreadPool.StackSize",
1456
+ "ThreadPool.Serialize",
1457
+ "ThreadPool.ThreadPriority"
1458
+ };
1459
+
1460
+ //
1461
+ // Do not create unknown properties list if Ice prefix, ie Ice, Glacier2, etc
1462
+ //
1463
+ bool addUnknown = true;
1464
+ string prefix = _name + ".";
1465
+ for(const char** i = IceInternal::PropertyNames::clPropNames; *i != 0; ++i)
1466
+ {
1467
+ string icePrefix = string(*i) + ".";
1468
+ if(prefix.find(icePrefix) == 0)
1469
+ {
1470
+ addUnknown = false;
1471
+ break;
1472
+ }
1473
+ }
1474
+
1475
+ bool noProps = true;
1476
+ PropertyDict props = _instance->initializationData().properties->getPropertiesForPrefix(prefix);
1477
+ for(PropertyDict::const_iterator p = props.begin(); p != props.end(); ++p)
1478
+ {
1479
+ bool valid = false;
1480
+ for(unsigned int i = 0; i < sizeof(suffixes)/sizeof(*suffixes); ++i)
1481
+ {
1482
+ string prop = prefix + suffixes[i];
1483
+ if(p->first == prop)
1484
+ {
1485
+ noProps = false;
1486
+ valid = true;
1487
+ break;
1488
+ }
1489
+ }
1490
+
1491
+ if(!valid && addUnknown)
1492
+ {
1493
+ unknownProps.push_back(p->first);
1494
+ }
1495
+ }
1496
+
1497
+ return noProps;
1498
+ }