CIAO_RepositoryManagerDaemon_i Class Reference

#include <RepositoryManager_Impl.h>

Collaboration diagram for CIAO_RepositoryManagerDaemon_i:

Collaboration graph
[legend]
List of all members.

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::PackageConfigurationfindPackageByName (const char *name)
virtual ::Deployment::PackageConfigurationfindPackageByUUID (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::PackageConfigurationretrieve_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::PackageConfigurationretrieve_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.

Member Typedef Documentation

typedef CIMap::ENTRY CIAO_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> CIAO_RepositoryManagerDaemon_i::CIMap [private]

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 CIEntry::VALUE_SET CIAO_RepositoryManagerDaemon_i::CISet [private]

typedef CIEntry::VALUE_SET_ITERATOR CIAO_RepositoryManagerDaemon_i::CISet_Iterator [private]

typedef PCMap::ENTRY CIAO_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> CIAO_RepositoryManagerDaemon_i::PCMap [private]

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]


Constructor & Destructor Documentation

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.


Member Function Documentation

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

Return values:
1 on success
0 on error

void CIAO_RepositoryManagerDaemon_i::createPackage ( const char *  installationName,
const ::Deployment::PackageConfiguration package,
const char *  baseLocation,
::CORBA::Boolean  replace 
) [virtual]

void CIAO_RepositoryManagerDaemon_i::deletePackage ( const char *  installationName  )  [virtual]

void CIAO_RepositoryManagerDaemon_i::dump ( void   )  [protected]

Function to dump the state of the RepositoryManager.

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.

Return values:
1 success
0 error
Note:
ACE_CString& pcd_name is an out parameter

void CIAO_RepositoryManagerDaemon_i::find_PC_name ( char *  package,
ACE_CString pcd_name 
) [protected]

Find out what the name of the PackageConfiguration file is.

CORBA::StringSeq * CIAO_RepositoryManagerDaemon_i::findNamesByType ( const char *  type  ) 

Deployment::PackageConfiguration * CIAO_RepositoryManagerDaemon_i::findPackageByName ( const char *  name  ) 

Deployment::PackageConfiguration * CIAO_RepositoryManagerDaemon_i::findPackageByUUID ( const char *  UUID  ) 

CORBA::StringSeq * CIAO_RepositoryManagerDaemon_i::getAllNames (  ) 

CORBA::StringSeq * CIAO_RepositoryManagerDaemon_i::getAllTypes (  ) 

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

Return values:
1 success
0 error

void CIAO_RepositoryManagerDaemon_i::installPackage ( const char *  installationName,
const char *  location,
::CORBA::Boolean  replace 
) [virtual]

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.

Return values:
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.

Note:
extraction location is path/*archive_name

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

Return values:
1 on success
0 on error

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

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::save ( void   )  [protected]

Function to save the package info of the RepositoryManager.

void CIAO_RepositoryManagerDaemon_i::shutdown (  )  [virtual]


Member Data Documentation

char CIAO_RepositoryManagerDaemon_i::cwd_[TEMP_LEN] [private]

Will hold the current working directory.

ACE_CString CIAO_RepositoryManagerDaemon_i::HTTP_server_ [private]

Location of the server.

ACE_CString CIAO_RepositoryManagerDaemon_i::install_path [private]

Directory where the packages will be stored locally.

ACE_CString CIAO_RepositoryManagerDaemon_i::install_root_ [private]

Full path for the install directory.

PCMap CIAO_RepositoryManagerDaemon_i::names_ [private]

A hash map that associates the names of PackageConfigurations with their location

CORBA::ORB_var CIAO_RepositoryManagerDaemon_i::the_orb_ [private]

The ORB.

CIMap CIAO_RepositoryManagerDaemon_i::types_ [private]

a hash map which associates Component Interface UUIDs with their implementations

PCMap CIAO_RepositoryManagerDaemon_i::uuids_ [private]

a hash map that associates the UUIDs of PackageConfigurations with their location


The documentation for this class was generated from the following files:
Generated on Mon Apr 30 23:46:31 2007 for DAnCE by  doxygen 1.4.7-1