diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-08-09 14:58:01 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-08-09 14:58:01 +0000 |
commit | 3f862089b748741b30e343d2051a4747a3bff2f2 (patch) | |
tree | 18d1dde1504e2d510a24f4d55aeee21bfea7c04f /cpp/src/IceGrid/ServerI.h | |
parent | fixing bug 1291 (diff) | |
download | ice-3f862089b748741b30e343d2051a4747a3bff2f2.tar.bz2 ice-3f862089b748741b30e343d2051a4747a3bff2f2.tar.xz ice-3f862089b748741b30e343d2051a4747a3bff2f2.zip |
Borland C++Builder port mass commit
Diffstat (limited to 'cpp/src/IceGrid/ServerI.h')
-rw-r--r-- | cpp/src/IceGrid/ServerI.h | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/ServerI.h b/cpp/src/IceGrid/ServerI.h index f71aca358aa..643bede299e 100644 --- a/cpp/src/IceGrid/ServerI.h +++ b/cpp/src/IceGrid/ServerI.h @@ -199,6 +199,116 @@ private: }; typedef IceUtil::Handle<TimedServerCommand> TimedServerCommandPtr; +class DestroyCommand : public ServerCommand +{ +public: + + DestroyCommand(const ServerIPtr&, bool); + + bool canExecute(ServerI::InternalServerState state); + ServerI::InternalServerState nextState(); + void execute(); + + void addCallback(const AMD_Node_destroyServerPtr& amdCB); + void finished(); + +private: + + const bool _kill; + std::vector<AMD_Node_destroyServerPtr> _destroyCB; +}; + +class StopCommand : public TimedServerCommand +{ +public: + + StopCommand(const ServerIPtr&, const WaitQueuePtr&, int); + + static bool isStopped(ServerI::InternalServerState state); + + bool canExecute(ServerI::InternalServerState state); + ServerI::InternalServerState nextState(); + void execute(); + void timeout(bool destroyed); + + void addCallback(const AMD_Server_stopPtr&); + void failed(const std::string& reason); + void finished(); + +private: + + std::vector<AMD_Server_stopPtr> _stopCB; +}; + +class StartCommand : public TimedServerCommand +{ +public: + + StartCommand(const ServerIPtr&, const WaitQueuePtr&, int); + + bool canExecute(ServerI::InternalServerState state); + ServerI::InternalServerState nextState(); + void execute(); + void timeout(bool destroyed); + + void addCallback(const AMD_Server_startPtr&); + void failed(const std::string& reason); + void finished(); + +private: + + std::vector<AMD_Server_startPtr> _startCB; +}; + +class PatchCommand : public ServerCommand, public IceUtil::Monitor<IceUtil::Mutex> +{ +public: + + PatchCommand(const ServerIPtr&); + + bool canExecute(ServerI::InternalServerState state); + ServerI::InternalServerState nextState(); + void execute(); + + bool waitForPatch(); + void destroyed(); + void finished(); + +private: + + bool _notified; + bool _destroyed; +}; + +class LoadCommand : public ServerCommand +{ +public: + + LoadCommand(const ServerIPtr&); + + bool canExecute(ServerI::InternalServerState state); + ServerI::InternalServerState nextState(); + void execute(); + + void setUpdate(const std::string&, const ServerDescriptorPtr&, const std::string&, bool clearDir); + bool clearDir() const; + std::string sessionId() const; + std::string getApplication() const; + ServerDescriptorPtr getDescriptor() const; + void addCallback(const AMD_Node_loadServerPtr&); + void failed(const Ice::Exception&); + void finished(const ServerPrx&, const AdapterPrxDict&, int, int); + +private: + + std::vector<AMD_Node_loadServerPtr> _loadCB; + bool _clearDir; + std::string _application; + ServerDescriptorPtr _desc; + std::string _sessionId; + std::auto_ptr<DeploymentException> _exception; +}; + } #endif |