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 /cppe/src/IceE/ObjectAdapterFactory.cpp | |
parent | Fix (diff) | |
download | ice-b764fe6ce04b1367522a20a518933cca3ae54c66.tar.bz2 ice-b764fe6ce04b1367522a20a518933cca3ae54c66.tar.xz ice-b764fe6ce04b1367522a20a518933cca3ae54c66.zip |
Added createObjectAdapterWithRouter
Diffstat (limited to 'cppe/src/IceE/ObjectAdapterFactory.cpp')
-rw-r--r-- | cppe/src/IceE/ObjectAdapterFactory.cpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/cppe/src/IceE/ObjectAdapterFactory.cpp b/cppe/src/IceE/ObjectAdapterFactory.cpp index 2dfe68d3684..6cc8fe9209f 100644 --- a/cppe/src/IceE/ObjectAdapterFactory.cpp +++ b/cppe/src/IceE/ObjectAdapterFactory.cpp @@ -109,7 +109,11 @@ IceInternal::ObjectAdapterFactory::waitForShutdown() } ObjectAdapterPtr -IceInternal::ObjectAdapterFactory::createObjectAdapter(const string& name, const string& endpoints) +IceInternal::ObjectAdapterFactory::createObjectAdapter(const string& name, const string& endpoints +#ifdef ICEE_HAS_ROUTER + , const RouterPrx& router +#endif + ) { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); @@ -124,11 +128,28 @@ IceInternal::ObjectAdapterFactory::createObjectAdapter(const string& name, const throw AlreadyRegisteredException(__FILE__, __LINE__, "object adapter", name); } - ObjectAdapterPtr adapter = new ObjectAdapter(_instance, _communicator, name, endpoints); + ObjectAdapterPtr adapter = new ObjectAdapter(_instance, _communicator, this, name, endpoints +#ifdef ICEE_HAS_ROUTER + , router +#endif + ); _adapters.insert(make_pair(name, adapter)); return adapter; } +void +IceInternal::ObjectAdapterFactory::removeObjectAdapter(const string& name) +{ + IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); + + if(_waitForShutdown) + { + return; + } + + _adapters.erase(name); +} + namespace IceInternal { struct FlushAdapter |