summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-11-26 09:44:28 +0000
committerkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-11-26 09:44:28 +0000
commit7aaf342fb4269ddb676fc6275e3ea95679ad2f8b (patch)
treed6343e9e5734239e70e89a672aaebbb03510d9d9
parent9b44237e2caa3ee903bf282bd6995a655090deb6 (diff)
downloadATCD-7aaf342fb4269ddb676fc6275e3ea95679ad2f8b.tar.gz
ChangeLogTag: Mon Nov 25 04:25:15 2002 Krishnakumar B <kitty@cs.wustl.edu>
-rw-r--r--ACEXML/compass/AssemblyFactory.h5
-rw-r--r--ACEXML/compass/ComponentInstallation.h37
-rw-r--r--ACEXML/compass/ComponentInstallation.inl10
-rw-r--r--ACEXML/compass/Container.h11
-rw-r--r--ACEXML/compass/Container.inl18
-rw-r--r--ACEXML/compass/ServerActivator.h4
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, ACE_SYNCH_MUTEX>;
- 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<ACEXML_String,
+ ACEXML_String> Package;
+
+ typedef ACE_Hash_Map_Manager_Ex<ACEXML_String,
+ ACEXML_String,
+ ACE_Hash<ACEXML_String>,
+ ACE_Equal_To<ACEXML_String>,
+ ACE_SYNCH_MUTEX> Package_Manager;
+
+ typedef ACE_Hash_Map_Iterator_Ex<ACEXML_String,
+ ACEXML_String,
+ ACE_Hash<ACEXML_String>,
+ ACE_Equal_To<ACEXML_String>,
+ ACE_SYNCH_MUTEX> Package_Manager_Iter;
+
+ typedef ACE_Hash_Map_Reverse_Iterator_Ex<ACEXML_String,
+ ACEXML_String,
+ ACE_Hash<ACEXML_String>,
+ ACE_Equal_To<ACEXML_String>,
+ ACE_SYNCH_MUTEX> Package_Manager_Reverse_Iter;
+
class Compass_Export ComponentInstallation
{
public:
+ friend class ACE_Singleton<ComponentInstallation, ACE_SYNCH_MUTEX>;
+
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<ComponentInstallation, ACE_SYNCH_MUTEX> 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, ACE_SYNCH_MUTEX>;
- 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: