diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-04-12 17:32:00 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-04-12 17:32:00 +0000 |
commit | b764fe6ce04b1367522a20a518933cca3ae54c66 (patch) | |
tree | 9334709074a791244c90a5ea78240ba930a93524 /cpp/src/Ice/ObjectAdapterFactory.cpp | |
parent | Fix (diff) | |
download | ice-b764fe6ce04b1367522a20a518933cca3ae54c66.tar.bz2 ice-b764fe6ce04b1367522a20a518933cca3ae54c66.tar.xz ice-b764fe6ce04b1367522a20a518933cca3ae54c66.zip |
Added createObjectAdapterWithRouter
Diffstat (limited to 'cpp/src/Ice/ObjectAdapterFactory.cpp')
-rw-r--r-- | cpp/src/Ice/ObjectAdapterFactory.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/cpp/src/Ice/ObjectAdapterFactory.cpp b/cpp/src/Ice/ObjectAdapterFactory.cpp index 162e2e565c3..bd1c9152be6 100644 --- a/cpp/src/Ice/ObjectAdapterFactory.cpp +++ b/cpp/src/Ice/ObjectAdapterFactory.cpp @@ -100,7 +100,8 @@ IceInternal::ObjectAdapterFactory::waitForShutdown() } ObjectAdapterPtr -IceInternal::ObjectAdapterFactory::createObjectAdapter(const string& name, const string& endpoints) +IceInternal::ObjectAdapterFactory::createObjectAdapter(const string& name, const string& endpoints, + const RouterPrx& router) { IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this); @@ -115,7 +116,7 @@ IceInternal::ObjectAdapterFactory::createObjectAdapter(const string& name, const throw AlreadyRegisteredException(__FILE__, __LINE__, "object adapter", name); } - ObjectAdapterIPtr adapter = new ObjectAdapterI(_instance, _communicator, name, endpoints); + ObjectAdapterIPtr adapter = new ObjectAdapterI(_instance, _communicator, this, name, endpoints, router); _adapters.insert(make_pair(name, adapter)); return adapter; } @@ -148,6 +149,19 @@ IceInternal::ObjectAdapterFactory::findObjectAdapter(const ObjectPrx& proxy) return 0; } +void +IceInternal::ObjectAdapterFactory::removeObjectAdapter(const string& name) +{ + IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this); + + if(_waitForShutdown) + { + return; + } + + _adapters.erase(name); +} + namespace IceInternal { struct FlushAdapter |