DAnCE  ..
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
DAnCE::RepositoryManagerDaemon_i Class Reference

#include <RepositoryManager_Impl.h>

Inheritance diagram for DAnCE::RepositoryManagerDaemon_i:
Inheritance graph
Collaboration diagram for DAnCE::RepositoryManagerDaemon_i:
Collaboration graph

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. More...
 
virtual ~RepositoryManagerDaemon_i (void)
 Destructor. More...
 
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::PackageConfigurationretrieve_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. More...
 
Deployment::PackageConfigurationretrieve_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. More...
 
void save (void)
 Function to save the package info of the RepositoryManager. More...
 

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. More...
 
ACE_TCHAR cwd_ [TEMP_LEN]
 Will hold the current working directory. More...
 
ACE_CString install_root_
 Full path for the install directory. More...
 
ACE_CString HTTP_server_
 Location of the server. More...
 
ACE_CString install_path
 Directory where the packages will be stored locally. More...
 

Member Typedef Documentation

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

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

Constructor & Destructor Documentation

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.

Member Function Documentation

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

Return values
1on success
0on error
void DAnCE::RepositoryManagerDaemon_i::createPackage ( const ACE_TCHAR installationName,
const ::Deployment::PackageConfiguration package,
const ACE_TCHAR baseLocation,
::CORBA::Boolean  replace 
)
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.

Return values
1success
0error
Note
ACE_CString& pcd_name is an out parameter
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.

CORBA::StringSeq * DAnCE::RepositoryManagerDaemon_i::findNamesByType ( const ACE_TCHAR type)
Deployment::PackageConfiguration * DAnCE::RepositoryManagerDaemon_i::findPackageByName ( const ACE_TCHAR name)
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

Return values
1success
0error
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.

Return values
1on success
0on 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.

Note
extraction location is path/*archive_name
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

Return values
1on success
0on 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

Member Data Documentation

ACE_TCHAR DAnCE::RepositoryManagerDaemon_i::cwd_[TEMP_LEN]
private

Will hold the current working directory.

ACE_CString DAnCE::RepositoryManagerDaemon_i::HTTP_server_
private

Location of the server.

ACE_CString DAnCE::RepositoryManagerDaemon_i::install_path
private

Directory where the packages will be stored locally.

ACE_CString DAnCE::RepositoryManagerDaemon_i::install_root_
private

Full path for the install directory.

PCMap DAnCE::RepositoryManagerDaemon_i::names_
private

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

CORBA::ORB_var DAnCE::RepositoryManagerDaemon_i::the_orb_
private

The ORB.

CIMap DAnCE::RepositoryManagerDaemon_i::types_
private

a hash map which associates Component Interface UUIDs with their implementations

PCMap DAnCE::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: