#include <RepositoryManager_Impl.h>
Public Member Functions | |
CIAO_RepositoryManagerDaemon_i (CORBA::ORB_ptr the_orb, const char *server="localhost:5432", const char *install_dir="RepositoryManager") | |
Constructor. | |
virtual | ~CIAO_RepositoryManagerDaemon_i (void) |
Destructor. | |
virtual void | shutdown () |
virtual void | installPackage (const char *installationName, const char *location,::CORBA::Boolean replace) |
virtual void | createPackage (const char *installationName, const ::Deployment::PackageConfiguration &package, const char *baseLocation,::CORBA::Boolean replace) |
virtual ::Deployment::PackageConfiguration * | findPackageByName (const char *name) |
virtual ::Deployment::PackageConfiguration * | findPackageByUUID (const char *UUID) |
virtual ::CORBA::StringSeq * | findNamesByType (const char *type) |
virtual ::CORBA::StringSeq * | getAllNames () |
virtual ::CORBA::StringSeq * | getAllTypes () |
virtual void | deletePackage (const char *installationName) |
Protected Member Functions | |
Deployment::PackageConfiguration * | retrieve_PC_from_package (char *package) |
void | find_PC_name (char *package, ACE_CString &pcd_name) |
Find out what the name of the PackageConfiguration file is. | |
Deployment::PackageConfiguration * | retrieve_PC_from_descriptors (const char *pc_name, const char *descriptor_dir) |
int | HTTP_Get (const char *URL, ACE_Message_Block &mb) |
int | extract_descriptor_files (char *package, ACE_CString &pcd_name) |
int | remove_descriptor_files (char *package) |
retval on success retval on error *int | remove_extracted_package (const char *package_path) |
int | add_type (::Deployment::PackageConfiguration &pc, const char *name) |
int | remove_type (::Deployment::PackageConfiguration &pc, const char *name) |
void | dump (void) |
Function to dump the state of the RepositoryManager. | |
void | save (void) |
Function to save the package info of the RepositoryManager. | |
Private Types | |
typedef ACE_Hash_Map_Manager_Ex < ACE_CString, ACE_CString, ACE_Hash< ACE_CString > , ACE_Equal_To< ACE_CString > , ACE_RW_Mutex > | PCMap |
typedef PCMap::ITERATOR | PCMap_Iterator |
typedef PCMap::ENTRY | PCEntry |
typedef ACE_Hash_Multi_Map_Manager < ACE_CString, ACE_CString, ACE_Hash< ACE_CString > , ACE_Equal_To< ACE_CString > , ACE_RW_Mutex > | CIMap |
typedef CIMap::ITERATOR | CIMap_Iterator |
typedef CIMap::ENTRY | CIEntry |
typedef CIEntry::VALUE_SET | CISet |
typedef CIEntry::VALUE_SET_ITERATOR | CISet_Iterator |
Private Attributes | |
PCMap | names_ |
PCMap | uuids_ |
CIMap | types_ |
CORBA::ORB_var | the_orb_ |
The ORB. | |
char | cwd_ [TEMP_LEN] |
Will hold the current working directory. | |
ACE_CString | install_root_ |
Full path for the install directory. | |
ACE_CString | HTTP_server_ |
Location of the server. | |
ACE_CString | install_path |
Directory where the packages will be stored locally. |
typedef ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_RW_Mutex> CIAO_RepositoryManagerDaemon_i::PCMap [private] |
Cached information about the installed PackageConfigurations A separate map for the installation names and their UUID's Key: PackageConfiguration name or its UUID (CString type) Value: The location of the local copy of the package Based on the synchronization needed we can parametrize this with either ACE_Null_Mutex or ACE_RW_Mutex
typedef PCMap::ITERATOR CIAO_RepositoryManagerDaemon_i::PCMap_Iterator [private] |
typedef PCMap::ENTRY CIAO_RepositoryManagerDaemon_i::PCEntry [private] |
typedef ACE_Hash_Multi_Map_Manager<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_RW_Mutex> CIAO_RepositoryManagerDaemon_i::CIMap [private] |
Cached information about the installed Component Interfaces A map which associates Component supportedType with the names of packages which implement this component type Key: Component supportedType Value: Unbounded set of the names of installed packages which implement this component type Based on the synchronization needed we can parametrize this with either ACE_Null_Mutex or ACE_RW_Mutex
typedef CIMap::ITERATOR CIAO_RepositoryManagerDaemon_i::CIMap_Iterator [private] |
typedef CIMap::ENTRY CIAO_RepositoryManagerDaemon_i::CIEntry [private] |
typedef CIEntry::VALUE_SET CIAO_RepositoryManagerDaemon_i::CISet [private] |
typedef CIEntry::VALUE_SET_ITERATOR CIAO_RepositoryManagerDaemon_i::CISet_Iterator [private] |
CIAO_RepositoryManagerDaemon_i::CIAO_RepositoryManagerDaemon_i | ( | CORBA::ORB_ptr | the_orb, | |
const char * | server = "localhost:5432" , |
|||
const char * | install_dir = "RepositoryManager" | |||
) |
Constructor.
CIAO_RepositoryManagerDaemon_i::~CIAO_RepositoryManagerDaemon_i | ( | void | ) | [virtual] |
Destructor.
void CIAO_RepositoryManagerDaemon_i::shutdown | ( | ) | [virtual] |
void CIAO_RepositoryManagerDaemon_i::installPackage | ( | const char * | installationName, | |
const char * | location, | |||
::CORBA::Boolean | replace | |||
) | [virtual] |
void CIAO_RepositoryManagerDaemon_i::createPackage | ( | const char * | installationName, | |
const ::Deployment::PackageConfiguration & | package, | |||
const char * | baseLocation, | |||
::CORBA::Boolean | replace | |||
) | [virtual] |
Deployment::PackageConfiguration * CIAO_RepositoryManagerDaemon_i::findPackageByName | ( | const char * | name | ) |
Deployment::PackageConfiguration * CIAO_RepositoryManagerDaemon_i::findPackageByUUID | ( | const char * | UUID | ) |
CORBA::StringSeq * CIAO_RepositoryManagerDaemon_i::findNamesByType | ( | const char * | type | ) |
CORBA::StringSeq * CIAO_RepositoryManagerDaemon_i::getAllNames | ( | ) |
CORBA::StringSeq * CIAO_RepositoryManagerDaemon_i::getAllTypes | ( | ) |
void CIAO_RepositoryManagerDaemon_i::deletePackage | ( | const char * | installationName | ) | [virtual] |
Deployment::PackageConfiguration * CIAO_RepositoryManagerDaemon_i::retrieve_PC_from_package | ( | char * | package | ) | [protected] |
Function to parse and return the PackageConfiguration from a specified package
void CIAO_RepositoryManagerDaemon_i::find_PC_name | ( | char * | package, | |
ACE_CString & | pcd_name | |||
) | [protected] |
Find out what the name of the PackageConfiguration file is.
Deployment::PackageConfiguration * CIAO_RepositoryManagerDaemon_i::retrieve_PC_from_descriptors | ( | const char * | pc_name, | |
const char * | descriptor_dir | |||
) | [protected] |
Function to parse and return the PackageConfiguration from the already extracted descriptor files
int CIAO_RepositoryManagerDaemon_i::HTTP_Get | ( | const char * | URL, | |
ACE_Message_Block & | mb | |||
) | [protected] |
Function to retrieve a file via HTTP stores the file in the passed preallocated ACE_Message_Block
1 | success | |
0 | error |
int CIAO_RepositoryManagerDaemon_i::extract_descriptor_files | ( | char * | package, | |
ACE_CString & | pcd_name | |||
) | [protected] |
Function to extract all necessary files for parsing the PackageConfiguration descriptor and populating the idl struct.
1 | success | |
0 | error |
int CIAO_RepositoryManagerDaemon_i::remove_descriptor_files | ( | char * | package | ) | [protected] |
Function to remove the files extracted for parsing the PackageConfiguration descriptor and populating the idl struct. It reads the names of the files from the package. They correspond to the names on disk.
1 | on success | |
0 | on error |
int CIAO_RepositoryManagerDaemon_i::remove_extracted_package | ( | const char * | package_path | ) | [protected] |
Function to remove the files extracted from the package upon istallation It reads the names of the files from the package. They correspond to the names on disk. It deletes each file, then it deletes the directories that contain them.
int CIAO_RepositoryManagerDaemon_i::add_type | ( | ::Deployment::PackageConfiguration & | pc, | |
const char * | name | |||
) | [protected] |
Function to extract the type of the component from the PackageConfiguration and update the interface map
1 | on success | |
0 | on error |
int CIAO_RepositoryManagerDaemon_i::remove_type | ( | ::Deployment::PackageConfiguration & | pc, | |
const char * | name | |||
) | [protected] |
Function to remove the interface type of the component being removed from the interface map
1 | on success | |
0 | on error |
void CIAO_RepositoryManagerDaemon_i::dump | ( | void | ) | [protected] |
Function to dump the state of the RepositoryManager.
void CIAO_RepositoryManagerDaemon_i::save | ( | void | ) | [protected] |
Function to save the package info of the RepositoryManager.
PCMap CIAO_RepositoryManagerDaemon_i::names_ [private] |
A hash map that associates the names of PackageConfigurations with their location
PCMap CIAO_RepositoryManagerDaemon_i::uuids_ [private] |
a hash map that associates the UUIDs of PackageConfigurations with their location
CIMap CIAO_RepositoryManagerDaemon_i::types_ [private] |
a hash map which associates Component Interface UUIDs with their implementations
The ORB.
char CIAO_RepositoryManagerDaemon_i::cwd_[TEMP_LEN] [private] |
Will hold the current working directory.
Full path for the install directory.
Location of the server.
Directory where the packages will be stored locally.