org::xmlBlaster::client::protocol::corba::NameServerControl Class Reference

Class NameServerControl is used to encapsulate methods to access a Name Server (like binding, unbinding, name resolving. More...

Collaboration diagram for org::xmlBlaster::client::protocol::corba::NameServerControl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 NameServerControl (CORBA::ORB_ptr orb, std::string sep1="/", std::string sep2=".")
 This contructor takes the orb (which must be a valid orb) and two std::string separators.
 NameServerControl (CosNaming::NamingContext_var &relativeContext, std::string sep1="/", std::string sep2=".")
 
Parameters:
relativeContext A relative context in the name service

CORBA::Object_ptr resolve (const std::string &name)
 
Parameters:
name of type "xmlBlaster.MOM/heron.MOM" sep1="/", sep2="."

CORBA::Object_ptr resolve (CosNaming::Name &nameComponent)
 Used to resolve a given name.
CORBA::Object_ptr resolve (const std::string &id, const std::string &kind)
 
Parameters:
id For example "xmlBlaster"

CosNaming::NamingContext_ptr getNamingService ()
 Returns the naming service reference Caller needs to free instance (typically by assigning it to a _var).

Static Public Member Functions

static std::string getString (CosNaming::Name nameComponent, std::string sep1="/", std::string sep2=".")
 Creates a std::string representation of a NameService name hierarchy.
static std::string getString (const std::string &id, const std::string &kind, std::string sep2=".")
 Creates a std::string representation of a NameService name hierarchy.

Detailed Description

Class NameServerControl is used to encapsulate methods to access a Name Server (like binding, unbinding, name resolving.

..). It is a helper which makes such accesses easier (and less exceptions to take care of).

Definition at line 36 of file NameServerControl.h.


Constructor & Destructor Documentation

org::xmlBlaster::client::protocol::corba::NameServerControl::NameServerControl ( CORBA::ORB_ptr  orb,
std::string  sep1 = "/",
std::string  sep2 = "." 
)

This contructor takes the orb (which must be a valid orb) and two std::string separators.

It retrieves a reference to the NameServer sep1: is the main separator, i.e. which separates the names from each other. sep2: is the std::string which separates the name (or id) from the kind

Definition at line 55 of file NameServerControl.h.

References to_string().

org::xmlBlaster::client::protocol::corba::NameServerControl::NameServerControl ( CosNaming::NamingContext_var &  relativeContext,
std::string  sep1 = "/",
std::string  sep2 = "." 
)

Parameters:
relativeContext A relative context in the name service

See also:
Other constructor

Definition at line 97 of file NameServerControl.h.


Member Function Documentation

CORBA::Object_ptr org::xmlBlaster::client::protocol::corba::NameServerControl::resolve ( const std::string &  name  ) 

Parameters:
name of type "xmlBlaster.MOM/heron.MOM" sep1="/", sep2="."

Returns:
never CORBA::nil
Exceptions:
On problems or if reference is nil
See also:
resolve(CosNaming::Name &)

Definition at line 107 of file NameServerControl.h.

Referenced by org::xmlBlaster::client::protocol::corba::CorbaConnection::initAuthenticationService().

CORBA::Object_ptr org::xmlBlaster::client::protocol::corba::NameServerControl::resolve ( CosNaming::Name &  nameComponent  ) 

Used to resolve a given name.

Returns a reference to the object if an object with the given name exists. Otherwise returns zero. The caller is responsible to free the pointer.

Parameters:
nameComponent 
Returns:
never CORBA::nil, you need to free it!
Exceptions:
On problems or if reference is nil

Definition at line 128 of file NameServerControl.h.

References getString(), and to_string().

CORBA::Object_ptr org::xmlBlaster::client::protocol::corba::NameServerControl::resolve ( const std::string &  id,
const std::string &  kind 
)

Parameters:
id For example "xmlBlaster"

Parameters:
kind For example "MOM"
Returns:
never CORBA::nil
See also:
resolve(CosNaming::Name &)

Definition at line 163 of file NameServerControl.h.

CosNaming::NamingContext_ptr org::xmlBlaster::client::protocol::corba::NameServerControl::getNamingService (  ) 

Returns the naming service reference Caller needs to free instance (typically by assigning it to a _var).

Definition at line 175 of file NameServerControl.h.

static std::string org::xmlBlaster::client::protocol::corba::NameServerControl::getString ( CosNaming::Name  nameComponent,
std::string  sep1 = "/",
std::string  sep2 = "." 
) [static]

Creates a std::string representation of a NameService name hierarchy.

This is useful for logging

Returns:
e.g. "xmlBlaster.MOM/heron.MOM"

Definition at line 184 of file NameServerControl.h.

Referenced by org::xmlBlaster::client::protocol::corba::CorbaConnection::initAuthenticationService(), and resolve().

static std::string org::xmlBlaster::client::protocol::corba::NameServerControl::getString ( const std::string &  id,
const std::string &  kind,
std::string  sep2 = "." 
) [static]

Creates a std::string representation of a NameService name hierarchy.

This is useful for logging

Parameters:
id "xmlBlaster"
kind "MOM"
Returns:
e.g. "xmlBlaster.MOM" with sep2_=="."

Definition at line 204 of file NameServerControl.h.


The documentation for this class was generated from the following file: