zeroc-ice 3.6b1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ICE_LICENSE +54 -0
- data/LICENSE +339 -0
- data/bin/slice2rb +17 -0
- data/ext/Communicator.cpp +596 -0
- data/ext/Communicator.h +25 -0
- data/ext/Config.h +111 -0
- data/ext/Connection.cpp +381 -0
- data/ext/Connection.h +26 -0
- data/ext/Endpoint.cpp +311 -0
- data/ext/Endpoint.h +27 -0
- data/ext/ImplicitContext.cpp +152 -0
- data/ext/ImplicitContext.h +25 -0
- data/ext/Init.cpp +52 -0
- data/ext/Logger.cpp +151 -0
- data/ext/Logger.h +28 -0
- data/ext/ObjectFactory.cpp +140 -0
- data/ext/ObjectFactory.h +50 -0
- data/ext/Operation.cpp +676 -0
- data/ext/Operation.h +36 -0
- data/ext/Properties.cpp +369 -0
- data/ext/Properties.h +25 -0
- data/ext/Proxy.cpp +1354 -0
- data/ext/Proxy.h +27 -0
- data/ext/Slice.cpp +223 -0
- data/ext/Slice.h +22 -0
- data/ext/Types.cpp +3160 -0
- data/ext/Types.h +545 -0
- data/ext/Util.cpp +792 -0
- data/ext/Util.h +511 -0
- data/ext/extconf.rb +118 -0
- data/ext/ice/BZIP_LICENSE +42 -0
- data/ext/ice/MCPP_LICENSE +36 -0
- data/ext/ice/bzip2/blocksort.c +1094 -0
- data/ext/ice/bzip2/bzlib.c +1572 -0
- data/ext/ice/bzip2/bzlib.h +282 -0
- data/ext/ice/bzip2/bzlib_private.h +509 -0
- data/ext/ice/bzip2/compress.c +672 -0
- data/ext/ice/bzip2/crctable.c +104 -0
- data/ext/ice/bzip2/decompress.c +646 -0
- data/ext/ice/bzip2/huffman.c +205 -0
- data/ext/ice/bzip2/randtable.c +84 -0
- data/ext/ice/cpp/include/Ice/ACMF.h +30 -0
- data/ext/ice/cpp/include/Ice/Application.h +156 -0
- data/ext/ice/cpp/include/Ice/AsyncResult.h +363 -0
- data/ext/ice/cpp/include/Ice/AsyncResultF.h +26 -0
- data/ext/ice/cpp/include/Ice/BasicStream.h +1315 -0
- data/ext/ice/cpp/include/Ice/Buffer.h +159 -0
- data/ext/ice/cpp/include/Ice/BuiltinSequences.h +74 -0
- data/ext/ice/cpp/include/Ice/Communicator.h +194 -0
- data/ext/ice/cpp/include/Ice/CommunicatorAsync.h +115 -0
- data/ext/ice/cpp/include/Ice/CommunicatorF.h +60 -0
- data/ext/ice/cpp/include/Ice/Config.h +97 -0
- data/ext/ice/cpp/include/Ice/Connection.h +495 -0
- data/ext/ice/cpp/include/Ice/ConnectionAsync.h +115 -0
- data/ext/ice/cpp/include/Ice/ConnectionF.h +72 -0
- data/ext/ice/cpp/include/Ice/ConnectionFactoryF.h +30 -0
- data/ext/ice/cpp/include/Ice/ConnectionIF.h +37 -0
- data/ext/ice/cpp/include/Ice/Current.h +94 -0
- data/ext/ice/cpp/include/Ice/DefaultObjectFactory.h +48 -0
- data/ext/ice/cpp/include/Ice/DeprecatedStringConverter.h +62 -0
- data/ext/ice/cpp/include/Ice/DispatchInterceptor.h +33 -0
- data/ext/ice/cpp/include/Ice/Dispatcher.h +51 -0
- data/ext/ice/cpp/include/Ice/DynamicLibrary.h +105 -0
- data/ext/ice/cpp/include/Ice/DynamicLibraryF.h +29 -0
- data/ext/ice/cpp/include/Ice/Endpoint.h +350 -0
- data/ext/ice/cpp/include/Ice/EndpointF.h +97 -0
- data/ext/ice/cpp/include/Ice/EndpointTypes.h +74 -0
- data/ext/ice/cpp/include/Ice/Exception.h +114 -0
- data/ext/ice/cpp/include/Ice/FacetMap.h +56 -0
- data/ext/ice/cpp/include/Ice/FactoryTable.h +69 -0
- data/ext/ice/cpp/include/Ice/FactoryTableInit.h +87 -0
- data/ext/ice/cpp/include/Ice/Format.h +39 -0
- data/ext/ice/cpp/include/Ice/Functional.h +138 -0
- data/ext/ice/cpp/include/Ice/GCObject.h +73 -0
- data/ext/ice/cpp/include/Ice/Handle.h +192 -0
- data/ext/ice/cpp/include/Ice/Ice.h +54 -0
- data/ext/ice/cpp/include/Ice/Identity.h +160 -0
- data/ext/ice/cpp/include/Ice/ImplicitContext.h +96 -0
- data/ext/ice/cpp/include/Ice/ImplicitContextF.h +60 -0
- data/ext/ice/cpp/include/Ice/Incoming.h +131 -0
- data/ext/ice/cpp/include/Ice/IncomingAsync.h +108 -0
- data/ext/ice/cpp/include/Ice/IncomingAsyncF.h +35 -0
- data/ext/ice/cpp/include/Ice/Initialize.h +141 -0
- data/ext/ice/cpp/include/Ice/InstanceF.h +26 -0
- data/ext/ice/cpp/include/Ice/Instrumentation.h +377 -0
- data/ext/ice/cpp/include/Ice/InstrumentationF.h +71 -0
- data/ext/ice/cpp/include/Ice/LocalException.h +1022 -0
- data/ext/ice/cpp/include/Ice/LocalObject.h +36 -0
- data/ext/ice/cpp/include/Ice/LocalObjectF.h +26 -0
- data/ext/ice/cpp/include/Ice/Locator.h +2191 -0
- data/ext/ice/cpp/include/Ice/LocatorF.h +89 -0
- data/ext/ice/cpp/include/Ice/Logger.h +94 -0
- data/ext/ice/cpp/include/Ice/LoggerF.h +60 -0
- data/ext/ice/cpp/include/Ice/LoggerUtil.h +153 -0
- data/ext/ice/cpp/include/Ice/Makefile +26 -0
- data/ext/ice/cpp/include/Ice/Metrics.h +2989 -0
- data/ext/ice/cpp/include/Ice/MetricsAdminI.h +662 -0
- data/ext/ice/cpp/include/Ice/MetricsFunctional.h +144 -0
- data/ext/ice/cpp/include/Ice/MetricsObserverI.h +576 -0
- data/ext/ice/cpp/include/Ice/NativePropertiesAdmin.h +55 -0
- data/ext/ice/cpp/include/Ice/Object.h +165 -0
- data/ext/ice/cpp/include/Ice/ObjectAdapter.h +162 -0
- data/ext/ice/cpp/include/Ice/ObjectAdapterF.h +60 -0
- data/ext/ice/cpp/include/Ice/ObjectAdapterFactoryF.h +26 -0
- data/ext/ice/cpp/include/Ice/ObjectF.h +26 -0
- data/ext/ice/cpp/include/Ice/ObjectFactory.h +86 -0
- data/ext/ice/cpp/include/Ice/ObjectFactoryF.h +60 -0
- data/ext/ice/cpp/include/Ice/ObjectFactoryManagerF.h +26 -0
- data/ext/ice/cpp/include/Ice/ObserverHelper.h +177 -0
- data/ext/ice/cpp/include/Ice/Outgoing.h +197 -0
- data/ext/ice/cpp/include/Ice/OutgoingAsync.h +264 -0
- data/ext/ice/cpp/include/Ice/OutgoingAsyncF.h +38 -0
- data/ext/ice/cpp/include/Ice/Plugin.h +121 -0
- data/ext/ice/cpp/include/Ice/PluginF.h +66 -0
- data/ext/ice/cpp/include/Ice/Process.h +568 -0
- data/ext/ice/cpp/include/Ice/ProcessF.h +77 -0
- data/ext/ice/cpp/include/Ice/Properties.h +130 -0
- data/ext/ice/cpp/include/Ice/PropertiesAdmin.h +824 -0
- data/ext/ice/cpp/include/Ice/PropertiesF.h +83 -0
- data/ext/ice/cpp/include/Ice/Protocol.h +242 -0
- data/ext/ice/cpp/include/Ice/Proxy.h +2448 -0
- data/ext/ice/cpp/include/Ice/ProxyF.h +78 -0
- data/ext/ice/cpp/include/Ice/ProxyFactoryF.h +26 -0
- data/ext/ice/cpp/include/Ice/ProxyHandle.h +330 -0
- data/ext/ice/cpp/include/Ice/ReferenceF.h +34 -0
- data/ext/ice/cpp/include/Ice/RemoteLogger.h +1496 -0
- data/ext/ice/cpp/include/Ice/RequestHandlerF.h +29 -0
- data/ext/ice/cpp/include/Ice/ResponseHandlerF.h +25 -0
- data/ext/ice/cpp/include/Ice/Router.h +1155 -0
- data/ext/ice/cpp/include/Ice/RouterF.h +77 -0
- data/ext/ice/cpp/include/Ice/ServantLocator.h +90 -0
- data/ext/ice/cpp/include/Ice/ServantLocatorF.h +60 -0
- data/ext/ice/cpp/include/Ice/ServantManagerF.h +26 -0
- data/ext/ice/cpp/include/Ice/Service.h +260 -0
- data/ext/ice/cpp/include/Ice/SliceChecksumDict.h +56 -0
- data/ext/ice/cpp/include/Ice/SliceChecksums.h +34 -0
- data/ext/ice/cpp/include/Ice/SlicedData.h +103 -0
- data/ext/ice/cpp/include/Ice/SlicedDataF.h +34 -0
- data/ext/ice/cpp/include/Ice/Stream.h +449 -0
- data/ext/ice/cpp/include/Ice/StreamF.h +30 -0
- data/ext/ice/cpp/include/Ice/StreamHelpers.h +877 -0
- data/ext/ice/cpp/include/Ice/ThreadPoolF.h +28 -0
- data/ext/ice/cpp/include/Ice/UserExceptionFactory.h +56 -0
- data/ext/ice/cpp/include/Ice/Version.h +254 -0
- data/ext/ice/cpp/include/IceSSL/Config.h +23 -0
- data/ext/ice/cpp/include/IceSSL/ConnectionInfo.h +119 -0
- data/ext/ice/cpp/include/IceSSL/EndpointInfo.h +101 -0
- data/ext/ice/cpp/include/IceSSL/IceSSL.h +22 -0
- data/ext/ice/cpp/include/IceSSL/Makefile +26 -0
- data/ext/ice/cpp/include/IceSSL/Plugin.h +558 -0
- data/ext/ice/cpp/include/IceUtil/AbstractMutex.h +119 -0
- data/ext/ice/cpp/include/IceUtil/Cache.h +362 -0
- data/ext/ice/cpp/include/IceUtil/Cond.h +323 -0
- data/ext/ice/cpp/include/IceUtil/Config.h +234 -0
- data/ext/ice/cpp/include/IceUtil/CountDownLatch.h +50 -0
- data/ext/ice/cpp/include/IceUtil/CtrlCHandler.h +70 -0
- data/ext/ice/cpp/include/IceUtil/DisableWarnings.h +45 -0
- data/ext/ice/cpp/include/IceUtil/Exception.h +184 -0
- data/ext/ice/cpp/include/IceUtil/Functional.h +389 -0
- data/ext/ice/cpp/include/IceUtil/Handle.h +266 -0
- data/ext/ice/cpp/include/IceUtil/IceUtil.h +51 -0
- data/ext/ice/cpp/include/IceUtil/IconvStringConverter.h +302 -0
- data/ext/ice/cpp/include/IceUtil/InputUtil.h +47 -0
- data/ext/ice/cpp/include/IceUtil/Iterator.h +36 -0
- data/ext/ice/cpp/include/IceUtil/Lock.h +135 -0
- data/ext/ice/cpp/include/IceUtil/Makefile +26 -0
- data/ext/ice/cpp/include/IceUtil/Monitor.h +249 -0
- data/ext/ice/cpp/include/IceUtil/Mutex.h +357 -0
- data/ext/ice/cpp/include/IceUtil/MutexProtocol.h +28 -0
- data/ext/ice/cpp/include/IceUtil/MutexPtrLock.h +83 -0
- data/ext/ice/cpp/include/IceUtil/MutexPtrTryLock.h +82 -0
- data/ext/ice/cpp/include/IceUtil/Optional.h +322 -0
- data/ext/ice/cpp/include/IceUtil/Options.h +141 -0
- data/ext/ice/cpp/include/IceUtil/OutputUtil.h +362 -0
- data/ext/ice/cpp/include/IceUtil/PopDisableWarnings.h +19 -0
- data/ext/ice/cpp/include/IceUtil/PushDisableWarnings.h +26 -0
- data/ext/ice/cpp/include/IceUtil/Random.h +24 -0
- data/ext/ice/cpp/include/IceUtil/RecMutex.h +113 -0
- data/ext/ice/cpp/include/IceUtil/SHA1.h +65 -0
- data/ext/ice/cpp/include/IceUtil/ScannerConfig.h +44 -0
- data/ext/ice/cpp/include/IceUtil/ScopedArray.h +97 -0
- data/ext/ice/cpp/include/IceUtil/Shared.h +168 -0
- data/ext/ice/cpp/include/IceUtil/StringConverter.h +175 -0
- data/ext/ice/cpp/include/IceUtil/StringUtil.h +91 -0
- data/ext/ice/cpp/include/IceUtil/Thread.h +181 -0
- data/ext/ice/cpp/include/IceUtil/ThreadException.h +108 -0
- data/ext/ice/cpp/include/IceUtil/Time.h +209 -0
- data/ext/ice/cpp/include/IceUtil/Timer.h +143 -0
- data/ext/ice/cpp/include/IceUtil/UUID.h +22 -0
- data/ext/ice/cpp/include/IceUtil/UndefSysMacros.h +42 -0
- data/ext/ice/cpp/include/IceUtil/UniquePtr.h +101 -0
- data/ext/ice/cpp/include/Slice/CPlusPlusUtil.h +64 -0
- data/ext/ice/cpp/include/Slice/Checksum.h +26 -0
- data/ext/ice/cpp/include/Slice/CsUtil.h +92 -0
- data/ext/ice/cpp/include/Slice/DotNetNames.h +34 -0
- data/ext/ice/cpp/include/Slice/FileTracker.h +71 -0
- data/ext/ice/cpp/include/Slice/JavaUtil.h +277 -0
- data/ext/ice/cpp/include/Slice/Makefile +26 -0
- data/ext/ice/cpp/include/Slice/PHPUtil.h +50 -0
- data/ext/ice/cpp/include/Slice/Parser.h +1116 -0
- data/ext/ice/cpp/include/Slice/Preprocessor.h +68 -0
- data/ext/ice/cpp/include/Slice/PythonUtil.h +64 -0
- data/ext/ice/cpp/include/Slice/RubyUtil.h +54 -0
- data/ext/ice/cpp/include/Slice/Util.h +33 -0
- data/ext/ice/cpp/src/Ice/ACM.cpp +343 -0
- data/ext/ice/cpp/src/Ice/ACM.h +117 -0
- data/ext/ice/cpp/src/Ice/Acceptor.cpp +16 -0
- data/ext/ice/cpp/src/Ice/Acceptor.h +41 -0
- data/ext/ice/cpp/src/Ice/AcceptorF.h +30 -0
- data/ext/ice/cpp/src/Ice/Application.cpp +760 -0
- data/ext/ice/cpp/src/Ice/AsyncResult.cpp +599 -0
- data/ext/ice/cpp/src/Ice/Base64.cpp +269 -0
- data/ext/ice/cpp/src/Ice/Base64.h +36 -0
- data/ext/ice/cpp/src/Ice/BasicStream.cpp +3393 -0
- data/ext/ice/cpp/src/Ice/Buffer.cpp +98 -0
- data/ext/ice/cpp/src/Ice/BuiltinSequences.cpp +34 -0
- data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +718 -0
- data/ext/ice/cpp/src/Ice/CollocatedRequestHandler.h +106 -0
- data/ext/ice/cpp/src/Ice/Communicator.cpp +45 -0
- data/ext/ice/cpp/src/Ice/CommunicatorF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/CommunicatorI.cpp +386 -0
- data/ext/ice/cpp/src/Ice/CommunicatorI.h +112 -0
- data/ext/ice/cpp/src/Ice/ConnectRequestHandler.cpp +546 -0
- data/ext/ice/cpp/src/Ice/ConnectRequestHandler.h +97 -0
- data/ext/ice/cpp/src/Ice/Connection.cpp +58 -0
- data/ext/ice/cpp/src/Ice/ConnectionF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/ConnectionFactory.cpp +1639 -0
- data/ext/ice/cpp/src/Ice/ConnectionFactory.h +236 -0
- data/ext/ice/cpp/src/Ice/ConnectionI.cpp +3876 -0
- data/ext/ice/cpp/src/Ice/ConnectionI.h +364 -0
- data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +115 -0
- data/ext/ice/cpp/src/Ice/ConnectionRequestHandler.h +50 -0
- data/ext/ice/cpp/src/Ice/Connector.cpp +16 -0
- data/ext/ice/cpp/src/Ice/Connector.h +36 -0
- data/ext/ice/cpp/src/Ice/ConnectorF.h +26 -0
- data/ext/ice/cpp/src/Ice/Current.cpp +38 -0
- data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +168 -0
- data/ext/ice/cpp/src/Ice/DefaultsAndOverrides.h +57 -0
- data/ext/ice/cpp/src/Ice/DefaultsAndOverridesF.h +26 -0
- data/ext/ice/cpp/src/Ice/DeprecatedStringConverter.cpp +60 -0
- data/ext/ice/cpp/src/Ice/DispatchInterceptor.cpp +49 -0
- data/ext/ice/cpp/src/Ice/DynamicLibrary.cpp +281 -0
- data/ext/ice/cpp/src/Ice/Endpoint.cpp +53 -0
- data/ext/ice/cpp/src/Ice/EndpointF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/EndpointFactory.cpp +25 -0
- data/ext/ice/cpp/src/Ice/EndpointFactory.h +44 -0
- data/ext/ice/cpp/src/Ice/EndpointFactoryF.h +26 -0
- data/ext/ice/cpp/src/Ice/EndpointFactoryManager.cpp +208 -0
- data/ext/ice/cpp/src/Ice/EndpointFactoryManager.h +46 -0
- data/ext/ice/cpp/src/Ice/EndpointFactoryManagerF.h +26 -0
- data/ext/ice/cpp/src/Ice/EndpointI.cpp +87 -0
- data/ext/ice/cpp/src/Ice/EndpointI.h +165 -0
- data/ext/ice/cpp/src/Ice/EndpointIF.h +41 -0
- data/ext/ice/cpp/src/Ice/EndpointTypes.cpp +38 -0
- data/ext/ice/cpp/src/Ice/EventHandler.cpp +35 -0
- data/ext/ice/cpp/src/Ice/EventHandler.h +78 -0
- data/ext/ice/cpp/src/Ice/EventHandlerF.h +26 -0
- data/ext/ice/cpp/src/Ice/EventLoggerMsg.h +53 -0
- data/ext/ice/cpp/src/Ice/Exception.cpp +832 -0
- data/ext/ice/cpp/src/Ice/FacetMap.cpp +34 -0
- data/ext/ice/cpp/src/Ice/FactoryTable.cpp +158 -0
- data/ext/ice/cpp/src/Ice/FactoryTableInit.cpp +95 -0
- data/ext/ice/cpp/src/Ice/GCObject.cpp +444 -0
- data/ext/ice/cpp/src/Ice/HashUtil.h +59 -0
- data/ext/ice/cpp/src/Ice/HttpParser.cpp +680 -0
- data/ext/ice/cpp/src/Ice/HttpParser.h +124 -0
- data/ext/ice/cpp/src/Ice/IPEndpointI.cpp +733 -0
- data/ext/ice/cpp/src/Ice/IPEndpointI.h +157 -0
- data/ext/ice/cpp/src/Ice/IPEndpointIF.h +29 -0
- data/ext/ice/cpp/src/Ice/Identity.cpp +42 -0
- data/ext/ice/cpp/src/Ice/ImplicitContext.cpp +41 -0
- data/ext/ice/cpp/src/Ice/ImplicitContextF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/ImplicitContextI.cpp +639 -0
- data/ext/ice/cpp/src/Ice/ImplicitContextI.h +51 -0
- data/ext/ice/cpp/src/Ice/Incoming.cpp +757 -0
- data/ext/ice/cpp/src/Ice/IncomingAsync.cpp +340 -0
- data/ext/ice/cpp/src/Ice/IncomingRequest.h +37 -0
- data/ext/ice/cpp/src/Ice/Initialize.cpp +401 -0
- data/ext/ice/cpp/src/Ice/Instance.cpp +1928 -0
- data/ext/ice/cpp/src/Ice/Instance.h +198 -0
- data/ext/ice/cpp/src/Ice/Instrumentation.cpp +68 -0
- data/ext/ice/cpp/src/Ice/InstrumentationF.cpp +43 -0
- data/ext/ice/cpp/src/Ice/InstrumentationI.cpp +1083 -0
- data/ext/ice/cpp/src/Ice/InstrumentationI.h +262 -0
- data/ext/ice/cpp/src/Ice/LocalException.cpp +2091 -0
- data/ext/ice/cpp/src/Ice/LocalObject.cpp +29 -0
- data/ext/ice/cpp/src/Ice/Locator.cpp +1946 -0
- data/ext/ice/cpp/src/Ice/LocatorF.cpp +39 -0
- data/ext/ice/cpp/src/Ice/LocatorInfo.cpp +917 -0
- data/ext/ice/cpp/src/Ice/LocatorInfo.h +193 -0
- data/ext/ice/cpp/src/Ice/LocatorInfoF.h +34 -0
- data/ext/ice/cpp/src/Ice/Logger.cpp +40 -0
- data/ext/ice/cpp/src/Ice/LoggerAdminI.cpp +862 -0
- data/ext/ice/cpp/src/Ice/LoggerAdminI.h +46 -0
- data/ext/ice/cpp/src/Ice/LoggerF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/LoggerI.cpp +199 -0
- data/ext/ice/cpp/src/Ice/LoggerI.h +57 -0
- data/ext/ice/cpp/src/Ice/LoggerUtil.cpp +107 -0
- data/ext/ice/cpp/src/Ice/Makefile +190 -0
- data/ext/ice/cpp/src/Ice/Metrics.cpp +2159 -0
- data/ext/ice/cpp/src/Ice/MetricsAdminI.cpp +669 -0
- data/ext/ice/cpp/src/Ice/MetricsObserverI.cpp +14 -0
- data/ext/ice/cpp/src/Ice/Network.cpp +2694 -0
- data/ext/ice/cpp/src/Ice/Network.h +291 -0
- data/ext/ice/cpp/src/Ice/NetworkF.h +28 -0
- data/ext/ice/cpp/src/Ice/NetworkProxy.cpp +325 -0
- data/ext/ice/cpp/src/Ice/NetworkProxy.h +74 -0
- data/ext/ice/cpp/src/Ice/NetworkProxyF.h +26 -0
- data/ext/ice/cpp/src/Ice/Object.cpp +440 -0
- data/ext/ice/cpp/src/Ice/ObjectAdapter.cpp +41 -0
- data/ext/ice/cpp/src/Ice/ObjectAdapterF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +241 -0
- data/ext/ice/cpp/src/Ice/ObjectAdapterFactory.h +52 -0
- data/ext/ice/cpp/src/Ice/ObjectAdapterI.cpp +1498 -0
- data/ext/ice/cpp/src/Ice/ObjectAdapterI.h +155 -0
- data/ext/ice/cpp/src/Ice/ObjectFactory.cpp +41 -0
- data/ext/ice/cpp/src/Ice/ObjectFactoryF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/ObjectFactoryManager.cpp +140 -0
- data/ext/ice/cpp/src/Ice/ObjectFactoryManager.h +43 -0
- data/ext/ice/cpp/src/Ice/ObserverHelper.cpp +84 -0
- data/ext/ice/cpp/src/Ice/OpaqueEndpointI.cpp +407 -0
- data/ext/ice/cpp/src/Ice/OpaqueEndpointI.h +70 -0
- data/ext/ice/cpp/src/Ice/Outgoing.cpp +737 -0
- data/ext/ice/cpp/src/Ice/OutgoingAsync.cpp +874 -0
- data/ext/ice/cpp/src/Ice/Plugin.cpp +43 -0
- data/ext/ice/cpp/src/Ice/PluginF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/PluginManagerI.cpp +503 -0
- data/ext/ice/cpp/src/Ice/PluginManagerI.h +67 -0
- data/ext/ice/cpp/src/Ice/Process.cpp +299 -0
- data/ext/ice/cpp/src/Ice/ProcessF.cpp +39 -0
- data/ext/ice/cpp/src/Ice/Properties.cpp +45 -0
- data/ext/ice/cpp/src/Ice/PropertiesAdmin.cpp +555 -0
- data/ext/ice/cpp/src/Ice/PropertiesAdminI.cpp +207 -0
- data/ext/ice/cpp/src/Ice/PropertiesAdminI.h +45 -0
- data/ext/ice/cpp/src/Ice/PropertiesF.cpp +39 -0
- data/ext/ice/cpp/src/Ice/PropertiesI.cpp +759 -0
- data/ext/ice/cpp/src/Ice/PropertiesI.h +78 -0
- data/ext/ice/cpp/src/Ice/PropertyNames.cpp +1293 -0
- data/ext/ice/cpp/src/Ice/PropertyNames.h +81 -0
- data/ext/ice/cpp/src/Ice/Protocol.cpp +137 -0
- data/ext/ice/cpp/src/Ice/ProtocolInstance.cpp +98 -0
- data/ext/ice/cpp/src/Ice/ProtocolInstance.h +91 -0
- data/ext/ice/cpp/src/Ice/ProtocolInstanceF.h +26 -0
- data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +51 -0
- data/ext/ice/cpp/src/Ice/ProtocolPluginFacade.h +67 -0
- data/ext/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +26 -0
- data/ext/ice/cpp/src/Ice/Proxy.cpp +1810 -0
- data/ext/ice/cpp/src/Ice/ProxyFactory.cpp +305 -0
- data/ext/ice/cpp/src/Ice/ProxyFactory.h +57 -0
- data/ext/ice/cpp/src/Ice/Reference.cpp +1947 -0
- data/ext/ice/cpp/src/Ice/Reference.h +305 -0
- data/ext/ice/cpp/src/Ice/ReferenceFactory.cpp +937 -0
- data/ext/ice/cpp/src/Ice/ReferenceFactory.h +81 -0
- data/ext/ice/cpp/src/Ice/ReferenceFactoryF.h +24 -0
- data/ext/ice/cpp/src/Ice/RemoteLogger.cpp +958 -0
- data/ext/ice/cpp/src/Ice/ReplyStatus.h +29 -0
- data/ext/ice/cpp/src/Ice/RequestHandler.cpp +40 -0
- data/ext/ice/cpp/src/Ice/RequestHandler.h +90 -0
- data/ext/ice/cpp/src/Ice/RequestHandlerFactory.cpp +70 -0
- data/ext/ice/cpp/src/Ice/RequestHandlerFactory.h +41 -0
- data/ext/ice/cpp/src/Ice/ResponseHandler.cpp +20 -0
- data/ext/ice/cpp/src/Ice/ResponseHandler.h +39 -0
- data/ext/ice/cpp/src/Ice/RetryQueue.cpp +154 -0
- data/ext/ice/cpp/src/Ice/RetryQueue.h +69 -0
- data/ext/ice/cpp/src/Ice/RetryQueueF.h +24 -0
- data/ext/ice/cpp/src/Ice/Router.cpp +849 -0
- data/ext/ice/cpp/src/Ice/RouterF.cpp +39 -0
- data/ext/ice/cpp/src/Ice/RouterInfo.cpp +381 -0
- data/ext/ice/cpp/src/Ice/RouterInfo.h +148 -0
- data/ext/ice/cpp/src/Ice/RouterInfoF.h +30 -0
- data/ext/ice/cpp/src/Ice/Selector.cpp +926 -0
- data/ext/ice/cpp/src/Ice/Selector.h +231 -0
- data/ext/ice/cpp/src/Ice/ServantLocator.cpp +41 -0
- data/ext/ice/cpp/src/Ice/ServantLocatorF.cpp +38 -0
- data/ext/ice/cpp/src/Ice/ServantManager.cpp +495 -0
- data/ext/ice/cpp/src/Ice/ServantManager.h +74 -0
- data/ext/ice/cpp/src/Ice/Service.cpp +1897 -0
- data/ext/ice/cpp/src/Ice/SharedContext.h +51 -0
- data/ext/ice/cpp/src/Ice/SliceChecksumDict.cpp +34 -0
- data/ext/ice/cpp/src/Ice/SliceChecksums.cpp +80 -0
- data/ext/ice/cpp/src/Ice/SlicedData.cpp +80 -0
- data/ext/ice/cpp/src/Ice/Stream.cpp +53 -0
- data/ext/ice/cpp/src/Ice/StreamI.cpp +832 -0
- data/ext/ice/cpp/src/Ice/StreamI.h +198 -0
- data/ext/ice/cpp/src/Ice/StreamSocket.cpp +521 -0
- data/ext/ice/cpp/src/Ice/StreamSocket.h +85 -0
- data/ext/ice/cpp/src/Ice/StringConverterPlugin.cpp +145 -0
- data/ext/ice/cpp/src/Ice/SysLoggerI.cpp +167 -0
- data/ext/ice/cpp/src/Ice/SysLoggerI.h +43 -0
- data/ext/ice/cpp/src/Ice/TcpAcceptor.cpp +235 -0
- data/ext/ice/cpp/src/Ice/TcpAcceptor.h +67 -0
- data/ext/ice/cpp/src/Ice/TcpConnector.cpp +133 -0
- data/ext/ice/cpp/src/Ice/TcpConnector.h +51 -0
- data/ext/ice/cpp/src/Ice/TcpEndpointI.cpp +397 -0
- data/ext/ice/cpp/src/Ice/TcpEndpointI.h +93 -0
- data/ext/ice/cpp/src/Ice/TcpTransceiver.cpp +127 -0
- data/ext/ice/cpp/src/Ice/TcpTransceiver.h +61 -0
- data/ext/ice/cpp/src/Ice/ThreadPool.cpp +1357 -0
- data/ext/ice/cpp/src/Ice/ThreadPool.h +399 -0
- data/ext/ice/cpp/src/Ice/TraceLevels.cpp +43 -0
- data/ext/ice/cpp/src/Ice/TraceLevels.h +50 -0
- data/ext/ice/cpp/src/Ice/TraceLevelsF.h +26 -0
- data/ext/ice/cpp/src/Ice/TraceUtil.cpp +452 -0
- data/ext/ice/cpp/src/Ice/TraceUtil.h +28 -0
- data/ext/ice/cpp/src/Ice/Transceiver.cpp +24 -0
- data/ext/ice/cpp/src/Ice/Transceiver.h +52 -0
- data/ext/ice/cpp/src/Ice/TransceiverF.h +38 -0
- data/ext/ice/cpp/src/Ice/UdpConnector.cpp +144 -0
- data/ext/ice/cpp/src/Ice/UdpConnector.h +51 -0
- data/ext/ice/cpp/src/Ice/UdpEndpointI.cpp +483 -0
- data/ext/ice/cpp/src/Ice/UdpEndpointI.h +95 -0
- data/ext/ice/cpp/src/Ice/UdpTransceiver.cpp +1156 -0
- data/ext/ice/cpp/src/Ice/UdpTransceiver.h +123 -0
- data/ext/ice/cpp/src/Ice/Version.cpp +46 -0
- data/ext/ice/cpp/src/Ice/WSAcceptor.cpp +103 -0
- data/ext/ice/cpp/src/Ice/WSAcceptor.h +61 -0
- data/ext/ice/cpp/src/Ice/WSConnector.cpp +113 -0
- data/ext/ice/cpp/src/Ice/WSConnector.h +51 -0
- data/ext/ice/cpp/src/Ice/WSEndpoint.cpp +441 -0
- data/ext/ice/cpp/src/Ice/WSEndpoint.h +97 -0
- data/ext/ice/cpp/src/Ice/WSTransceiver.cpp +1728 -0
- data/ext/ice/cpp/src/Ice/WSTransceiver.h +149 -0
- data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.cpp +594 -0
- data/ext/ice/cpp/src/IceDiscovery/IceDiscovery.h +1035 -0
- data/ext/ice/cpp/src/IceDiscovery/LocatorI.cpp +208 -0
- data/ext/ice/cpp/src/IceDiscovery/LocatorI.h +78 -0
- data/ext/ice/cpp/src/IceDiscovery/LookupI.cpp +308 -0
- data/ext/ice/cpp/src/IceDiscovery/LookupI.h +183 -0
- data/ext/ice/cpp/src/IceDiscovery/Makefile +61 -0
- data/ext/ice/cpp/src/IceDiscovery/PluginI.cpp +148 -0
- data/ext/ice/cpp/src/IceDiscovery/PluginI.h +39 -0
- data/ext/ice/cpp/src/IceSSL/AcceptorI.cpp +258 -0
- data/ext/ice/cpp/src/IceSSL/AcceptorI.h +66 -0
- data/ext/ice/cpp/src/IceSSL/Certificate.cpp +1334 -0
- data/ext/ice/cpp/src/IceSSL/ConnectionInfo.cpp +42 -0
- data/ext/ice/cpp/src/IceSSL/ConnectorI.cpp +151 -0
- data/ext/ice/cpp/src/IceSSL/ConnectorI.h +56 -0
- data/ext/ice/cpp/src/IceSSL/EndpointI.cpp +397 -0
- data/ext/ice/cpp/src/IceSSL/EndpointI.h +96 -0
- data/ext/ice/cpp/src/IceSSL/EndpointInfo.cpp +41 -0
- data/ext/ice/cpp/src/IceSSL/Instance.cpp +38 -0
- data/ext/ice/cpp/src/IceSSL/Instance.h +42 -0
- data/ext/ice/cpp/src/IceSSL/InstanceF.h +34 -0
- data/ext/ice/cpp/src/IceSSL/Makefile +82 -0
- data/ext/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +1001 -0
- data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +607 -0
- data/ext/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +75 -0
- data/ext/ice/cpp/src/IceSSL/PluginI.cpp +102 -0
- data/ext/ice/cpp/src/IceSSL/PluginI.h +56 -0
- data/ext/ice/cpp/src/IceSSL/RFC2253.cpp +541 -0
- data/ext/ice/cpp/src/IceSSL/RFC2253.h +67 -0
- data/ext/ice/cpp/src/IceSSL/SChannelEngine.cpp +729 -0
- data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +1062 -0
- data/ext/ice/cpp/src/IceSSL/SChannelTransceiverI.h +130 -0
- data/ext/ice/cpp/src/IceSSL/SSLEngine.cpp +291 -0
- data/ext/ice/cpp/src/IceSSL/SSLEngine.h +264 -0
- data/ext/ice/cpp/src/IceSSL/SSLEngineF.h +41 -0
- data/ext/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +1514 -0
- data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +609 -0
- data/ext/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +91 -0
- data/ext/ice/cpp/src/IceSSL/TrustManager.cpp +246 -0
- data/ext/ice/cpp/src/IceSSL/TrustManager.h +51 -0
- data/ext/ice/cpp/src/IceSSL/TrustManagerF.h +26 -0
- data/ext/ice/cpp/src/IceSSL/Util.cpp +1423 -0
- data/ext/ice/cpp/src/IceSSL/Util.h +136 -0
- data/ext/ice/cpp/src/IceUtil/ArgVector.cpp +65 -0
- data/ext/ice/cpp/src/IceUtil/ArgVector.h +41 -0
- data/ext/ice/cpp/src/IceUtil/Cond.cpp +386 -0
- data/ext/ice/cpp/src/IceUtil/ConvertUTF.cpp +477 -0
- data/ext/ice/cpp/src/IceUtil/ConvertUTF.h +144 -0
- data/ext/ice/cpp/src/IceUtil/CountDownLatch.cpp +184 -0
- data/ext/ice/cpp/src/IceUtil/CtrlCHandler.cpp +273 -0
- data/ext/ice/cpp/src/IceUtil/Exception.cpp +782 -0
- data/ext/ice/cpp/src/IceUtil/FileUtil.cpp +532 -0
- data/ext/ice/cpp/src/IceUtil/FileUtil.h +159 -0
- data/ext/ice/cpp/src/IceUtil/InputUtil.cpp +41 -0
- data/ext/ice/cpp/src/IceUtil/Makefile +68 -0
- data/ext/ice/cpp/src/IceUtil/MutexProtocol.cpp +24 -0
- data/ext/ice/cpp/src/IceUtil/Options.cpp +1049 -0
- data/ext/ice/cpp/src/IceUtil/OutputUtil.cpp +591 -0
- data/ext/ice/cpp/src/IceUtil/Random.cpp +185 -0
- data/ext/ice/cpp/src/IceUtil/RecMutex.cpp +257 -0
- data/ext/ice/cpp/src/IceUtil/SHA1.cpp +126 -0
- data/ext/ice/cpp/src/IceUtil/Shared.cpp +200 -0
- data/ext/ice/cpp/src/IceUtil/StopWatch.h +54 -0
- data/ext/ice/cpp/src/IceUtil/StringConverter.cpp +450 -0
- data/ext/ice/cpp/src/IceUtil/StringUtil.cpp +842 -0
- data/ext/ice/cpp/src/IceUtil/Thread.cpp +809 -0
- data/ext/ice/cpp/src/IceUtil/ThreadException.cpp +172 -0
- data/ext/ice/cpp/src/IceUtil/Time.cpp +306 -0
- data/ext/ice/cpp/src/IceUtil/Timer.cpp +251 -0
- data/ext/ice/cpp/src/IceUtil/UUID.cpp +174 -0
- data/ext/ice/cpp/src/IceUtil/Unicode.cpp +131 -0
- data/ext/ice/cpp/src/IceUtil/Unicode.h +49 -0
- data/ext/ice/cpp/src/Slice/CPlusPlusUtil.cpp +1139 -0
- data/ext/ice/cpp/src/Slice/Checksum.cpp +452 -0
- data/ext/ice/cpp/src/Slice/CsUtil.cpp +2650 -0
- data/ext/ice/cpp/src/Slice/DotNetNames.cpp +146 -0
- data/ext/ice/cpp/src/Slice/FileTracker.cpp +203 -0
- data/ext/ice/cpp/src/Slice/Grammar.cpp +4755 -0
- data/ext/ice/cpp/src/Slice/Grammar.h +98 -0
- data/ext/ice/cpp/src/Slice/GrammarUtil.h +234 -0
- data/ext/ice/cpp/src/Slice/JavaUtil.cpp +4376 -0
- data/ext/ice/cpp/src/Slice/MD5.cpp +57 -0
- data/ext/ice/cpp/src/Slice/MD5.h +44 -0
- data/ext/ice/cpp/src/Slice/MD5I.cpp +385 -0
- data/ext/ice/cpp/src/Slice/MD5I.h +91 -0
- data/ext/ice/cpp/src/Slice/Makefile +65 -0
- data/ext/ice/cpp/src/Slice/PHPUtil.cpp +156 -0
- data/ext/ice/cpp/src/Slice/Parser.cpp +6386 -0
- data/ext/ice/cpp/src/Slice/Preprocessor.cpp +686 -0
- data/ext/ice/cpp/src/Slice/Python.cpp +675 -0
- data/ext/ice/cpp/src/Slice/PythonUtil.cpp +2614 -0
- data/ext/ice/cpp/src/Slice/Ruby.cpp +317 -0
- data/ext/ice/cpp/src/Slice/RubyUtil.cpp +1774 -0
- data/ext/ice/cpp/src/Slice/Scanner.cpp +2426 -0
- data/ext/ice/cpp/src/Slice/Util.cpp +325 -0
- data/ext/ice/mcpp/config.h.Darwin +227 -0
- data/ext/ice/mcpp/config.h.Linux +227 -0
- data/ext/ice/mcpp/config.h.MINGW +7 -0
- data/ext/ice/mcpp/configed.H +382 -0
- data/ext/ice/mcpp/directive.c +1699 -0
- data/ext/ice/mcpp/eval.c +1673 -0
- data/ext/ice/mcpp/expand.c +2980 -0
- data/ext/ice/mcpp/internal.H +564 -0
- data/ext/ice/mcpp/main.c +1131 -0
- data/ext/ice/mcpp/mbchar.c +869 -0
- data/ext/ice/mcpp/mcpp_lib.h +31 -0
- data/ext/ice/mcpp/mcpp_out.h +13 -0
- data/ext/ice/mcpp/support.c +2811 -0
- data/ext/ice/mcpp/system.H +396 -0
- data/ext/ice/mcpp/system.c +4940 -0
- data/ice.gemspec +41 -0
- data/lib/Glacier2.rb +12 -0
- data/lib/Glacier2/Metrics.rb +99 -0
- data/lib/Glacier2/PermissionsVerifier.rb +168 -0
- data/lib/Glacier2/PermissionsVerifierF.rb +34 -0
- data/lib/Glacier2/Router.rb +141 -0
- data/lib/Glacier2/RouterF.rb +29 -0
- data/lib/Glacier2/SSLInfo.rb +79 -0
- data/lib/Glacier2/Session.rb +470 -0
- data/lib/Ice.rb +659 -0
- data/lib/Ice/BuiltinSequences.rb +64 -0
- data/lib/Ice/Communicator.rb +93 -0
- data/lib/Ice/CommunicatorF.rb +28 -0
- data/lib/Ice/Connection.rb +414 -0
- data/lib/Ice/ConnectionF.rb +36 -0
- data/lib/Ice/Current.rb +152 -0
- data/lib/Ice/Endpoint.rb +265 -0
- data/lib/Ice/EndpointF.rb +52 -0
- data/lib/Ice/EndpointTypes.rb +77 -0
- data/lib/Ice/FacetMap.rb +28 -0
- data/lib/Ice/Identity.rb +70 -0
- data/lib/Ice/ImplicitContext.rb +59 -0
- data/lib/Ice/ImplicitContextF.rb +28 -0
- data/lib/Ice/Instrumentation.rb +425 -0
- data/lib/Ice/InstrumentationF.rb +35 -0
- data/lib/Ice/LocalException.rb +1081 -0
- data/lib/Ice/Locator.rb +314 -0
- data/lib/Ice/LocatorF.rb +34 -0
- data/lib/Ice/Logger.rb +57 -0
- data/lib/Ice/LoggerF.rb +28 -0
- data/lib/Ice/Metrics.rb +696 -0
- data/lib/Ice/ObjectAdapterF.rb +28 -0
- data/lib/Ice/ObjectFactory.rb +53 -0
- data/lib/Ice/ObjectFactoryF.rb +28 -0
- data/lib/Ice/Plugin.rb +87 -0
- data/lib/Ice/PluginF.rb +32 -0
- data/lib/Ice/Process.rb +93 -0
- data/lib/Ice/ProcessF.rb +29 -0
- data/lib/Ice/Properties.rb +65 -0
- data/lib/Ice/PropertiesAdmin.rb +104 -0
- data/lib/Ice/PropertiesF.rb +33 -0
- data/lib/Ice/Router.rb +163 -0
- data/lib/Ice/RouterF.rb +29 -0
- data/lib/Ice/SliceChecksumDict.rb +28 -0
- data/lib/Ice/Version.rb +100 -0
- data/lib/IceBox.rb +10 -0
- data/lib/IceBox/IceBox.rb +272 -0
- data/lib/IceGrid.rb +17 -0
- data/lib/IceGrid/Admin.rb +1076 -0
- data/lib/IceGrid/Descriptor.rb +1505 -0
- data/lib/IceGrid/Exception.rb +401 -0
- data/lib/IceGrid/FileParser.rb +105 -0
- data/lib/IceGrid/Locator.rb +105 -0
- data/lib/IceGrid/Observer.rb +571 -0
- data/lib/IceGrid/Query.rb +168 -0
- data/lib/IceGrid/Registry.rb +120 -0
- data/lib/IceGrid/Session.rb +114 -0
- data/lib/IceGrid/UserAccountMapper.rb +101 -0
- data/lib/IcePatch2.rb +10 -0
- data/lib/IcePatch2/FileInfo.rb +75 -0
- data/lib/IcePatch2/FileServer.rb +141 -0
- data/lib/IceStorm.rb +11 -0
- data/lib/IceStorm/IceStorm.rb +463 -0
- data/lib/IceStorm/Metrics.rb +155 -0
- data/slice/Freeze/BackgroundSaveEvictor.ice +111 -0
- data/slice/Freeze/CatalogData.ice +49 -0
- data/slice/Freeze/Connection.ice +111 -0
- data/slice/Freeze/ConnectionF.ice +20 -0
- data/slice/Freeze/DB.ice +37 -0
- data/slice/Freeze/Evictor.ice +339 -0
- data/slice/Freeze/EvictorF.ice +22 -0
- data/slice/Freeze/EvictorStorage.ice +72 -0
- data/slice/Freeze/Exception.ice +100 -0
- data/slice/Freeze/Transaction.ice +57 -0
- data/slice/Freeze/TransactionalEvictor.ice +50 -0
- data/slice/Glacier2/Metrics.ice +77 -0
- data/slice/Glacier2/PermissionsVerifier.ice +105 -0
- data/slice/Glacier2/PermissionsVerifierF.ice +21 -0
- data/slice/Glacier2/Router.ice +178 -0
- data/slice/Glacier2/RouterF.ice +20 -0
- data/slice/Glacier2/SSLInfo.ice +50 -0
- data/slice/Glacier2/Session.ice +273 -0
- data/slice/Ice/BuiltinSequences.ice +48 -0
- data/slice/Ice/Communicator.ice +567 -0
- data/slice/Ice/CommunicatorF.ice +20 -0
- data/slice/Ice/Connection.ice +323 -0
- data/slice/Ice/ConnectionF.ice +22 -0
- data/slice/Ice/Current.ice +160 -0
- data/slice/Ice/Endpoint.ice +227 -0
- data/slice/Ice/EndpointF.ice +32 -0
- data/slice/Ice/EndpointTypes.ice +38 -0
- data/slice/Ice/FacetMap.ice +25 -0
- data/slice/Ice/Identity.ice +59 -0
- data/slice/Ice/ImplicitContext.ice +109 -0
- data/slice/Ice/ImplicitContextF.ice +20 -0
- data/slice/Ice/Instrumentation.ice +499 -0
- data/slice/Ice/InstrumentationF.ice +26 -0
- data/slice/Ice/LocalException.ice +1015 -0
- data/slice/Ice/Locator.ice +227 -0
- data/slice/Ice/LocatorF.ice +21 -0
- data/slice/Ice/Logger.ice +86 -0
- data/slice/Ice/LoggerF.ice +20 -0
- data/slice/Ice/Metrics.ice +422 -0
- data/slice/Ice/ObjectAdapter.ice +673 -0
- data/slice/Ice/ObjectAdapterF.ice +20 -0
- data/slice/Ice/ObjectFactory.ice +60 -0
- data/slice/Ice/ObjectFactoryF.ice +20 -0
- data/slice/Ice/Plugin.ice +117 -0
- data/slice/Ice/PluginF.ice +21 -0
- data/slice/Ice/Process.ice +54 -0
- data/slice/Ice/ProcessF.ice +20 -0
- data/slice/Ice/Properties.ice +228 -0
- data/slice/Ice/PropertiesAdmin.ice +75 -0
- data/slice/Ice/PropertiesF.ice +21 -0
- data/slice/Ice/RemoteLogger.ice +232 -0
- data/slice/Ice/Router.ice +83 -0
- data/slice/Ice/RouterF.ice +20 -0
- data/slice/Ice/ServantLocator.ice +117 -0
- data/slice/Ice/ServantLocatorF.ice +20 -0
- data/slice/Ice/SliceChecksumDict.ice +25 -0
- data/slice/Ice/Version.ice +39 -0
- data/slice/IceBox/IceBox.ice +194 -0
- data/slice/IceDiscovery/IceDiscovery.ice +32 -0
- data/slice/IceGrid/Admin.ice +1578 -0
- data/slice/IceGrid/Descriptor.ice +1079 -0
- data/slice/IceGrid/Discovery.ice +73 -0
- data/slice/IceGrid/Exception.ice +383 -0
- data/slice/IceGrid/FileParser.ice +61 -0
- data/slice/IceGrid/Locator.ice +56 -0
- data/slice/IceGrid/Observer.ice +394 -0
- data/slice/IceGrid/PluginFacade.ice +316 -0
- data/slice/IceGrid/Query.ice +130 -0
- data/slice/IceGrid/Registry.ice +138 -0
- data/slice/IceGrid/Session.ice +124 -0
- data/slice/IceGrid/UserAccountMapper.ice +58 -0
- data/slice/IcePatch2/FileInfo.ice +49 -0
- data/slice/IcePatch2/FileServer.ice +129 -0
- data/slice/IceSSL/ConnectionInfo.ice +34 -0
- data/slice/IceSSL/EndpointInfo.ice +41 -0
- data/slice/IceStorm/IceStorm.ice +405 -0
- data/slice/IceStorm/Metrics.ice +71 -0
- metadata +737 -0
@@ -0,0 +1,97 @@
|
|
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_CONNECT_REQUEST_HANDLER_H
|
11
|
+
#define ICE_CONNECT_REQUEST_HANDLER_H
|
12
|
+
|
13
|
+
#include <IceUtil/Monitor.h>
|
14
|
+
#include <IceUtil/Mutex.h>
|
15
|
+
|
16
|
+
#include <Ice/RequestHandler.h>
|
17
|
+
#include <Ice/Reference.h>
|
18
|
+
#include <Ice/RouterInfo.h>
|
19
|
+
#include <Ice/ProxyF.h>
|
20
|
+
#include <Ice/BasicStream.h>
|
21
|
+
|
22
|
+
#include <IceUtil/UniquePtr.h>
|
23
|
+
|
24
|
+
#include <deque>
|
25
|
+
#include <set>
|
26
|
+
|
27
|
+
namespace IceInternal
|
28
|
+
{
|
29
|
+
|
30
|
+
class ConnectRequestHandler : public RequestHandler,
|
31
|
+
public Reference::GetConnectionCallback,
|
32
|
+
public RouterInfo::AddProxyCallback,
|
33
|
+
public IceUtil::Monitor<IceUtil::Mutex>
|
34
|
+
{
|
35
|
+
public:
|
36
|
+
|
37
|
+
ConnectRequestHandler(const ReferencePtr&, const Ice::ObjectPrx&);
|
38
|
+
virtual ~ConnectRequestHandler();
|
39
|
+
|
40
|
+
virtual RequestHandlerPtr connect(const Ice::ObjectPrx&);
|
41
|
+
virtual RequestHandlerPtr update(const RequestHandlerPtr&, const RequestHandlerPtr&);
|
42
|
+
|
43
|
+
virtual void prepareBatchRequest(BasicStream*);
|
44
|
+
virtual void finishBatchRequest(BasicStream*);
|
45
|
+
virtual void abortBatchRequest();
|
46
|
+
|
47
|
+
virtual bool sendRequest(OutgoingBase*);
|
48
|
+
virtual AsyncStatus sendAsyncRequest(const OutgoingAsyncBasePtr&);
|
49
|
+
|
50
|
+
virtual void requestCanceled(OutgoingBase*, const Ice::LocalException&);
|
51
|
+
virtual void asyncRequestCanceled(const OutgoingAsyncBasePtr&, const Ice::LocalException&);
|
52
|
+
|
53
|
+
virtual Ice::ConnectionIPtr getConnection();
|
54
|
+
virtual Ice::ConnectionIPtr waitForConnection();
|
55
|
+
|
56
|
+
virtual void setConnection(const Ice::ConnectionIPtr&, bool);
|
57
|
+
virtual void setException(const Ice::LocalException&);
|
58
|
+
|
59
|
+
virtual void addedProxy();
|
60
|
+
|
61
|
+
private:
|
62
|
+
|
63
|
+
bool initialized();
|
64
|
+
void flushRequests();
|
65
|
+
|
66
|
+
struct Request
|
67
|
+
{
|
68
|
+
Request() : out(0), os(0)
|
69
|
+
{
|
70
|
+
}
|
71
|
+
|
72
|
+
OutgoingBase* out;
|
73
|
+
OutgoingAsyncBasePtr outAsync;
|
74
|
+
BasicStream* os;
|
75
|
+
};
|
76
|
+
|
77
|
+
bool _connect;
|
78
|
+
Ice::ObjectPrx _proxy;
|
79
|
+
std::set<Ice::ObjectPrx> _proxies;
|
80
|
+
|
81
|
+
Ice::ConnectionIPtr _connection;
|
82
|
+
bool _compress;
|
83
|
+
IceUtil::UniquePtr<Ice::LocalException> _exception;
|
84
|
+
bool _initialized;
|
85
|
+
bool _flushing;
|
86
|
+
|
87
|
+
std::deque<Request> _requests;
|
88
|
+
bool _batchRequestInProgress;
|
89
|
+
BasicStream _batchStream;
|
90
|
+
|
91
|
+
RequestHandlerPtr _connectionRequestHandler;
|
92
|
+
};
|
93
|
+
typedef IceUtil::Handle<ConnectRequestHandler> ConnectRequestHandlerPtr;
|
94
|
+
|
95
|
+
}
|
96
|
+
|
97
|
+
#endif
|
@@ -0,0 +1,58 @@
|
|
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 `Connection.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/Connection.h>
|
25
|
+
#include <IceUtil/PushDisableWarnings.h>
|
26
|
+
#include <Ice/OutgoingAsync.h>
|
27
|
+
#include <Ice/BasicStream.h>
|
28
|
+
#include <IceUtil/Iterator.h>
|
29
|
+
#include <IceUtil/PopDisableWarnings.h>
|
30
|
+
|
31
|
+
#ifndef ICE_IGNORE_VERSION
|
32
|
+
# if ICE_INT_VERSION != 30651
|
33
|
+
# error Ice version mismatch: an exact match is required for beta generated code
|
34
|
+
# endif
|
35
|
+
#endif
|
36
|
+
|
37
|
+
namespace
|
38
|
+
{
|
39
|
+
|
40
|
+
}
|
41
|
+
|
42
|
+
namespace Ice
|
43
|
+
{
|
44
|
+
}
|
45
|
+
|
46
|
+
ICE_DECLSPEC_EXPORT ::Ice::LocalObject* Ice::upCast(::Ice::ConnectionInfo* p) { return p; }
|
47
|
+
|
48
|
+
ICE_DECLSPEC_EXPORT ::Ice::LocalObject* Ice::upCast(::Ice::ConnectionCallback* p) { return p; }
|
49
|
+
|
50
|
+
ICE_DECLSPEC_EXPORT ::Ice::LocalObject* Ice::upCast(::Ice::Connection* p) { return p; }
|
51
|
+
|
52
|
+
ICE_DECLSPEC_EXPORT ::Ice::LocalObject* Ice::upCast(::Ice::IPConnectionInfo* p) { return p; }
|
53
|
+
|
54
|
+
ICE_DECLSPEC_EXPORT ::Ice::LocalObject* Ice::upCast(::Ice::TCPConnectionInfo* p) { return p; }
|
55
|
+
|
56
|
+
ICE_DECLSPEC_EXPORT ::Ice::LocalObject* Ice::upCast(::Ice::UDPConnectionInfo* p) { return p; }
|
57
|
+
|
58
|
+
ICE_DECLSPEC_EXPORT ::Ice::LocalObject* Ice::upCast(::Ice::WSConnectionInfo* 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 `ConnectionF.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/ConnectionF.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,1639 @@
|
|
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/ConnectionFactory.h>
|
11
|
+
#include <Ice/ConnectionI.h>
|
12
|
+
#include <Ice/Instance.h>
|
13
|
+
#include <Ice/LoggerUtil.h>
|
14
|
+
#include <Ice/TraceLevels.h>
|
15
|
+
#include <Ice/DefaultsAndOverrides.h>
|
16
|
+
#include <Ice/Properties.h>
|
17
|
+
#include <Ice/Transceiver.h>
|
18
|
+
#include <Ice/Connector.h>
|
19
|
+
#include <Ice/Acceptor.h>
|
20
|
+
#include <Ice/ThreadPool.h>
|
21
|
+
#include <Ice/ObjectAdapterI.h> // For getThreadPool().
|
22
|
+
#include <Ice/Reference.h>
|
23
|
+
#include <Ice/EndpointI.h>
|
24
|
+
#include <Ice/RouterInfo.h>
|
25
|
+
#include <Ice/LocalException.h>
|
26
|
+
#include <Ice/Functional.h>
|
27
|
+
#include <Ice/OutgoingAsync.h>
|
28
|
+
#include <IceUtil/Random.h>
|
29
|
+
#include <iterator>
|
30
|
+
|
31
|
+
using namespace std;
|
32
|
+
using namespace Ice;
|
33
|
+
using namespace Ice::Instrumentation;
|
34
|
+
using namespace IceInternal;
|
35
|
+
|
36
|
+
IceUtil::Shared* IceInternal::upCast(OutgoingConnectionFactory* p) { return p; }
|
37
|
+
IceUtil::Shared* IceInternal::upCast(IncomingConnectionFactory* p) { return p; }
|
38
|
+
|
39
|
+
namespace
|
40
|
+
{
|
41
|
+
|
42
|
+
struct RandomNumberGenerator : public std::unary_function<ptrdiff_t, ptrdiff_t>
|
43
|
+
{
|
44
|
+
ptrdiff_t operator()(ptrdiff_t d)
|
45
|
+
{
|
46
|
+
return IceUtilInternal::random(static_cast<int>(d));
|
47
|
+
}
|
48
|
+
};
|
49
|
+
|
50
|
+
template <typename K, typename V> void
|
51
|
+
remove(multimap<K, V>& m, K k, V v)
|
52
|
+
{
|
53
|
+
pair<typename multimap<K, V>::iterator, typename multimap<K, V>::iterator> pr = m.equal_range(k);
|
54
|
+
assert(pr.first != pr.second);
|
55
|
+
for(typename multimap<K, V>::iterator q = pr.first; q != pr.second; ++q)
|
56
|
+
{
|
57
|
+
if(q->second.get() == v.get())
|
58
|
+
{
|
59
|
+
m.erase(q);
|
60
|
+
return;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
assert(false); // Nothing was removed which is an error.
|
64
|
+
}
|
65
|
+
|
66
|
+
template <typename K, typename V> ::IceInternal::Handle<V>
|
67
|
+
find(const multimap<K,::IceInternal::Handle<V> >& m,
|
68
|
+
K k,
|
69
|
+
const ::IceUtilInternal::ConstMemFun<bool, V, ::IceInternal::Handle<V> >& predicate)
|
70
|
+
{
|
71
|
+
pair<typename multimap<K, ::IceInternal::Handle<V> >::const_iterator,
|
72
|
+
typename multimap<K, ::IceInternal::Handle<V> >::const_iterator> pr = m.equal_range(k);
|
73
|
+
for(typename multimap<K, ::IceInternal::Handle<V> >::const_iterator q = pr.first; q != pr.second; ++q)
|
74
|
+
{
|
75
|
+
if(predicate(q->second))
|
76
|
+
{
|
77
|
+
return q->second;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
return IceInternal::Handle<V>();
|
81
|
+
}
|
82
|
+
|
83
|
+
}
|
84
|
+
|
85
|
+
bool
|
86
|
+
IceInternal::OutgoingConnectionFactory::ConnectorInfo::operator==(const ConnectorInfo& other) const
|
87
|
+
{
|
88
|
+
return connector == other.connector;
|
89
|
+
}
|
90
|
+
|
91
|
+
void
|
92
|
+
IceInternal::OutgoingConnectionFactory::destroy()
|
93
|
+
{
|
94
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
95
|
+
|
96
|
+
if(_destroyed)
|
97
|
+
{
|
98
|
+
return;
|
99
|
+
}
|
100
|
+
|
101
|
+
for_each(_connections.begin(), _connections.end(),
|
102
|
+
bind2nd(Ice::secondVoidMemFun1<const ConnectorPtr, ConnectionI, ConnectionI::DestructionReason>
|
103
|
+
(&ConnectionI::destroy), ConnectionI::CommunicatorDestroyed));
|
104
|
+
|
105
|
+
_destroyed = true;
|
106
|
+
_communicator = 0;
|
107
|
+
|
108
|
+
notifyAll();
|
109
|
+
}
|
110
|
+
|
111
|
+
void
|
112
|
+
IceInternal::OutgoingConnectionFactory::updateConnectionObservers()
|
113
|
+
{
|
114
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
115
|
+
for_each(_connections.begin(), _connections.end(),
|
116
|
+
Ice::secondVoidMemFun<const ConnectorPtr, ConnectionI>(&ConnectionI::updateObserver));
|
117
|
+
}
|
118
|
+
|
119
|
+
void
|
120
|
+
IceInternal::OutgoingConnectionFactory::waitUntilFinished()
|
121
|
+
{
|
122
|
+
multimap<ConnectorPtr, ConnectionIPtr> connections;
|
123
|
+
|
124
|
+
{
|
125
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
126
|
+
|
127
|
+
//
|
128
|
+
// First we wait until the factory is destroyed. We also wait
|
129
|
+
// until there are no pending connections anymore. Only then
|
130
|
+
// we can be sure the _connections contains all connections.
|
131
|
+
//
|
132
|
+
while(!_destroyed || !_pending.empty() || _pendingConnectCount > 0)
|
133
|
+
{
|
134
|
+
wait();
|
135
|
+
}
|
136
|
+
|
137
|
+
//
|
138
|
+
// We want to wait until all connections are finished outside the
|
139
|
+
// thread synchronization.
|
140
|
+
//
|
141
|
+
connections = _connections;
|
142
|
+
}
|
143
|
+
|
144
|
+
for_each(connections.begin(), connections.end(),
|
145
|
+
Ice::secondVoidMemFun<const ConnectorPtr, ConnectionI>(&ConnectionI::waitUntilFinished));
|
146
|
+
|
147
|
+
{
|
148
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
149
|
+
// Ensure all the connections are finished and reapable at this point.
|
150
|
+
vector<Ice::ConnectionIPtr> cons;
|
151
|
+
_monitor->swapReapedConnections(cons);
|
152
|
+
assert(cons.size() == _connections.size());
|
153
|
+
cons.clear();
|
154
|
+
_connections.clear();
|
155
|
+
_connectionsByEndpoint.clear();
|
156
|
+
_monitor->destroy();
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
void
|
161
|
+
IceInternal::OutgoingConnectionFactory::create(const vector<EndpointIPtr>& endpts, bool hasMore,
|
162
|
+
Ice::EndpointSelectionType selType,
|
163
|
+
const CreateConnectionCallbackPtr& callback)
|
164
|
+
{
|
165
|
+
assert(!endpts.empty());
|
166
|
+
|
167
|
+
//
|
168
|
+
// Apply the overrides.
|
169
|
+
//
|
170
|
+
vector<EndpointIPtr> endpoints = applyOverrides(endpts);
|
171
|
+
|
172
|
+
//
|
173
|
+
// Try to find a connection to one of the given endpoints.
|
174
|
+
//
|
175
|
+
try
|
176
|
+
{
|
177
|
+
bool compress;
|
178
|
+
Ice::ConnectionIPtr connection = findConnection(endpoints, compress);
|
179
|
+
if(connection)
|
180
|
+
{
|
181
|
+
callback->setConnection(connection, compress);
|
182
|
+
return;
|
183
|
+
}
|
184
|
+
}
|
185
|
+
catch(const Ice::LocalException& ex)
|
186
|
+
{
|
187
|
+
callback->setException(ex);
|
188
|
+
return;
|
189
|
+
}
|
190
|
+
|
191
|
+
ConnectCallbackPtr cb = new ConnectCallback(_instance, this, endpoints, hasMore, callback, selType);
|
192
|
+
cb->getConnectors();
|
193
|
+
}
|
194
|
+
|
195
|
+
void
|
196
|
+
IceInternal::OutgoingConnectionFactory::setRouterInfo(const RouterInfoPtr& routerInfo)
|
197
|
+
{
|
198
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
199
|
+
|
200
|
+
if(_destroyed)
|
201
|
+
{
|
202
|
+
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
203
|
+
}
|
204
|
+
|
205
|
+
assert(routerInfo);
|
206
|
+
|
207
|
+
//
|
208
|
+
// Search for connections to the router's client proxy endpoints,
|
209
|
+
// and update the object adapter for such connections, so that
|
210
|
+
// callbacks from the router can be received over such
|
211
|
+
// connections.
|
212
|
+
//
|
213
|
+
ObjectAdapterPtr adapter = routerInfo->getAdapter();
|
214
|
+
vector<EndpointIPtr> endpoints = routerInfo->getClientEndpoints();
|
215
|
+
for(vector<EndpointIPtr>::const_iterator p = endpoints.begin(); p != endpoints.end(); ++p)
|
216
|
+
{
|
217
|
+
EndpointIPtr endpoint = *p;
|
218
|
+
|
219
|
+
//
|
220
|
+
// Modify endpoints with overrides.
|
221
|
+
//
|
222
|
+
if(_instance->defaultsAndOverrides()->overrideTimeout)
|
223
|
+
{
|
224
|
+
endpoint = endpoint->timeout(_instance->defaultsAndOverrides()->overrideTimeoutValue);
|
225
|
+
}
|
226
|
+
|
227
|
+
//
|
228
|
+
// The Connection object does not take the compression flag of
|
229
|
+
// endpoints into account, but instead gets the information
|
230
|
+
// about whether messages should be compressed or not from
|
231
|
+
// other sources. In order to allow connection sharing for
|
232
|
+
// endpoints that differ in the value of the compression flag
|
233
|
+
// only, we always set the compression flag to false here in
|
234
|
+
// this connection factory.
|
235
|
+
//
|
236
|
+
endpoint = endpoint->compress(false);
|
237
|
+
|
238
|
+
for(multimap<ConnectorPtr, ConnectionIPtr>::const_iterator q = _connections.begin();
|
239
|
+
q != _connections.end(); ++q)
|
240
|
+
{
|
241
|
+
if(q->second->endpoint() == endpoint)
|
242
|
+
{
|
243
|
+
q->second->setAdapter(adapter);
|
244
|
+
}
|
245
|
+
}
|
246
|
+
}
|
247
|
+
}
|
248
|
+
|
249
|
+
void
|
250
|
+
IceInternal::OutgoingConnectionFactory::removeAdapter(const ObjectAdapterPtr& adapter)
|
251
|
+
{
|
252
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
253
|
+
|
254
|
+
if(_destroyed)
|
255
|
+
{
|
256
|
+
return;
|
257
|
+
}
|
258
|
+
|
259
|
+
for(multimap<ConnectorPtr, ConnectionIPtr>::const_iterator p = _connections.begin(); p != _connections.end(); ++p)
|
260
|
+
{
|
261
|
+
if(p->second->getAdapter() == adapter)
|
262
|
+
{
|
263
|
+
p->second->setAdapter(0);
|
264
|
+
}
|
265
|
+
}
|
266
|
+
}
|
267
|
+
|
268
|
+
void
|
269
|
+
IceInternal::OutgoingConnectionFactory::flushAsyncBatchRequests(const CommunicatorFlushBatchPtr& outAsync)
|
270
|
+
{
|
271
|
+
list<ConnectionIPtr> c;
|
272
|
+
|
273
|
+
{
|
274
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
275
|
+
for(multimap<ConnectorPtr, ConnectionIPtr>::const_iterator p = _connections.begin(); p != _connections.end();
|
276
|
+
++p)
|
277
|
+
{
|
278
|
+
if(p->second->isActiveOrHolding())
|
279
|
+
{
|
280
|
+
c.push_back(p->second);
|
281
|
+
}
|
282
|
+
}
|
283
|
+
}
|
284
|
+
|
285
|
+
for(list<ConnectionIPtr>::const_iterator p = c.begin(); p != c.end(); ++p)
|
286
|
+
{
|
287
|
+
try
|
288
|
+
{
|
289
|
+
outAsync->flushConnection(*p);
|
290
|
+
}
|
291
|
+
catch(const LocalException&)
|
292
|
+
{
|
293
|
+
// Ignore.
|
294
|
+
}
|
295
|
+
}
|
296
|
+
}
|
297
|
+
|
298
|
+
IceInternal::OutgoingConnectionFactory::OutgoingConnectionFactory(const CommunicatorPtr& communicator,
|
299
|
+
const InstancePtr& instance) :
|
300
|
+
_communicator(communicator),
|
301
|
+
_instance(instance),
|
302
|
+
_monitor(new FactoryACMMonitor(instance, instance->clientACM())),
|
303
|
+
_destroyed(false),
|
304
|
+
_pendingConnectCount(0)
|
305
|
+
{
|
306
|
+
}
|
307
|
+
|
308
|
+
IceInternal::OutgoingConnectionFactory::~OutgoingConnectionFactory()
|
309
|
+
{
|
310
|
+
assert(_destroyed);
|
311
|
+
assert(_connections.empty());
|
312
|
+
assert(_connectionsByEndpoint.empty());
|
313
|
+
assert(_pending.empty());
|
314
|
+
assert(_pendingConnectCount == 0);
|
315
|
+
}
|
316
|
+
|
317
|
+
vector<EndpointIPtr>
|
318
|
+
IceInternal::OutgoingConnectionFactory::applyOverrides(const vector<EndpointIPtr>& endpts)
|
319
|
+
{
|
320
|
+
DefaultsAndOverridesPtr defaultsAndOverrides = _instance->defaultsAndOverrides();
|
321
|
+
vector<EndpointIPtr> endpoints = endpts;
|
322
|
+
for(vector<EndpointIPtr>::iterator p = endpoints.begin(); p != endpoints.end(); ++p)
|
323
|
+
{
|
324
|
+
//
|
325
|
+
// Modify endpoints with overrides.
|
326
|
+
//
|
327
|
+
if(defaultsAndOverrides->overrideTimeout)
|
328
|
+
{
|
329
|
+
*p = (*p)->timeout(defaultsAndOverrides->overrideTimeoutValue);
|
330
|
+
}
|
331
|
+
}
|
332
|
+
return endpoints;
|
333
|
+
}
|
334
|
+
|
335
|
+
ConnectionIPtr
|
336
|
+
IceInternal::OutgoingConnectionFactory::findConnection(const vector<EndpointIPtr>& endpoints, bool& compress)
|
337
|
+
{
|
338
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
339
|
+
if(_destroyed)
|
340
|
+
{
|
341
|
+
throw CommunicatorDestroyedException(__FILE__, __LINE__);
|
342
|
+
}
|
343
|
+
|
344
|
+
DefaultsAndOverridesPtr defaultsAndOverrides = _instance->defaultsAndOverrides();
|
345
|
+
assert(!endpoints.empty());
|
346
|
+
for(vector<EndpointIPtr>::const_iterator p = endpoints.begin(); p != endpoints.end(); ++p)
|
347
|
+
{
|
348
|
+
ConnectionIPtr connection = find(_connectionsByEndpoint, *p, Ice::constMemFun(&ConnectionI::isActiveOrHolding));
|
349
|
+
if(connection)
|
350
|
+
{
|
351
|
+
if(defaultsAndOverrides->overrideCompress)
|
352
|
+
{
|
353
|
+
compress = defaultsAndOverrides->overrideCompressValue;
|
354
|
+
}
|
355
|
+
else
|
356
|
+
{
|
357
|
+
compress = (*p)->compress();
|
358
|
+
}
|
359
|
+
return connection;
|
360
|
+
}
|
361
|
+
}
|
362
|
+
return 0;
|
363
|
+
}
|
364
|
+
|
365
|
+
ConnectionIPtr
|
366
|
+
IceInternal::OutgoingConnectionFactory::findConnection(const vector<ConnectorInfo>& connectors, bool& compress)
|
367
|
+
{
|
368
|
+
// This must be called with the mutex locked.
|
369
|
+
|
370
|
+
DefaultsAndOverridesPtr defaultsAndOverrides = _instance->defaultsAndOverrides();
|
371
|
+
for(vector<ConnectorInfo>::const_iterator p = connectors.begin(); p != connectors.end(); ++p)
|
372
|
+
{
|
373
|
+
if(_pending.find(p->connector) != _pending.end())
|
374
|
+
{
|
375
|
+
continue;
|
376
|
+
}
|
377
|
+
|
378
|
+
ConnectionIPtr connection = find(_connections, p->connector, Ice::constMemFun(&ConnectionI::isActiveOrHolding));
|
379
|
+
if(connection)
|
380
|
+
{
|
381
|
+
if(defaultsAndOverrides->overrideCompress)
|
382
|
+
{
|
383
|
+
compress = defaultsAndOverrides->overrideCompressValue;
|
384
|
+
}
|
385
|
+
else
|
386
|
+
{
|
387
|
+
compress = p->endpoint->compress();
|
388
|
+
}
|
389
|
+
return connection;
|
390
|
+
}
|
391
|
+
}
|
392
|
+
|
393
|
+
return 0;
|
394
|
+
}
|
395
|
+
|
396
|
+
void
|
397
|
+
IceInternal::OutgoingConnectionFactory::incPendingConnectCount()
|
398
|
+
{
|
399
|
+
//
|
400
|
+
// Keep track of the number of pending connects. The outgoing connection factory
|
401
|
+
// waitUntilFinished() method waits for all the pending connects to terminate before
|
402
|
+
// to return. This ensures that the communicator client thread pool isn't destroyed
|
403
|
+
// too soon and will still be available to execute the ice_exception() callbacks for
|
404
|
+
// the asynchronous requests waiting on a connection to be established.
|
405
|
+
//
|
406
|
+
|
407
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
408
|
+
if(_destroyed)
|
409
|
+
{
|
410
|
+
throw Ice::CommunicatorDestroyedException(__FILE__, __LINE__);
|
411
|
+
}
|
412
|
+
++_pendingConnectCount;
|
413
|
+
}
|
414
|
+
|
415
|
+
void
|
416
|
+
IceInternal::OutgoingConnectionFactory::decPendingConnectCount()
|
417
|
+
{
|
418
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
419
|
+
--_pendingConnectCount;
|
420
|
+
assert(_pendingConnectCount >= 0);
|
421
|
+
if(_destroyed && _pendingConnectCount == 0)
|
422
|
+
{
|
423
|
+
notifyAll();
|
424
|
+
}
|
425
|
+
}
|
426
|
+
|
427
|
+
ConnectionIPtr
|
428
|
+
IceInternal::OutgoingConnectionFactory::getConnection(const vector<ConnectorInfo>& connectors,
|
429
|
+
const ConnectCallbackPtr& cb,
|
430
|
+
bool& compress)
|
431
|
+
{
|
432
|
+
{
|
433
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
434
|
+
if(_destroyed)
|
435
|
+
{
|
436
|
+
throw Ice::CommunicatorDestroyedException(__FILE__, __LINE__);
|
437
|
+
}
|
438
|
+
|
439
|
+
//
|
440
|
+
// Reap closed connections
|
441
|
+
//
|
442
|
+
vector<Ice::ConnectionIPtr> cons;
|
443
|
+
_monitor->swapReapedConnections(cons);
|
444
|
+
for(vector<Ice::ConnectionIPtr>::const_iterator p = cons.begin(); p != cons.end(); ++p)
|
445
|
+
{
|
446
|
+
remove(_connections, (*p)->connector(), *p);
|
447
|
+
remove(_connectionsByEndpoint, (*p)->endpoint(), *p);
|
448
|
+
remove(_connectionsByEndpoint, (*p)->endpoint()->compress(true), *p);
|
449
|
+
}
|
450
|
+
|
451
|
+
//
|
452
|
+
// Try to get the connection. We may need to wait for other threads to
|
453
|
+
// finish if one of them is currently establishing a connection to one
|
454
|
+
// of our connectors.
|
455
|
+
//
|
456
|
+
while(true)
|
457
|
+
{
|
458
|
+
if(_destroyed)
|
459
|
+
{
|
460
|
+
throw Ice::CommunicatorDestroyedException(__FILE__, __LINE__);
|
461
|
+
}
|
462
|
+
|
463
|
+
//
|
464
|
+
// Search for a matching connection. If we find one, we're done.
|
465
|
+
//
|
466
|
+
Ice::ConnectionIPtr connection = findConnection(connectors, compress);
|
467
|
+
if(connection)
|
468
|
+
{
|
469
|
+
return connection;
|
470
|
+
}
|
471
|
+
|
472
|
+
//
|
473
|
+
// Determine whether another thread/request is currently attempting to connect to
|
474
|
+
// one of our endpoints; if so we wait until it's done.
|
475
|
+
//
|
476
|
+
if(addToPending(cb, connectors))
|
477
|
+
{
|
478
|
+
//
|
479
|
+
// If a callback is not specified we wait until another thread notifies us about a
|
480
|
+
// change to the pending list. Otherwise, if a callback is provided we're done:
|
481
|
+
// when the pending list changes the callback will be notified and will try to
|
482
|
+
// get the connection again.
|
483
|
+
//
|
484
|
+
if(!cb)
|
485
|
+
{
|
486
|
+
wait();
|
487
|
+
}
|
488
|
+
else
|
489
|
+
{
|
490
|
+
return 0;
|
491
|
+
}
|
492
|
+
}
|
493
|
+
else
|
494
|
+
{
|
495
|
+
//
|
496
|
+
// If no thread is currently establishing a connection to one of our connectors,
|
497
|
+
// we get out of this loop and start the connection establishment to one of the
|
498
|
+
// given connectors.
|
499
|
+
//
|
500
|
+
break;
|
501
|
+
}
|
502
|
+
}
|
503
|
+
}
|
504
|
+
|
505
|
+
//
|
506
|
+
// At this point, we're responsible for establishing the connection to one of
|
507
|
+
// the given connectors. If it's a non-blocking connect, calling nextConnector
|
508
|
+
// will start the connection establishment. Otherwise, we return null to get
|
509
|
+
// the caller to establish the connection.
|
510
|
+
//
|
511
|
+
if(cb)
|
512
|
+
{
|
513
|
+
cb->nextConnector();
|
514
|
+
}
|
515
|
+
|
516
|
+
return 0;
|
517
|
+
}
|
518
|
+
|
519
|
+
ConnectionIPtr
|
520
|
+
IceInternal::OutgoingConnectionFactory::createConnection(const TransceiverPtr& transceiver, const ConnectorInfo& ci)
|
521
|
+
{
|
522
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
523
|
+
assert(_pending.find(ci.connector) != _pending.end() && transceiver);
|
524
|
+
|
525
|
+
//
|
526
|
+
// Create and add the connection to the connection map. Adding the connection to the map
|
527
|
+
// is necessary to support the interruption of the connection initialization and validation
|
528
|
+
// in case the communicator is destroyed.
|
529
|
+
//
|
530
|
+
Ice::ConnectionIPtr connection;
|
531
|
+
try
|
532
|
+
{
|
533
|
+
if(_destroyed)
|
534
|
+
{
|
535
|
+
throw Ice::CommunicatorDestroyedException(__FILE__, __LINE__);
|
536
|
+
}
|
537
|
+
|
538
|
+
connection = new ConnectionI(_communicator, _instance, _monitor, transceiver, ci.connector,
|
539
|
+
ci.endpoint->compress(false), 0);
|
540
|
+
}
|
541
|
+
catch(const Ice::LocalException&)
|
542
|
+
{
|
543
|
+
try
|
544
|
+
{
|
545
|
+
transceiver->close();
|
546
|
+
}
|
547
|
+
catch(const Ice::LocalException&)
|
548
|
+
{
|
549
|
+
// Ignore
|
550
|
+
}
|
551
|
+
throw;
|
552
|
+
}
|
553
|
+
|
554
|
+
_connections.insert(pair<const ConnectorPtr, ConnectionIPtr>(ci.connector, connection));
|
555
|
+
_connectionsByEndpoint.insert(pair<const EndpointIPtr, ConnectionIPtr>(connection->endpoint(), connection));
|
556
|
+
_connectionsByEndpoint.insert(pair<const EndpointIPtr, ConnectionIPtr>(connection->endpoint()->compress(true),
|
557
|
+
connection));
|
558
|
+
return connection;
|
559
|
+
}
|
560
|
+
|
561
|
+
void
|
562
|
+
IceInternal::OutgoingConnectionFactory::finishGetConnection(const vector<ConnectorInfo>& connectors,
|
563
|
+
const ConnectorInfo& ci,
|
564
|
+
const ConnectionIPtr& connection,
|
565
|
+
const ConnectCallbackPtr& cb)
|
566
|
+
{
|
567
|
+
set<ConnectCallbackPtr> connectionCallbacks;
|
568
|
+
if(cb)
|
569
|
+
{
|
570
|
+
connectionCallbacks.insert(cb);
|
571
|
+
}
|
572
|
+
|
573
|
+
set<ConnectCallbackPtr> callbacks;
|
574
|
+
{
|
575
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
576
|
+
for(vector<ConnectorInfo>::const_iterator p = connectors.begin(); p != connectors.end(); ++p)
|
577
|
+
{
|
578
|
+
map<ConnectorPtr, set<ConnectCallbackPtr> >::iterator q = _pending.find(p->connector);
|
579
|
+
if(q != _pending.end())
|
580
|
+
{
|
581
|
+
for(set<ConnectCallbackPtr>::const_iterator r = q->second.begin(); r != q->second.end(); ++r)
|
582
|
+
{
|
583
|
+
if((*r)->hasConnector(ci))
|
584
|
+
{
|
585
|
+
connectionCallbacks.insert(*r);
|
586
|
+
}
|
587
|
+
else
|
588
|
+
{
|
589
|
+
callbacks.insert(*r);
|
590
|
+
}
|
591
|
+
}
|
592
|
+
_pending.erase(q);
|
593
|
+
}
|
594
|
+
}
|
595
|
+
|
596
|
+
for(set<ConnectCallbackPtr>::iterator r = connectionCallbacks.begin(); r != connectionCallbacks.end(); ++r)
|
597
|
+
{
|
598
|
+
(*r)->removeFromPending();
|
599
|
+
callbacks.erase(*r);
|
600
|
+
}
|
601
|
+
for(set<ConnectCallbackPtr>::iterator r = callbacks.begin(); r != callbacks.end(); ++r)
|
602
|
+
{
|
603
|
+
(*r)->removeFromPending();
|
604
|
+
}
|
605
|
+
notifyAll();
|
606
|
+
}
|
607
|
+
|
608
|
+
bool compress;
|
609
|
+
DefaultsAndOverridesPtr defaultsAndOverrides = _instance->defaultsAndOverrides();
|
610
|
+
if(defaultsAndOverrides->overrideCompress)
|
611
|
+
{
|
612
|
+
compress = defaultsAndOverrides->overrideCompressValue;
|
613
|
+
}
|
614
|
+
else
|
615
|
+
{
|
616
|
+
compress = ci.endpoint->compress();
|
617
|
+
}
|
618
|
+
|
619
|
+
for(set<ConnectCallbackPtr>::const_iterator p = callbacks.begin(); p != callbacks.end(); ++p)
|
620
|
+
{
|
621
|
+
(*p)->getConnection();
|
622
|
+
}
|
623
|
+
for(set<ConnectCallbackPtr>::const_iterator p = connectionCallbacks.begin(); p != connectionCallbacks.end(); ++p)
|
624
|
+
{
|
625
|
+
(*p)->setConnection(connection, compress);
|
626
|
+
}
|
627
|
+
}
|
628
|
+
|
629
|
+
void
|
630
|
+
IceInternal::OutgoingConnectionFactory::finishGetConnection(const vector<ConnectorInfo>& connectors,
|
631
|
+
const Ice::LocalException& ex,
|
632
|
+
const ConnectCallbackPtr& cb)
|
633
|
+
{
|
634
|
+
set<ConnectCallbackPtr> failedCallbacks;
|
635
|
+
if(cb)
|
636
|
+
{
|
637
|
+
failedCallbacks.insert(cb);
|
638
|
+
}
|
639
|
+
|
640
|
+
set<ConnectCallbackPtr> callbacks;
|
641
|
+
{
|
642
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
643
|
+
for(vector<ConnectorInfo>::const_iterator p = connectors.begin(); p != connectors.end(); ++p)
|
644
|
+
{
|
645
|
+
map<ConnectorPtr, set<ConnectCallbackPtr> >::iterator q = _pending.find(p->connector);
|
646
|
+
if(q != _pending.end())
|
647
|
+
{
|
648
|
+
for(set<ConnectCallbackPtr>::const_iterator r = q->second.begin(); r != q->second.end(); ++r)
|
649
|
+
{
|
650
|
+
if((*r)->removeConnectors(connectors))
|
651
|
+
{
|
652
|
+
failedCallbacks.insert(*r);
|
653
|
+
}
|
654
|
+
else
|
655
|
+
{
|
656
|
+
callbacks.insert(*r);
|
657
|
+
}
|
658
|
+
}
|
659
|
+
_pending.erase(q);
|
660
|
+
}
|
661
|
+
}
|
662
|
+
|
663
|
+
for(set<ConnectCallbackPtr>::iterator r = callbacks.begin(); r != callbacks.end(); ++r)
|
664
|
+
{
|
665
|
+
assert(failedCallbacks.find(*r) == failedCallbacks.end());
|
666
|
+
(*r)->removeFromPending();
|
667
|
+
}
|
668
|
+
notifyAll();
|
669
|
+
}
|
670
|
+
|
671
|
+
for(set<ConnectCallbackPtr>::const_iterator p = callbacks.begin(); p != callbacks.end(); ++p)
|
672
|
+
{
|
673
|
+
(*p)->getConnection();
|
674
|
+
}
|
675
|
+
for(set<ConnectCallbackPtr>::const_iterator p = failedCallbacks.begin(); p != failedCallbacks.end(); ++p)
|
676
|
+
{
|
677
|
+
(*p)->setException(ex);
|
678
|
+
}
|
679
|
+
}
|
680
|
+
|
681
|
+
bool
|
682
|
+
IceInternal::OutgoingConnectionFactory::addToPending(const ConnectCallbackPtr& cb,
|
683
|
+
const vector<ConnectorInfo>& connectors)
|
684
|
+
{
|
685
|
+
//
|
686
|
+
// Add the callback to each connector pending list.
|
687
|
+
//
|
688
|
+
bool found = false;
|
689
|
+
for(vector<ConnectorInfo>::const_iterator p = connectors.begin(); p != connectors.end(); ++p)
|
690
|
+
{
|
691
|
+
map<ConnectorPtr, set<ConnectCallbackPtr> >::iterator q = _pending.find(p->connector);
|
692
|
+
if(q != _pending.end())
|
693
|
+
{
|
694
|
+
found = true;
|
695
|
+
if(cb)
|
696
|
+
{
|
697
|
+
q->second.insert(cb);
|
698
|
+
}
|
699
|
+
}
|
700
|
+
}
|
701
|
+
|
702
|
+
if(found)
|
703
|
+
{
|
704
|
+
return true;
|
705
|
+
}
|
706
|
+
|
707
|
+
//
|
708
|
+
// If there's no pending connection for the given connectors, we're
|
709
|
+
// responsible for its establishment. We add empty pending lists,
|
710
|
+
// other callbacks to the same connectors will be queued.
|
711
|
+
//
|
712
|
+
for(vector<ConnectorInfo>::const_iterator r = connectors.begin(); r != connectors.end(); ++r)
|
713
|
+
{
|
714
|
+
if(_pending.find(r->connector) == _pending.end())
|
715
|
+
{
|
716
|
+
_pending.insert(pair<ConnectorPtr, set<ConnectCallbackPtr> >(r->connector, set<ConnectCallbackPtr>()));
|
717
|
+
}
|
718
|
+
}
|
719
|
+
return false;
|
720
|
+
}
|
721
|
+
|
722
|
+
void
|
723
|
+
IceInternal::OutgoingConnectionFactory::removeFromPending(const ConnectCallbackPtr& cb,
|
724
|
+
const vector<ConnectorInfo>& connectors)
|
725
|
+
{
|
726
|
+
for(vector<ConnectorInfo>::const_iterator p = connectors.begin(); p != connectors.end(); ++p)
|
727
|
+
{
|
728
|
+
map<ConnectorPtr, set<ConnectCallbackPtr> >::iterator q = _pending.find(p->connector);
|
729
|
+
if(q != _pending.end())
|
730
|
+
{
|
731
|
+
q->second.erase(cb);
|
732
|
+
}
|
733
|
+
}
|
734
|
+
}
|
735
|
+
|
736
|
+
void
|
737
|
+
IceInternal::OutgoingConnectionFactory::handleException(const LocalException& ex, bool hasMore)
|
738
|
+
{
|
739
|
+
TraceLevelsPtr traceLevels = _instance->traceLevels();
|
740
|
+
if(traceLevels->retry >= 2)
|
741
|
+
{
|
742
|
+
Trace out(_instance->initializationData().logger, traceLevels->retryCat);
|
743
|
+
|
744
|
+
out << "couldn't resolve endpoint host";
|
745
|
+
if(dynamic_cast<const CommunicatorDestroyedException*>(&ex))
|
746
|
+
{
|
747
|
+
out << "\n";
|
748
|
+
}
|
749
|
+
else
|
750
|
+
{
|
751
|
+
if(hasMore)
|
752
|
+
{
|
753
|
+
out << ", trying next endpoint\n";
|
754
|
+
}
|
755
|
+
else
|
756
|
+
{
|
757
|
+
out << " and no more endpoints to try\n";
|
758
|
+
}
|
759
|
+
}
|
760
|
+
out << ex;
|
761
|
+
}
|
762
|
+
}
|
763
|
+
|
764
|
+
void
|
765
|
+
IceInternal::OutgoingConnectionFactory::handleConnectionException(const LocalException& ex, bool hasMore)
|
766
|
+
{
|
767
|
+
TraceLevelsPtr traceLevels = _instance->traceLevels();
|
768
|
+
if(traceLevels->retry >= 2)
|
769
|
+
{
|
770
|
+
Trace out(_instance->initializationData().logger, traceLevels->retryCat);
|
771
|
+
|
772
|
+
out << "connection to endpoint failed";
|
773
|
+
if(dynamic_cast<const CommunicatorDestroyedException*>(&ex))
|
774
|
+
{
|
775
|
+
out << "\n";
|
776
|
+
}
|
777
|
+
else
|
778
|
+
{
|
779
|
+
if(hasMore)
|
780
|
+
{
|
781
|
+
out << ", trying next endpoint\n";
|
782
|
+
}
|
783
|
+
else
|
784
|
+
{
|
785
|
+
out << " and no more endpoints to try\n";
|
786
|
+
}
|
787
|
+
}
|
788
|
+
out << ex;
|
789
|
+
}
|
790
|
+
}
|
791
|
+
|
792
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::ConnectCallback(const InstancePtr& instance,
|
793
|
+
const OutgoingConnectionFactoryPtr& factory,
|
794
|
+
const vector<EndpointIPtr>& endpoints,
|
795
|
+
bool hasMore,
|
796
|
+
const CreateConnectionCallbackPtr& cb,
|
797
|
+
Ice::EndpointSelectionType selType) :
|
798
|
+
_instance(instance),
|
799
|
+
_factory(factory),
|
800
|
+
_endpoints(endpoints),
|
801
|
+
_hasMore(hasMore),
|
802
|
+
_callback(cb),
|
803
|
+
_selType(selType)
|
804
|
+
{
|
805
|
+
_endpointsIter = _endpoints.begin();
|
806
|
+
}
|
807
|
+
|
808
|
+
//
|
809
|
+
// Methods from ConnectionI.StartCallback
|
810
|
+
//
|
811
|
+
void
|
812
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::connectionStartCompleted(const ConnectionIPtr& connection)
|
813
|
+
{
|
814
|
+
if(_observer)
|
815
|
+
{
|
816
|
+
_observer->detach();
|
817
|
+
}
|
818
|
+
|
819
|
+
connection->activate();
|
820
|
+
_factory->finishGetConnection(_connectors, *_iter, connection, this);
|
821
|
+
}
|
822
|
+
|
823
|
+
void
|
824
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::connectionStartFailed(const ConnectionIPtr& /*connection*/,
|
825
|
+
const LocalException& ex)
|
826
|
+
{
|
827
|
+
assert(_iter != _connectors.end());
|
828
|
+
|
829
|
+
if(_observer)
|
830
|
+
{
|
831
|
+
_observer->failed(ex.ice_name());
|
832
|
+
_observer->detach();
|
833
|
+
}
|
834
|
+
|
835
|
+
_factory->handleConnectionException(ex, _hasMore || _iter != _connectors.end() - 1);
|
836
|
+
if(dynamic_cast<const Ice::CommunicatorDestroyedException*>(&ex)) // No need to continue.
|
837
|
+
{
|
838
|
+
_factory->finishGetConnection(_connectors, ex, this);
|
839
|
+
}
|
840
|
+
else if(++_iter != _connectors.end()) // Try the next connector.
|
841
|
+
{
|
842
|
+
nextConnector();
|
843
|
+
}
|
844
|
+
else
|
845
|
+
{
|
846
|
+
_factory->finishGetConnection(_connectors, ex, this);
|
847
|
+
}
|
848
|
+
}
|
849
|
+
|
850
|
+
//
|
851
|
+
// Methods from EndpointI_connectors
|
852
|
+
//
|
853
|
+
void
|
854
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::connectors(const vector<ConnectorPtr>& connectors)
|
855
|
+
{
|
856
|
+
for(vector<ConnectorPtr>::const_iterator p = connectors.begin(); p != connectors.end(); ++p)
|
857
|
+
{
|
858
|
+
_connectors.push_back(ConnectorInfo(*p, *_endpointsIter));
|
859
|
+
}
|
860
|
+
|
861
|
+
if(++_endpointsIter != _endpoints.end())
|
862
|
+
{
|
863
|
+
nextEndpoint();
|
864
|
+
}
|
865
|
+
else
|
866
|
+
{
|
867
|
+
assert(!_connectors.empty());
|
868
|
+
|
869
|
+
//
|
870
|
+
// We now have all the connectors for the given endpoints. We can try to obtain the
|
871
|
+
// connection.
|
872
|
+
//
|
873
|
+
_iter = _connectors.begin();
|
874
|
+
getConnection();
|
875
|
+
}
|
876
|
+
}
|
877
|
+
|
878
|
+
void
|
879
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::exception(const Ice::LocalException& ex)
|
880
|
+
{
|
881
|
+
_factory->handleException(ex, _hasMore || _endpointsIter != _endpoints.end() - 1);
|
882
|
+
if(++_endpointsIter != _endpoints.end())
|
883
|
+
{
|
884
|
+
nextEndpoint();
|
885
|
+
}
|
886
|
+
else if(!_connectors.empty())
|
887
|
+
{
|
888
|
+
//
|
889
|
+
// We now have all the connectors for the given endpoints. We can try to obtain the
|
890
|
+
// connection.
|
891
|
+
//
|
892
|
+
_iter = _connectors.begin();
|
893
|
+
getConnection();
|
894
|
+
}
|
895
|
+
else
|
896
|
+
{
|
897
|
+
_callback->setException(ex);
|
898
|
+
_factory->decPendingConnectCount(); // Must be called last.
|
899
|
+
}
|
900
|
+
}
|
901
|
+
|
902
|
+
void
|
903
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::getConnectors()
|
904
|
+
{
|
905
|
+
try
|
906
|
+
{
|
907
|
+
//
|
908
|
+
// Notify the factory that there's an async connect pending. This is necessary
|
909
|
+
// to prevent the outgoing connection factory to be destroyed before all the
|
910
|
+
// pending asynchronous connects are finished.
|
911
|
+
//
|
912
|
+
_factory->incPendingConnectCount();
|
913
|
+
}
|
914
|
+
catch(const Ice::LocalException& ex)
|
915
|
+
{
|
916
|
+
_callback->setException(ex);
|
917
|
+
return;
|
918
|
+
}
|
919
|
+
|
920
|
+
nextEndpoint();
|
921
|
+
}
|
922
|
+
|
923
|
+
void
|
924
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::nextEndpoint()
|
925
|
+
{
|
926
|
+
try
|
927
|
+
{
|
928
|
+
assert(_endpointsIter != _endpoints.end());
|
929
|
+
(*_endpointsIter)->connectors_async(_selType, this);
|
930
|
+
}
|
931
|
+
catch(const Ice::LocalException& ex)
|
932
|
+
{
|
933
|
+
exception(ex);
|
934
|
+
}
|
935
|
+
}
|
936
|
+
|
937
|
+
void
|
938
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::getConnection()
|
939
|
+
{
|
940
|
+
try
|
941
|
+
{
|
942
|
+
//
|
943
|
+
// If all the connectors have been created, we ask the factory to get a
|
944
|
+
// connection.
|
945
|
+
//
|
946
|
+
bool compress;
|
947
|
+
Ice::ConnectionIPtr connection = _factory->getConnection(_connectors, this, compress);
|
948
|
+
if(!connection)
|
949
|
+
{
|
950
|
+
//
|
951
|
+
// A null return value from getConnection indicates that the connection
|
952
|
+
// is being established and that everthing has been done to ensure that
|
953
|
+
// the callback will be notified when the connection establishment is
|
954
|
+
// done or that the callback already obtain the connection.
|
955
|
+
//
|
956
|
+
return;
|
957
|
+
}
|
958
|
+
|
959
|
+
_callback->setConnection(connection, compress);
|
960
|
+
_factory->decPendingConnectCount(); // Must be called last.
|
961
|
+
}
|
962
|
+
catch(const Ice::LocalException& ex)
|
963
|
+
{
|
964
|
+
_callback->setException(ex);
|
965
|
+
_factory->decPendingConnectCount(); // Must be called last.
|
966
|
+
}
|
967
|
+
}
|
968
|
+
|
969
|
+
void
|
970
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::nextConnector()
|
971
|
+
{
|
972
|
+
Ice::ConnectionIPtr connection;
|
973
|
+
try
|
974
|
+
{
|
975
|
+
|
976
|
+
const CommunicatorObserverPtr& obsv = _factory->_instance->initializationData().observer;
|
977
|
+
if(obsv)
|
978
|
+
{
|
979
|
+
_observer = obsv->getConnectionEstablishmentObserver(_iter->endpoint, _iter->connector->toString());
|
980
|
+
if(_observer)
|
981
|
+
{
|
982
|
+
_observer->attach();
|
983
|
+
}
|
984
|
+
}
|
985
|
+
|
986
|
+
assert(_iter != _connectors.end());
|
987
|
+
|
988
|
+
if(_instance->traceLevels()->network >= 2)
|
989
|
+
{
|
990
|
+
Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
|
991
|
+
out << "trying to establish " << _iter->endpoint->protocol() << " connection to "
|
992
|
+
<< _iter->connector->toString();
|
993
|
+
}
|
994
|
+
connection = _factory->createConnection(_iter->connector->connect(), *_iter);
|
995
|
+
connection->start(this);
|
996
|
+
}
|
997
|
+
catch(const Ice::LocalException& ex)
|
998
|
+
{
|
999
|
+
if(_instance->traceLevels()->network >= 2)
|
1000
|
+
{
|
1001
|
+
Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
|
1002
|
+
out << "failed to establish " << _iter->endpoint->protocol() << " connection to "
|
1003
|
+
<< _iter->connector->toString() << "\n" << ex;
|
1004
|
+
}
|
1005
|
+
connectionStartFailed(connection, ex);
|
1006
|
+
}
|
1007
|
+
}
|
1008
|
+
|
1009
|
+
void
|
1010
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::setConnection(const Ice::ConnectionIPtr& connection,
|
1011
|
+
bool compress)
|
1012
|
+
{
|
1013
|
+
//
|
1014
|
+
// Callback from the factory: the connection to one of the callback
|
1015
|
+
// connectors has been established.
|
1016
|
+
//
|
1017
|
+
_callback->setConnection(connection, compress);
|
1018
|
+
_factory->decPendingConnectCount(); // Must be called last.
|
1019
|
+
}
|
1020
|
+
|
1021
|
+
void
|
1022
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::setException(const Ice::LocalException& ex)
|
1023
|
+
{
|
1024
|
+
//
|
1025
|
+
// Callback from the factory: connection establishment failed.
|
1026
|
+
//
|
1027
|
+
_callback->setException(ex);
|
1028
|
+
_factory->decPendingConnectCount(); // Must be called last.
|
1029
|
+
}
|
1030
|
+
|
1031
|
+
bool
|
1032
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::hasConnector(const ConnectorInfo& ci)
|
1033
|
+
{
|
1034
|
+
return find(_connectors.begin(), _connectors.end(), ci) != _connectors.end();
|
1035
|
+
}
|
1036
|
+
|
1037
|
+
bool
|
1038
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::removeConnectors(const vector<ConnectorInfo>& connectors)
|
1039
|
+
{
|
1040
|
+
//
|
1041
|
+
// Callback from the factory: connecting to the given connectors
|
1042
|
+
// failed, we remove the connectors and return true if there's
|
1043
|
+
// no more connectors left to try.
|
1044
|
+
//
|
1045
|
+
for(vector<ConnectorInfo>::const_iterator p = connectors.begin(); p != connectors.end(); ++p)
|
1046
|
+
{
|
1047
|
+
_connectors.erase(remove(_connectors.begin(), _connectors.end(), *p), _connectors.end());
|
1048
|
+
}
|
1049
|
+
return _connectors.empty();
|
1050
|
+
}
|
1051
|
+
|
1052
|
+
void
|
1053
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::removeFromPending()
|
1054
|
+
{
|
1055
|
+
_factory->removeFromPending(this, _connectors);
|
1056
|
+
}
|
1057
|
+
|
1058
|
+
bool
|
1059
|
+
IceInternal::OutgoingConnectionFactory::ConnectCallback::operator<(const ConnectCallback& rhs) const
|
1060
|
+
{
|
1061
|
+
return this < &rhs;
|
1062
|
+
}
|
1063
|
+
|
1064
|
+
void
|
1065
|
+
IceInternal::IncomingConnectionFactory::activate()
|
1066
|
+
{
|
1067
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
1068
|
+
setState(StateActive);
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
void
|
1072
|
+
IceInternal::IncomingConnectionFactory::hold()
|
1073
|
+
{
|
1074
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
1075
|
+
setState(StateHolding);
|
1076
|
+
}
|
1077
|
+
|
1078
|
+
void
|
1079
|
+
IceInternal::IncomingConnectionFactory::destroy()
|
1080
|
+
{
|
1081
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
1082
|
+
setState(StateClosed);
|
1083
|
+
}
|
1084
|
+
|
1085
|
+
void
|
1086
|
+
IceInternal::IncomingConnectionFactory::updateConnectionObservers()
|
1087
|
+
{
|
1088
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
1089
|
+
for_each(_connections.begin(), _connections.end(), Ice::voidMemFun(&ConnectionI::updateObserver));
|
1090
|
+
}
|
1091
|
+
|
1092
|
+
void
|
1093
|
+
IceInternal::IncomingConnectionFactory::waitUntilHolding() const
|
1094
|
+
{
|
1095
|
+
set<ConnectionIPtr> connections;
|
1096
|
+
|
1097
|
+
{
|
1098
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
1099
|
+
|
1100
|
+
//
|
1101
|
+
// First we wait until the connection factory itself is in holding
|
1102
|
+
// state.
|
1103
|
+
//
|
1104
|
+
while(_state < StateHolding)
|
1105
|
+
{
|
1106
|
+
wait();
|
1107
|
+
}
|
1108
|
+
|
1109
|
+
//
|
1110
|
+
// We want to wait until all connections are in holding state
|
1111
|
+
// outside the thread synchronization.
|
1112
|
+
//
|
1113
|
+
connections = _connections;
|
1114
|
+
}
|
1115
|
+
|
1116
|
+
//
|
1117
|
+
// Now we wait until each connection is in holding state.
|
1118
|
+
//
|
1119
|
+
for_each(connections.begin(), connections.end(), Ice::constVoidMemFun(&ConnectionI::waitUntilHolding));
|
1120
|
+
}
|
1121
|
+
|
1122
|
+
void
|
1123
|
+
IceInternal::IncomingConnectionFactory::waitUntilFinished()
|
1124
|
+
{
|
1125
|
+
set<ConnectionIPtr> connections;
|
1126
|
+
{
|
1127
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
1128
|
+
|
1129
|
+
//
|
1130
|
+
// First we wait until the factory is destroyed. If we are using
|
1131
|
+
// an acceptor, we also wait for it to be closed.
|
1132
|
+
//
|
1133
|
+
while(_state != StateFinished)
|
1134
|
+
{
|
1135
|
+
wait();
|
1136
|
+
}
|
1137
|
+
|
1138
|
+
//
|
1139
|
+
// Clear the OA. See bug 1673 for the details of why this is necessary.
|
1140
|
+
//
|
1141
|
+
_adapter = 0;
|
1142
|
+
|
1143
|
+
// We want to wait until all connections are finished outside the
|
1144
|
+
// thread synchronization.
|
1145
|
+
//
|
1146
|
+
connections = _connections;
|
1147
|
+
}
|
1148
|
+
|
1149
|
+
for_each(connections.begin(), connections.end(), Ice::voidMemFun(&ConnectionI::waitUntilFinished));
|
1150
|
+
|
1151
|
+
{
|
1152
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
1153
|
+
if(_transceiver)
|
1154
|
+
{
|
1155
|
+
assert(_connections.size() <= 1); // The connection isn't monitored or reaped.
|
1156
|
+
}
|
1157
|
+
else
|
1158
|
+
{
|
1159
|
+
// Ensure all the connections are finished and reapable at this point.
|
1160
|
+
vector<Ice::ConnectionIPtr> cons;
|
1161
|
+
_monitor->swapReapedConnections(cons);
|
1162
|
+
assert(cons.size() == _connections.size());
|
1163
|
+
cons.clear();
|
1164
|
+
}
|
1165
|
+
_connections.clear();
|
1166
|
+
_monitor->destroy();
|
1167
|
+
}
|
1168
|
+
}
|
1169
|
+
|
1170
|
+
EndpointIPtr
|
1171
|
+
IceInternal::IncomingConnectionFactory::endpoint() const
|
1172
|
+
{
|
1173
|
+
// No mutex protection necessary, _endpoint is immutable.
|
1174
|
+
return _endpoint;
|
1175
|
+
}
|
1176
|
+
|
1177
|
+
list<ConnectionIPtr>
|
1178
|
+
IceInternal::IncomingConnectionFactory::connections() const
|
1179
|
+
{
|
1180
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
1181
|
+
|
1182
|
+
list<ConnectionIPtr> result;
|
1183
|
+
|
1184
|
+
//
|
1185
|
+
// Only copy connections which have not been destroyed.
|
1186
|
+
//
|
1187
|
+
remove_copy_if(_connections.begin(), _connections.end(), back_inserter(result),
|
1188
|
+
not1(Ice::constMemFun(&ConnectionI::isActiveOrHolding)));
|
1189
|
+
|
1190
|
+
return result;
|
1191
|
+
}
|
1192
|
+
|
1193
|
+
void
|
1194
|
+
IceInternal::IncomingConnectionFactory::flushAsyncBatchRequests(const CommunicatorFlushBatchPtr& outAsync)
|
1195
|
+
{
|
1196
|
+
list<ConnectionIPtr> c = connections(); // connections() is synchronized, so no need to synchronize here.
|
1197
|
+
|
1198
|
+
for(list<ConnectionIPtr>::const_iterator p = c.begin(); p != c.end(); ++p)
|
1199
|
+
{
|
1200
|
+
try
|
1201
|
+
{
|
1202
|
+
outAsync->flushConnection(*p);
|
1203
|
+
}
|
1204
|
+
catch(const LocalException&)
|
1205
|
+
{
|
1206
|
+
// Ignore.
|
1207
|
+
}
|
1208
|
+
}
|
1209
|
+
}
|
1210
|
+
|
1211
|
+
#if defined(ICE_USE_IOCP) || defined(ICE_OS_WINRT)
|
1212
|
+
bool
|
1213
|
+
IceInternal::IncomingConnectionFactory::startAsync(SocketOperation)
|
1214
|
+
{
|
1215
|
+
if(_state >= StateClosed)
|
1216
|
+
{
|
1217
|
+
return false;
|
1218
|
+
}
|
1219
|
+
|
1220
|
+
try
|
1221
|
+
{
|
1222
|
+
_acceptor->startAccept();
|
1223
|
+
}
|
1224
|
+
catch(const Ice::LocalException& ex)
|
1225
|
+
{
|
1226
|
+
{
|
1227
|
+
Error out(_instance->initializationData().logger);
|
1228
|
+
out << "can't accept connections:\n" << ex << '\n' << _acceptor->toString();
|
1229
|
+
}
|
1230
|
+
abort();
|
1231
|
+
}
|
1232
|
+
return true;
|
1233
|
+
}
|
1234
|
+
|
1235
|
+
bool
|
1236
|
+
IceInternal::IncomingConnectionFactory::finishAsync(SocketOperation)
|
1237
|
+
{
|
1238
|
+
assert(_acceptor);
|
1239
|
+
try
|
1240
|
+
{
|
1241
|
+
_acceptor->finishAccept();
|
1242
|
+
}
|
1243
|
+
catch(const LocalException& ex)
|
1244
|
+
{
|
1245
|
+
Error out(_instance->initializationData().logger);
|
1246
|
+
out << "couldn't accept connection:\n" << ex << '\n' << _acceptor->toString();
|
1247
|
+
return false;
|
1248
|
+
}
|
1249
|
+
return _state < StateClosed;
|
1250
|
+
}
|
1251
|
+
#endif
|
1252
|
+
|
1253
|
+
void
|
1254
|
+
IceInternal::IncomingConnectionFactory::message(ThreadPoolCurrent& current)
|
1255
|
+
{
|
1256
|
+
ConnectionIPtr connection;
|
1257
|
+
|
1258
|
+
ThreadPoolMessage<IncomingConnectionFactory> msg(current, *this);
|
1259
|
+
|
1260
|
+
{
|
1261
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
1262
|
+
|
1263
|
+
ThreadPoolMessage<IncomingConnectionFactory>::IOScope io(msg);
|
1264
|
+
if(!io)
|
1265
|
+
{
|
1266
|
+
return;
|
1267
|
+
}
|
1268
|
+
|
1269
|
+
if(_state >= StateClosed)
|
1270
|
+
{
|
1271
|
+
return;
|
1272
|
+
}
|
1273
|
+
else if(_state == StateHolding)
|
1274
|
+
{
|
1275
|
+
IceUtil::ThreadControl::yield();
|
1276
|
+
return;
|
1277
|
+
}
|
1278
|
+
|
1279
|
+
//
|
1280
|
+
// Reap closed connections
|
1281
|
+
//
|
1282
|
+
vector<Ice::ConnectionIPtr> cons;
|
1283
|
+
_monitor->swapReapedConnections(cons);
|
1284
|
+
for(vector<Ice::ConnectionIPtr>::const_iterator p = cons.begin(); p != cons.end(); ++p)
|
1285
|
+
{
|
1286
|
+
_connections.erase(*p);
|
1287
|
+
}
|
1288
|
+
|
1289
|
+
//
|
1290
|
+
// Now accept a new connection.
|
1291
|
+
//
|
1292
|
+
TransceiverPtr transceiver;
|
1293
|
+
try
|
1294
|
+
{
|
1295
|
+
transceiver = _acceptor->accept();
|
1296
|
+
|
1297
|
+
if(_instance->traceLevels()->network >= 2)
|
1298
|
+
{
|
1299
|
+
Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
|
1300
|
+
out << "trying to accept " << _endpoint->protocol() << " connection\n" << transceiver->toString();
|
1301
|
+
}
|
1302
|
+
}
|
1303
|
+
catch(const SocketException& ex)
|
1304
|
+
{
|
1305
|
+
if(noMoreFds(ex.error))
|
1306
|
+
{
|
1307
|
+
{
|
1308
|
+
Error out(_instance->initializationData().logger);
|
1309
|
+
out << "fatal error: can't accept more connections:\n" << ex << '\n' << _acceptor->toString();
|
1310
|
+
}
|
1311
|
+
abort();
|
1312
|
+
}
|
1313
|
+
|
1314
|
+
// Ignore socket exceptions.
|
1315
|
+
return;
|
1316
|
+
}
|
1317
|
+
catch(const LocalException& ex)
|
1318
|
+
{
|
1319
|
+
// Warn about other Ice local exceptions.
|
1320
|
+
if(_warn)
|
1321
|
+
{
|
1322
|
+
Warning out(_instance->initializationData().logger);
|
1323
|
+
out << "connection exception:\n" << ex << '\n' << _acceptor->toString();
|
1324
|
+
}
|
1325
|
+
return;
|
1326
|
+
}
|
1327
|
+
|
1328
|
+
assert(transceiver);
|
1329
|
+
|
1330
|
+
try
|
1331
|
+
{
|
1332
|
+
connection = new ConnectionI(_adapter->getCommunicator(), _instance, _monitor, transceiver, 0, _endpoint,
|
1333
|
+
_adapter);
|
1334
|
+
}
|
1335
|
+
catch(const LocalException& ex)
|
1336
|
+
{
|
1337
|
+
try
|
1338
|
+
{
|
1339
|
+
transceiver->close();
|
1340
|
+
}
|
1341
|
+
catch(const Ice::LocalException&)
|
1342
|
+
{
|
1343
|
+
// Ignore.
|
1344
|
+
}
|
1345
|
+
|
1346
|
+
if(_warn)
|
1347
|
+
{
|
1348
|
+
Warning out(_instance->initializationData().logger);
|
1349
|
+
out << "connection exception:\n" << ex << '\n' << _acceptor->toString();
|
1350
|
+
}
|
1351
|
+
return;
|
1352
|
+
}
|
1353
|
+
|
1354
|
+
_connections.insert(connection);
|
1355
|
+
}
|
1356
|
+
|
1357
|
+
assert(connection);
|
1358
|
+
connection->start(this);
|
1359
|
+
}
|
1360
|
+
|
1361
|
+
void
|
1362
|
+
IceInternal::IncomingConnectionFactory::finished(ThreadPoolCurrent&, bool close)
|
1363
|
+
{
|
1364
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
1365
|
+
assert(_state == StateClosed);
|
1366
|
+
setState(StateFinished);
|
1367
|
+
|
1368
|
+
assert(_acceptor);
|
1369
|
+
|
1370
|
+
if(close)
|
1371
|
+
{
|
1372
|
+
closeAcceptor(true);
|
1373
|
+
}
|
1374
|
+
}
|
1375
|
+
|
1376
|
+
string
|
1377
|
+
IceInternal::IncomingConnectionFactory::toString() const
|
1378
|
+
{
|
1379
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
1380
|
+
|
1381
|
+
if(_transceiver)
|
1382
|
+
{
|
1383
|
+
return _transceiver->toString();
|
1384
|
+
}
|
1385
|
+
|
1386
|
+
assert(_acceptor);
|
1387
|
+
return _acceptor->toString();
|
1388
|
+
}
|
1389
|
+
|
1390
|
+
NativeInfoPtr
|
1391
|
+
IceInternal::IncomingConnectionFactory::getNativeInfo()
|
1392
|
+
{
|
1393
|
+
if(_transceiver)
|
1394
|
+
{
|
1395
|
+
return _transceiver->getNativeInfo();
|
1396
|
+
}
|
1397
|
+
|
1398
|
+
assert(_acceptor);
|
1399
|
+
return _acceptor->getNativeInfo();
|
1400
|
+
}
|
1401
|
+
|
1402
|
+
void
|
1403
|
+
IceInternal::IncomingConnectionFactory::connectionStartCompleted(const Ice::ConnectionIPtr& connection)
|
1404
|
+
{
|
1405
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
1406
|
+
|
1407
|
+
//
|
1408
|
+
// Initialy, connections are in the holding state. If the factory is active
|
1409
|
+
// we activate the connection.
|
1410
|
+
//
|
1411
|
+
if(_state == StateActive)
|
1412
|
+
{
|
1413
|
+
connection->activate();
|
1414
|
+
}
|
1415
|
+
}
|
1416
|
+
|
1417
|
+
void
|
1418
|
+
IceInternal::IncomingConnectionFactory::connectionStartFailed(const Ice::ConnectionIPtr& /*connection*/,
|
1419
|
+
const Ice::LocalException& ex)
|
1420
|
+
{
|
1421
|
+
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
|
1422
|
+
if(_state >= StateClosed)
|
1423
|
+
{
|
1424
|
+
return;
|
1425
|
+
}
|
1426
|
+
|
1427
|
+
//
|
1428
|
+
// Do not warn about connection exceptions here. The connection is not yet validated.
|
1429
|
+
//
|
1430
|
+
}
|
1431
|
+
|
1432
|
+
//
|
1433
|
+
// COMPILERFIX: The ConnectionFactory setup is broken out into a separate initialize
|
1434
|
+
// function because when it was part of the constructor C++Builder 2007 apps would
|
1435
|
+
// crash if an execption was thrown from any calls within the constructor.
|
1436
|
+
//
|
1437
|
+
IceInternal::IncomingConnectionFactory::IncomingConnectionFactory(const InstancePtr& instance,
|
1438
|
+
const EndpointIPtr& endpoint,
|
1439
|
+
const ObjectAdapterIPtr& adapter) :
|
1440
|
+
_instance(instance),
|
1441
|
+
_monitor(new FactoryACMMonitor(instance, dynamic_cast<ObjectAdapterI*>(adapter.get())->getACM())),
|
1442
|
+
_endpoint(endpoint),
|
1443
|
+
_adapter(adapter),
|
1444
|
+
_warn(_instance->initializationData().properties->getPropertyAsInt("Ice.Warn.Connections") > 0),
|
1445
|
+
_state(StateHolding)
|
1446
|
+
{
|
1447
|
+
}
|
1448
|
+
|
1449
|
+
void
|
1450
|
+
IceInternal::IncomingConnectionFactory::initialize(const string& oaName)
|
1451
|
+
{
|
1452
|
+
if(_instance->defaultsAndOverrides()->overrideTimeout)
|
1453
|
+
{
|
1454
|
+
const_cast<EndpointIPtr&>(_endpoint) =
|
1455
|
+
_endpoint->timeout(_instance->defaultsAndOverrides()->overrideTimeoutValue);
|
1456
|
+
}
|
1457
|
+
|
1458
|
+
if(_instance->defaultsAndOverrides()->overrideCompress)
|
1459
|
+
{
|
1460
|
+
const_cast<EndpointIPtr&>(_endpoint) =
|
1461
|
+
_endpoint->compress(_instance->defaultsAndOverrides()->overrideCompressValue);
|
1462
|
+
}
|
1463
|
+
|
1464
|
+
try
|
1465
|
+
{
|
1466
|
+
const_cast<TransceiverPtr&>(_transceiver) = _endpoint->transceiver();
|
1467
|
+
if(_transceiver)
|
1468
|
+
{
|
1469
|
+
if(_instance->traceLevels()->network >= 2)
|
1470
|
+
{
|
1471
|
+
Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
|
1472
|
+
out << "attempting to bind to " << _endpoint->protocol() << " socket\n" << _transceiver->toString();
|
1473
|
+
}
|
1474
|
+
const_cast<EndpointIPtr&>(_endpoint) = _transceiver->bind();
|
1475
|
+
|
1476
|
+
ConnectionIPtr connection = new ConnectionI(_adapter->getCommunicator(), _instance, 0, _transceiver, 0,
|
1477
|
+
_endpoint, _adapter);
|
1478
|
+
connection->start(0);
|
1479
|
+
_connections.insert(connection);
|
1480
|
+
}
|
1481
|
+
else
|
1482
|
+
{
|
1483
|
+
const_cast<AcceptorPtr&>(_acceptor) = _endpoint->acceptor(oaName);
|
1484
|
+
assert(_acceptor);
|
1485
|
+
|
1486
|
+
if(_instance->traceLevels()->network >= 2)
|
1487
|
+
{
|
1488
|
+
Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
|
1489
|
+
out << "attempting to bind to " << _endpoint->protocol() << " socket " << _acceptor->toString();
|
1490
|
+
}
|
1491
|
+
|
1492
|
+
const_cast<EndpointIPtr&>(_endpoint) = _acceptor->listen();
|
1493
|
+
|
1494
|
+
if(_instance->traceLevels()->network >= 1)
|
1495
|
+
{
|
1496
|
+
Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
|
1497
|
+
out << "listening for " << _endpoint->protocol() << " connections\n" << _acceptor->toDetailedString();
|
1498
|
+
}
|
1499
|
+
|
1500
|
+
_adapter->getThreadPool()->initialize(this);
|
1501
|
+
}
|
1502
|
+
}
|
1503
|
+
catch(const Ice::Exception&)
|
1504
|
+
{
|
1505
|
+
if(_transceiver)
|
1506
|
+
{
|
1507
|
+
try
|
1508
|
+
{
|
1509
|
+
_transceiver->close();
|
1510
|
+
}
|
1511
|
+
catch(const Ice::LocalException&)
|
1512
|
+
{
|
1513
|
+
// Ignore
|
1514
|
+
}
|
1515
|
+
}
|
1516
|
+
|
1517
|
+
|
1518
|
+
if(_acceptor)
|
1519
|
+
{
|
1520
|
+
try
|
1521
|
+
{
|
1522
|
+
closeAcceptor(false);
|
1523
|
+
}
|
1524
|
+
catch(const Ice::LocalException&)
|
1525
|
+
{
|
1526
|
+
// Ignore
|
1527
|
+
}
|
1528
|
+
}
|
1529
|
+
|
1530
|
+
_state = StateFinished;
|
1531
|
+
_monitor->destroy();
|
1532
|
+
_connections.clear();
|
1533
|
+
throw;
|
1534
|
+
}
|
1535
|
+
}
|
1536
|
+
|
1537
|
+
IceInternal::IncomingConnectionFactory::~IncomingConnectionFactory()
|
1538
|
+
{
|
1539
|
+
assert(_state == StateFinished);
|
1540
|
+
assert(_connections.empty());
|
1541
|
+
}
|
1542
|
+
|
1543
|
+
void
|
1544
|
+
IceInternal::IncomingConnectionFactory::setState(State state)
|
1545
|
+
{
|
1546
|
+
if(_state == state) // Don't switch twice.
|
1547
|
+
{
|
1548
|
+
return;
|
1549
|
+
}
|
1550
|
+
|
1551
|
+
switch(state)
|
1552
|
+
{
|
1553
|
+
case StateActive:
|
1554
|
+
{
|
1555
|
+
if(_state != StateHolding) // Can only switch from holding to active.
|
1556
|
+
{
|
1557
|
+
return;
|
1558
|
+
}
|
1559
|
+
if(_acceptor)
|
1560
|
+
{
|
1561
|
+
if(_instance->traceLevels()->network >= 1)
|
1562
|
+
{
|
1563
|
+
Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
|
1564
|
+
out << "accepting " << _endpoint->protocol() << " connections at " << _acceptor->toString();
|
1565
|
+
}
|
1566
|
+
_adapter->getThreadPool()->_register(this, SocketOperationRead);
|
1567
|
+
}
|
1568
|
+
for_each(_connections.begin(), _connections.end(), Ice::voidMemFun(&ConnectionI::activate));
|
1569
|
+
break;
|
1570
|
+
}
|
1571
|
+
|
1572
|
+
case StateHolding:
|
1573
|
+
{
|
1574
|
+
if(_state != StateActive) // Can only switch from active to holding.
|
1575
|
+
{
|
1576
|
+
return;
|
1577
|
+
}
|
1578
|
+
if(_acceptor)
|
1579
|
+
{
|
1580
|
+
if(_instance->traceLevels()->network >= 1)
|
1581
|
+
{
|
1582
|
+
Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
|
1583
|
+
out << "holding " << _endpoint->protocol() << " connections at " << _acceptor->toString();
|
1584
|
+
}
|
1585
|
+
_adapter->getThreadPool()->unregister(this, SocketOperationRead);
|
1586
|
+
}
|
1587
|
+
for_each(_connections.begin(), _connections.end(), Ice::voidMemFun(&ConnectionI::hold));
|
1588
|
+
break;
|
1589
|
+
}
|
1590
|
+
|
1591
|
+
case StateClosed:
|
1592
|
+
{
|
1593
|
+
if(_acceptor)
|
1594
|
+
{
|
1595
|
+
//
|
1596
|
+
// If possible, close the acceptor now to prevent new connections from
|
1597
|
+
// being accepted while we are deactivating. This is especially useful
|
1598
|
+
// if there are no more threads in the thread pool available to dispatch
|
1599
|
+
// the finish() call. Not all selector implementations do support this
|
1600
|
+
// however.
|
1601
|
+
//
|
1602
|
+
if(_adapter->getThreadPool()->finish(this, true))
|
1603
|
+
{
|
1604
|
+
closeAcceptor(true);
|
1605
|
+
}
|
1606
|
+
}
|
1607
|
+
else
|
1608
|
+
{
|
1609
|
+
state = StateFinished;
|
1610
|
+
}
|
1611
|
+
|
1612
|
+
for_each(_connections.begin(), _connections.end(),
|
1613
|
+
bind2nd(Ice::voidMemFun1(&ConnectionI::destroy), ConnectionI::ObjectAdapterDeactivated));
|
1614
|
+
break;
|
1615
|
+
}
|
1616
|
+
|
1617
|
+
case StateFinished:
|
1618
|
+
{
|
1619
|
+
assert(_state == StateClosed);
|
1620
|
+
break;
|
1621
|
+
}
|
1622
|
+
}
|
1623
|
+
|
1624
|
+
_state = state;
|
1625
|
+
notifyAll();
|
1626
|
+
}
|
1627
|
+
|
1628
|
+
void
|
1629
|
+
IceInternal::IncomingConnectionFactory::closeAcceptor(bool trace)
|
1630
|
+
{
|
1631
|
+
if(trace && _instance->traceLevels()->network >= 1)
|
1632
|
+
{
|
1633
|
+
Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
|
1634
|
+
out << "stopping to accept " << _endpoint->protocol() << " connections at " << _acceptor->toString();
|
1635
|
+
}
|
1636
|
+
|
1637
|
+
_acceptor->close();
|
1638
|
+
}
|
1639
|
+
|