diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-07-06 10:57:39 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-07-06 10:57:39 +0000 |
commit | 5dcdcde597b97f12d63c519cc6b7cb83c3820035 (patch) | |
tree | 60c0cd0779ecf7d61836ff8caf4fa3cca545dd0e /cpp/src/IceGrid/ServerAdapterI.h | |
parent | release reference to servant asap (diff) | |
download | ice-5dcdcde597b97f12d63c519cc6b7cb83c3820035.tar.bz2 ice-5dcdcde597b97f12d63c519cc6b7cb83c3820035.tar.xz ice-5dcdcde597b97f12d63c519cc6b7cb83c3820035.zip |
Changed server start to wait for object adapter activation before to
return.
Diffstat (limited to 'cpp/src/IceGrid/ServerAdapterI.h')
-rw-r--r-- | cpp/src/IceGrid/ServerAdapterI.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/cpp/src/IceGrid/ServerAdapterI.h b/cpp/src/IceGrid/ServerAdapterI.h index 11f4ae416e7..4a7f5644eee 100644 --- a/cpp/src/IceGrid/ServerAdapterI.h +++ b/cpp/src/IceGrid/ServerAdapterI.h @@ -12,7 +12,6 @@ #include <IceUtil/Mutex.h> #include <IceGrid/Internal.h> -#include <IceUtil/AbstractMutex.h> namespace IceGrid { @@ -20,29 +19,35 @@ namespace IceGrid class NodeI; typedef IceUtil::Handle<NodeI> NodeIPtr; -class ServerAdapterI : public Adapter, public IceUtil::AbstractMutexI<IceUtil::Mutex> +class ServerI; +typedef IceUtil::Handle<ServerI> ServerIPtr; + +class ServerAdapterI : public Adapter, public IceUtil::Mutex { public: - ServerAdapterI(const NodeIPtr&, const ServerPrx&, const std::string&, Ice::Int); + ServerAdapterI(const NodeIPtr&, const ServerIPtr&, const AdapterPrx&, const std::string&, Ice::Int); virtual ~ServerAdapterI(); - virtual std::string getId(const Ice::Current&); - virtual void activate_async(const AMD_Adapter_activatePtr& cb, const Ice::Current&); - virtual Ice::ObjectPrx getDirectProxy(const Ice::Current&) const; + virtual Ice::ObjectPrx getDirectProxy(const Ice::Current& = Ice::Current()) const; virtual void setDirectProxy(const ::Ice::ObjectPrx&, const ::Ice::Current&); virtual void destroy(const ::Ice::Current&); + void activationFailed(bool); + private: const NodeIPtr _node; + const AdapterPrx _this; const std::string _id; - const ServerPrx _server; + const ServerIPtr _server; const IceUtil::Time _waitTime; Ice::ObjectPrx _proxy; + std::vector<AMD_Adapter_activatePtr> _activateCB; }; +typedef IceUtil::Handle<ServerAdapterI> ServerAdapterIPtr; } |