#include <RepositoryManager_Impl.h>
Public Member Functions | |
RepositoryManagerDaemon_i (CORBA::ORB_ptr the_orb, const ACE_TCHAR *server=ACE_TEXT("localhost:5432"), const ACE_TCHAR *install_dir=ACE_TEXT("RepositoryManager")) | |
Constructor. | |
virtual | ~RepositoryManagerDaemon_i (void) |
Destructor. | |
virtual void | shutdown () |
virtual void | installPackage (const ACE_TCHAR *installationName, const ACE_TCHAR *location,::CORBA::Boolean replace) |
virtual void | createPackage (const ACE_TCHAR *installationName, const ::Deployment::PackageConfiguration &package, const ACE_TCHAR *baseLocation,::CORBA::Boolean replace) |
virtual ::Deployment::PackageConfiguration * | findPackageByName (const ACE_TCHAR *name) |
virtual ::Deployment::PackageConfiguration * | findPackageByUUID (const ACE_TCHAR *UUID) |
virtual ::CORBA::StringSeq * | findNamesByType (const ACE_TCHAR *type) |
virtual ::CORBA::StringSeq * | getAllNames () |
virtual ::CORBA::StringSeq * | getAllTypes () |
virtual void | deletePackage (const ACE_TCHAR *installationName) |
Protected Member Functions | |
Deployment::PackageConfiguration * | retrieve_PC_from_package (ACE_TCHAR *package) |
void | find_PC_name (ACE_TCHAR *package, ACE_CString &pcd_name) |
Find out what the name of the PackageConfiguration file is. | |
Deployment::PackageConfiguration * | retrieve_PC_from_descriptors (const ACE_TCHAR *pc_name, const ACE_TCHAR *descriptor_dir) |
int | HTTP_Get (const ACE_TCHAR *URL, ACE_Message_Block &mb) |
int | extract_descriptor_files (ACE_TCHAR *package, ACE_CString &pcd_name) |
int | remove_descriptor_files (ACE_TCHAR *package) |
retval on success retval on error *int | remove_extracted_package (const ACE_TCHAR *package_path) |
int | add_type (::Deployment::PackageConfiguration &pc, const ACE_TCHAR *name) |
int | remove_type (::Deployment::PackageConfiguration &pc, const ACE_TCHAR *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. | |
ACE_TCHAR | 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 CIMap::ENTRY DAnCE::RepositoryManagerDaemon_i::CIEntry [private] |
typedef ACE_Hash_Multi_Map_Manager<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_RW_Mutex> DAnCE::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 DAnCE::RepositoryManagerDaemon_i::CIMap_Iterator [private] |
typedef CIEntry::VALUE_SET DAnCE::RepositoryManagerDaemon_i::CISet [private] |
typedef CIEntry::VALUE_SET_ITERATOR DAnCE::RepositoryManagerDaemon_i::CISet_Iterator [private] |
typedef PCMap::ENTRY DAnCE::RepositoryManagerDaemon_i::PCEntry [private] |
typedef ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_RW_Mutex> DAnCE::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 DAnCE::RepositoryManagerDaemon_i::PCMap_Iterator [private] |
DAnCE::RepositoryManagerDaemon_i::RepositoryManagerDaemon_i | ( | CORBA::ORB_ptr | the_orb, | |
const ACE_TCHAR * | server = ACE_TEXT("localhost:5432") , |
|||
const ACE_TCHAR * | install_dir = ACE_TEXT("RepositoryManager") | |||
) |
Constructor.
DAnCE::RepositoryManagerDaemon_i::~RepositoryManagerDaemon_i | ( | void | ) | [virtual] |
Destructor.
int DAnCE::RepositoryManagerDaemon_i::add_type | ( | ::Deployment::PackageConfiguration & | pc, | |
const ACE_TCHAR * | name | |||
) | [protected] |
Function to extract the type of the component from the PackageConfiguration and update the interface map
1 | on success | |
0 | on error |
virtual void DAnCE::RepositoryManagerDaemon_i::createPackage | ( | const ACE_TCHAR * | installationName, | |
const ::Deployment::PackageConfiguration & | package, | |||
const ACE_TCHAR * | baseLocation, | |||
::CORBA::Boolean | replace | |||
) | [virtual] |
virtual void DAnCE::RepositoryManagerDaemon_i::deletePackage | ( | const ACE_TCHAR * | installationName | ) | [virtual] |
void DAnCE::RepositoryManagerDaemon_i::dump | ( | void | ) | [protected] |
Function to dump the state of the RepositoryManager.
int DAnCE::RepositoryManagerDaemon_i::extract_descriptor_files | ( | ACE_TCHAR * | 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 |
void DAnCE::RepositoryManagerDaemon_i::find_PC_name | ( | ACE_TCHAR * | package, | |
ACE_CString & | pcd_name | |||
) | [protected] |
Find out what the name of the PackageConfiguration file is.
virtual ::CORBA::StringSeq* DAnCE::RepositoryManagerDaemon_i::findNamesByType | ( | const ACE_TCHAR * | type | ) |
virtual ::Deployment::PackageConfiguration* DAnCE::RepositoryManagerDaemon_i::findPackageByName | ( | const ACE_TCHAR * | name | ) |
virtual ::Deployment::PackageConfiguration* DAnCE::RepositoryManagerDaemon_i::findPackageByUUID | ( | const ACE_TCHAR * | UUID | ) |
CORBA::StringSeq * DAnCE::RepositoryManagerDaemon_i::getAllNames | ( | ) |
CORBA::StringSeq * DAnCE::RepositoryManagerDaemon_i::getAllTypes | ( | ) |
int DAnCE::RepositoryManagerDaemon_i::HTTP_Get | ( | const ACE_TCHAR * | 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 |
virtual void DAnCE::RepositoryManagerDaemon_i::installPackage | ( | const ACE_TCHAR * | installationName, | |
const ACE_TCHAR * | location, | |||
::CORBA::Boolean | replace | |||
) | [virtual] |
int DAnCE::RepositoryManagerDaemon_i::remove_descriptor_files | ( | ACE_TCHAR * | 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 |
retval on success retval on error* int DAnCE::RepositoryManagerDaemon_i::remove_extracted_package | ( | const ACE_TCHAR * | 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 DAnCE::RepositoryManagerDaemon_i::remove_type | ( | ::Deployment::PackageConfiguration & | pc, | |
const ACE_TCHAR * | name | |||
) | [protected] |
Function to remove the interface type of the component being removed from the interface map
1 | on success | |
0 | on error |
Deployment::PackageConfiguration* DAnCE::RepositoryManagerDaemon_i::retrieve_PC_from_descriptors | ( | const ACE_TCHAR * | pc_name, | |
const ACE_TCHAR * | descriptor_dir | |||
) | [protected] |
Function to parse and return the PackageConfiguration from the already extracted descriptor files
Deployment::PackageConfiguration* DAnCE::RepositoryManagerDaemon_i::retrieve_PC_from_package | ( | ACE_TCHAR * | package | ) | [protected] |
Function to parse and return the PackageConfiguration from a specified package
void DAnCE::RepositoryManagerDaemon_i::save | ( | void | ) | [protected] |
Function to save the package info of the RepositoryManager.
void DAnCE::RepositoryManagerDaemon_i::shutdown | ( | ) | [virtual] |
ACE_TCHAR DAnCE::RepositoryManagerDaemon_i::cwd_[TEMP_LEN] [private] |
Will hold the current working directory.
Location of the server.
Directory where the packages will be stored locally.
Full path for the install directory.
A hash map that associates the names of PackageConfigurations with their location
The ORB.
a hash map which associates Component Interface UUIDs with their implementations
a hash map that associates the UUIDs of PackageConfigurations with their location