Public Methods |
| TAO_Naming_Server (void) |
| Default constructor. More...
|
| TAO_Naming_Server (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, size_t context_size=ACE_DEFAULT_MAP_SIZE, ACE_Time_Value *timeout=0, int resolve_for_existing_naming_service=1, const ACE_TCHAR *persistence_location=0, void *base_addr=TAO_NAMING_BASE_ADDR, int enable_multicast=1, int use_storable_context=0) |
int | init (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, size_t context_size=ACE_DEFAULT_MAP_SIZE, ACE_Time_Value *timeout=0, int resolve_for_existing_naming_service=1, const ACE_TCHAR *persistence_location=0, void *base_addr=TAO_NAMING_BASE_ADDR, int enable_multicast=1, int use_storable_context=0) |
int | init_with_orb (int argc, ACE_TCHAR *argv[], CORBA::ORB_ptr orb) |
| Initialize the Naming Service with the command line arguments and the ORB. More...
|
int | fini (void) |
| Destroy the child POA created in <init_with_orb>. More...
|
| ~TAO_Naming_Server (void) |
| Destructor. More...
|
char * | naming_service_ior (void) |
| Returns the IOR of the naming service. More...
|
CosNaming::NamingContext_ptr | operator-> (void) const |
| Returns a <NamingContext_ptr> for the root Naming Context. More...
|
Protected Methods |
int | init_new_naming (CORBA::ORB_ptr orb, PortableServer::POA_ptr root_poa, const ACE_TCHAR *persistence_location, void *base_addr, size_t context_size, int enable_multicast, int use_storable_context) |
int | parse_args (int argc, ACE_TCHAR *argv[]) |
| parses the arguments. More...
|
Protected Attributes |
CosNaming::NamingContext_var | naming_context_ |
| Root NamingContext_ptr. More...
|
TAO_IOR_Multicast * | ior_multicast_ |
| The ior_multicast event handler. More...
|
CORBA::String_var | naming_service_ior_ |
| The IOR string of the root naming context. More...
|
TAO_Persistent_Context_Index * | context_index_ |
CORBA::ORB_var | orb_ |
| The ORB. More...
|
PortableServer::POA_var | root_poa_ |
| The Root POA. More...
|
PortableServer::POA_var | ns_poa_ |
| The Naming Service POA. More...
|
FILE * | ior_output_file_ |
| File to output the Naming Service IOR. More...
|
const ACE_TCHAR * | pid_file_name_ |
| File to output the process id. More...
|
size_t | context_size_ |
const ACE_TCHAR * | persistence_file_name_ |
| Path to the file to be used to store/read in Naming Service persistent state. More...
|
void * | base_address_ |
| Address to be used for memory mapping Naming Service state file, identified by the <persistence_file_name_>. More...
|
size_t | time_ |
| After how long the server should stop listening to requests (in seconds). More...
|
int | multicast_ |
| If not zero multicast is enabled. More...
|
int | use_storable_context_ |
| If not zero use flat file persistence. More...
|
This class either finds an existing Naming Service (if the <resolve_for_existing_naming_service> flag is set) or creates one (if <resolve_for_existing_naming_service> flag isn't set or Naming Service was not found). This class also defines the operator-> so that <NamingContext> functions like <bind>, <unbind> .. can be called directly on a <TAO_Naming_Server> object, and be forwareded to the root Naming Context. This class is intended to simplify programs that want to play the role of a Naming Service server. To simplify programs that want to play the role of Naming Service clients, use <TAO_Naming_Client>. If a Naming Service is created locally, a TAO_IOR_Multicast event handler is created and installed on the ORB's reactor. This event handler allows other clients on the network to discover and use this Naming Service. Event handler listens on a multicast port for messages from clients looking for a Naming Service, and sends back the ior of the root Naming Context. For more information on how this bootstraping through a multicast process works, check out orbsvcs/orbsvcs/TAO_IOR_Multicast.*, implementation of <resolve_initial_references>, and orbsvcs/Naming/README.