TAO_Implementation_Repository
2.3.3
|
XML backing store interface containing all ImR persistent information in a single file. More...
#include <XML_Backing_Store.h>
Public Types | |
typedef std::pair< ACE_CString, ACE_CString > | NameValue |
typedef std::vector< NameValue > | NameValues |
Public Types inherited from Locator_Repository | |
typedef ACE_Hash_Map_Manager_Ex< ACE_CString, Server_Info_Ptr, ACE_Hash< ACE_CString >, ACE_Equal_To< ACE_CString >, ACE_Null_Mutex > | SIMap |
typedef ACE_Hash_Map_Manager_Ex< ACE_CString, Activator_Info_Ptr, ACE_Hash< ACE_CString >, ACE_Equal_To< ACE_CString >, ACE_Null_Mutex > | AIMap |
Public Member Functions | |
XML_Backing_Store (const Options &opts, CORBA::ORB_ptr orb, bool suppress_erase=false) | |
virtual | ~XML_Backing_Store (void) |
virtual const ACE_TCHAR * | repo_mode (void) const |
indicate the XML filename as the persistence mode for the repository More... | |
virtual void | load_server (Server_Info *info, bool server_started, const NameValues &extra_params) |
virtual void | load_activator (const ACE_CString &activator_name, long token, const ACE_CString &ior, const NameValues &extra_params) |
Public Member Functions inherited from Locator_Repository | |
Locator_Repository (const Options &opts, CORBA::ORB_ptr orb) | |
virtual | ~Locator_Repository () |
virtual void | shutdown (void) |
int | unregister_if_address_reused (const ACE_CString &fqname, const char *partial_ior, ImR_Locator_i *imr_locator) |
int | add_server (const ACE_CString &fqname, const ImplementationRepository::StartupOptions &options) |
Add a new server to the Repository. More... | |
int | add_server (const ACE_CString &fqname, const ACE_CString &partial_ior, const ACE_CString &ior, ImplementationRepository::ServerObject_ptr svrobj) |
int | add_server_i (Server_Info *si) |
int | link_peers (Server_Info_Ptr base, const CORBA::StringSeq peers) |
int | add_activator (const ACE_CString &name, const CORBA::Long token, const ACE_CString &ior=ACE_CString(""), ImplementationRepository::Activator_ptr act=ImplementationRepository::Activator::_nil()) |
Add a new activator to the Repository. More... | |
int | update_server (const Server_Info_Ptr &info) |
Update the associated information. More... | |
int | update_activator (const Activator_Info_Ptr &info) |
Update the associated information. More... | |
virtual void | notify_remote_access (const char *id, ImplementationRepository::AAM_Status state) |
Update the peer's access state. More... | |
Server_Info_Ptr | get_active_server (const ACE_CString &name, int pid=0) |
Returns information related to startup. More... | |
Server_Info_Ptr | get_info (const ACE_CString &name) |
Activator_Info_Ptr | get_activator (const ACE_CString &name) |
Returns information related to startup. More... | |
bool | has_activator (const ACE_CString &name) |
int | remove_server (const ACE_CString &name) |
Removes the server from the Repository. More... | |
int | remove_activator (const ACE_CString &name) |
Removes the activator from the Repository. More... | |
SIMap & | servers (void) |
Returns the internal hash map containing the server information. More... | |
const SIMap & | servers (void) const |
AIMap & | activators (void) |
Returns the internal hash map containing the activator information. More... | |
const AIMap & | activators (void) const |
int | init (PortableServer::POA_ptr root_poa, PortableServer::POA_ptr imr_poa, const char *this_ior) |
Initialize the repo. More... | |
bool | multicast () const |
Indicate if multicast should be used. More... | |
virtual int | report_ior (PortableServer::POA_ptr imr_poa) |
report the ImR Locator's IOR More... | |
Protected Member Functions | |
virtual int | init_repo (PortableServer::POA_ptr imr_poa) |
virtual int | persistent_update (const Server_Info_Ptr &info, bool add) |
perform server persistent update More... | |
virtual int | persistent_update (const Activator_Info_Ptr &info, bool add) |
perform activator persistent update More... | |
virtual int | persistent_remove (const ACE_CString &name, bool activator) |
perform persistent remove More... | |
int | load_file (const ACE_TString &filename, FILE *open_file=0) |
void | persist (FILE *fp, const Server_Info &info, const char *tag_prepend, const NameValues &name_values=NameValues()) |
void | persist (FILE *fp, const Activator_Info &info, const char *tag_prepend, const NameValues &name_values=NameValues()) |
void | create_server (bool server_started, const Server_Info_Ptr &si) |
Protected Member Functions inherited from Locator_Repository | |
virtual int | sync_load (void) |
virtual int | recover_ior (void) |
recover the ImR Locator's IOR from the persisted file More... | |
int | setup_multicast (ACE_Reactor *reactor, const char *imr_ior) |
void | teardown_multicast () |
bool | registered () const |
Static Protected Member Functions | |
static int | load_file (const ACE_TString &filename, ACEXML_DefaultHandler &xml_handler, unsigned int debug, FILE *open_file=0) |
Protected Attributes | |
const ACE_TString | filename_ |
the filename indicated in the Options for the backing store More... | |
Protected Attributes inherited from Locator_Repository | |
const Options & | opts_ |
TAO_IOR_Multicast | ior_multicast_ |
const CORBA::ORB_var | orb_ |
CORBA::String_var | imr_ior_ |
Private Member Functions | |
int | persist () |
persist all servers and activators More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Locator_Repository | |
static ACE_CString | lcase (const ACE_CString &s) |
convert to lower case More... | |
XML backing store interface containing all ImR persistent information in a single file.
typedef std::pair<ACE_CString, ACE_CString> XML_Backing_Store::NameValue |
typedef std::vector<NameValue> XML_Backing_Store::NameValues |
XML_Backing_Store::XML_Backing_Store | ( | const Options & | opts, |
CORBA::ORB_ptr | orb, | ||
bool | suppress_erase = false |
||
) |
|
virtual |
|
protected |
create the Server_Info server object
server_started | indication from persistence indicating if the server object was present |
si | the server info in question |
|
protectedvirtual |
perform XML backing store specific initialization (loads servers and activators from the backing store)
Implements Locator_Repository.
Reimplemented in Shared_Backing_Store.
|
virtual |
create the Activator_Info activator object
activator_name | the Activator_Info name |
token | the Activator_Info token |
ior | the Activator_Info ior |
extra_params | extra name value pairs that were reported for the activator |
Reimplemented in Shared_Backing_Store.
|
protected |
load the contents of a file into the repo using a Locator_XMLHandler
filename | the filename to read the contents from |
open_file | the already open FILE stream for the filename |
|
staticprotected |
load the contents of a file into the repo using the provided ACEXML_DefaultHandler
filename | the filename to read the contents from |
xml_handler | the ACEXML_DefaultHandler to use to parse the file |
debug | the current debug level |
open_file | the already open FILE stream for the filename |
|
virtual |
create the Server_Info server object
info | the source Server_Info data |
server_started | indicates if the server object existed when data was persisted |
extra_params | extra name value pairs that were reported for the server |
Reimplemented in Shared_Backing_Store.
|
protected |
persist the server
fp | the FILE stream to persist the server contents to |
info | the Server_Info to persist |
tag_prepend | a character string to prepend at the start of every xml line to maintain proper indentation |
name_values | extra name value pairs to write as attributes |
|
protected |
persist the activator
fp | the FILE stream to persist the activator contents to |
info | the Server_Info to persist |
tag_prepend | a character string to prepend at the start of every xml line to maintain proper indentation |
name_values | extra name value pairs to write as attributes |
|
private |
persist all servers and activators
|
protectedvirtual |
|
protectedvirtual |
perform server persistent update
Implements Locator_Repository.
Reimplemented in Shared_Backing_Store.
|
protectedvirtual |
perform activator persistent update
Implements Locator_Repository.
Reimplemented in Shared_Backing_Store.
|
virtual |
indicate the XML filename as the persistence mode for the repository
Implements Locator_Repository.
Reimplemented in Shared_Backing_Store.
|
protected |
the filename indicated in the Options for the backing store