From 7aaf342fb4269ddb676fc6275e3ea95679ad2f8b Mon Sep 17 00:00:00 2001 From: kitty Date: Tue, 26 Nov 2002 09:44:28 +0000 Subject: ChangeLogTag: Mon Nov 25 04:25:15 2002 Krishnakumar B --- ACEXML/compass/AssemblyFactory.h | 5 +++-- ACEXML/compass/ComponentInstallation.h | 37 +++++++++++++++++++++++++++++++- ACEXML/compass/ComponentInstallation.inl | 10 +++++++++ ACEXML/compass/Container.h | 11 +++++----- ACEXML/compass/Container.inl | 18 ++++++++++++++++ ACEXML/compass/ServerActivator.h | 4 ++-- 6 files changed, 75 insertions(+), 10 deletions(-) diff --git a/ACEXML/compass/AssemblyFactory.h b/ACEXML/compass/AssemblyFactory.h index 9bad0d0cc1c..955b2ac46c8 100644 --- a/ACEXML/compass/AssemblyFactory.h +++ b/ACEXML/compass/AssemblyFactory.h @@ -44,8 +44,7 @@ namespace Deployment { public: friend class ACE_Singleton; - AssemblyFactory(); - ~AssemblyFactory(); + Cookie create(const Location& assembly_loc) ACE_THROW_SPEC ((InvalidLocation, CreateFailure)); @@ -55,6 +54,8 @@ namespace Deployment void destroy(const Cookie& c) ACE_THROW_SPEC ((InvalidAssembly, RemoveFailure)); protected: + AssemblyFactory(); + ~AssemblyFactory(); AssemblyFactory (const AssemblyFactory&); AssemblyFactory& operator= (const AssemblyFactory&); private: diff --git a/ACEXML/compass/ComponentInstallation.h b/ACEXML/compass/ComponentInstallation.h index 3168bd3edf5..5521fc8f910 100644 --- a/ACEXML/compass/ComponentInstallation.h +++ b/ACEXML/compass/ComponentInstallation.h @@ -14,9 +14,32 @@ namespace Deployment { + typedef ACE_Hash_Map_Entry Package; + + typedef ACE_Hash_Map_Manager_Ex, + ACE_Equal_To, + ACE_SYNCH_MUTEX> Package_Manager; + + typedef ACE_Hash_Map_Iterator_Ex, + ACE_Equal_To, + ACE_SYNCH_MUTEX> Package_Manager_Iter; + + typedef ACE_Hash_Map_Reverse_Iterator_Ex, + ACE_Equal_To, + ACE_SYNCH_MUTEX> Package_Manager_Reverse_Iter; + class Compass_Export ComponentInstallation { public: + friend class ACE_Singleton; + void install(const UUID& implUUID, const Location& component_loc) ACE_THROW_SPEC ((InvalidLocation,InstallationFailure)); @@ -26,9 +49,21 @@ namespace Deployment void remove(const UUID& implUUID) ACE_THROW_SPEC ((UnknownImplId, RemoveFailure)); - Location get_implementation (const UUID& implUUID) + const Location& get_implementation (const UUID& implUUID) ACE_THROW_SPEC ((UnknownImplId, InstallationFailure)); + + protected: + ComponentInstallation(); + ~ComponentInstallation(); + ComponentInstallation (const ComponentInstallation&); + ComponentInstallation& operator= (const ComponentInstallation&); + + private: + + Package_Manager packages_; }; + typedef ACE_Singleton COMP_INSTALL; + } diff --git a/ACEXML/compass/ComponentInstallation.inl b/ACEXML/compass/ComponentInstallation.inl index cfa1da318d3..80de2184058 100644 --- a/ACEXML/compass/ComponentInstallation.inl +++ b/ACEXML/compass/ComponentInstallation.inl @@ -1 +1,11 @@ // $Id$ + +ACE_INLINE const Location& +get_implementation (const UUID& implUUID) + ACE_THROW_SPEC ((UnknownImplId, InstallationFailure)); +{ + ACEXML_String loc; + if (this->packages_.find (implUUID, loc) != 0) + ACE_THROW (UnknownImplId()); + return this->loc; +} diff --git a/ACEXML/compass/Container.h b/ACEXML/compass/Container.h index 4819904b889..781cb444efc 100644 --- a/ACEXML/compass/Container.h +++ b/ACEXML/compass/Container.h @@ -19,9 +19,8 @@ namespace Deployment { public: Container(const ComponentServer* server); - ~Container(); - ComponentServer* get_component_server (); + ~Container(); CCMHome* install_home (const UUID& id, const string& entrypt, const ConfigValues* config) @@ -31,12 +30,14 @@ namespace Deployment void remove_home (const CCMHome* href) ACE_THROW_SPEC ((RemoveFailure)); - CCMHomes* get_homes (); - void remove () ACE_THROW_SPEC ((RemoveFailure)); - ConfigValues get_configuration (void); + CCMHomes* get_homes (); + + ComponentServer* get_component_server (); + + ConfigValues* get_configuration (void); void set_configuration (const ConfigValues* config); diff --git a/ACEXML/compass/Container.inl b/ACEXML/compass/Container.inl index 9dc589a6825..fe8ef2c94b9 100644 --- a/ACEXML/compass/Container.inl +++ b/ACEXML/compass/Container.inl @@ -5,3 +5,21 @@ Container::get_component_server() { return this->parent_; } + +ACE_INLINE CCMHomes* +Container::get_homes() +{ + return this->homes_; +} + +ACE_INLINE ConfigValues* +Container::get_configuration() +{ + return this->config_; +} + +ACE_INLINE void +Container::set_configuration (ConfigValues* config) +{ + this->config_ = config; +} diff --git a/ACEXML/compass/ServerActivator.h b/ACEXML/compass/ServerActivator.h index c3e08ba3710..ca6172e42b0 100644 --- a/ACEXML/compass/ServerActivator.h +++ b/ACEXML/compass/ServerActivator.h @@ -26,8 +26,6 @@ namespace Deployment { public: friend class ACE_Singleton ; - ServerActivator(); - ~ServerActivator(); ComponentServer* create_component_server (const ConfigValues& config) ACE_THROW_SPEC ((CreateFailure, InvalidConfiguration)); @@ -37,6 +35,8 @@ namespace Deployment ComponentServers* get_component_servers (); protected: + ServerActivator(); + ~ServerActivator(); ServerActivator (const ServerActivator&); ServerActivator& operator= (const ServerActivator&); private: -- cgit v1.2.1