Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
RTC::CorbaNaming Class Reference

CORBA Naming Service helper class. More...

#include <CorbaNaming.h>

Public Types

typedef CosNaming::NamingContext::AlreadyBound AlreadyBound
 
typedef CosNaming::NamingContext::CannotProceed CannotProceed
 
typedef CosNaming::NamingContextExt::InvalidAddress InvalidAddress
 
typedef CosNaming::NamingContext::InvalidName InvalidName
 
typedef CosNaming::NamingContext::NotEmpty NotEmpty
 
typedef CosNaming::NamingContext::NotFound NotFound
 
typedef std::vector< CORBA::Object_ptr > ObjectList
 
typedef CORBA::SystemException SystemException
 

Public Member Functions

void bind (const CosNaming::Name &name, CORBA::Object_ptr obj, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Bind object on specified name component position. More...
 
void bindByString (const char *string_name, CORBA::Object_ptr obj, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Bind object on specified string name position. More...
 
void bindContext (const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Bind NamingContext. More...
 
void bindContext (const char *string_name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Bind NamingContext. More...
 
void bindContextRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt)
 Bind intermediate context recursively and bind NamingContext. More...
 
CosNaming::NamingContext_ptr bindNewContext (const CosNaming::Name &name, bool force=true) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Bind new NamingContext. More...
 
CosNaming::NamingContext_ptr bindNewContext (const char *string_name, bool force=true) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Bind new NamingContext. More...
 
CORBA::Object_ptr bindOrResolve (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj)
 Bind or resolve the given name component. More...
 
CosNaming::NamingContext_ptr bindOrResolveContext (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr new_context)
 Bind or resolve the given name component. More...
 
CosNaming::NamingContext_ptr bindOrResolveContext (CosNaming::NamingContext_ptr context, const CosNaming::Name &name)
 Bind or resolve the given name component. More...
 
void bindRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj) throw (SystemException, CannotProceed, InvalidName, AlreadyBound)
 Bind intermediate context recursively and bind object. More...
 
void clearAll ()
 Destroy all bindings. More...
 
 CorbaNaming (CORBA::ORB_ptr orb)
 Consructor. More...
 
 CorbaNaming (CORBA::ORB_ptr orb, const char *name_server)
 Consructor. More...
 
void destroy (CosNaming::NamingContext_ptr context) throw (SystemException, NotEmpty)
 Destroy the naming context. More...
 
void destroyRecursive (CosNaming::NamingContext_ptr context) throw (SystemException, NotEmpty, NotFound, CannotProceed, InvalidName)
 Destroy the naming context recursively. More...
 
const char * getNameServer ()
 Get the name of name server. More...
 
CosNaming::NamingContext_ptr getRootContext ()
 Get the root context. More...
 
void init (const char *name_server)
 Initialize the Naming Service. More...
 
bool isAlive ()
 
bool isNamingContext (CORBA::Object_ptr obj)
 Determine whether the object is NamingContext. More...
 
bool isNamingContext (const CosNaming::Name &name)
 Determine whether the given name component is NamingContext. More...
 
bool isNamingContext (const char *string_name)
 Determine whether the given string name is NamingContext. More...
 
void list (CosNaming::NamingContext_ptr name_cxt, CORBA::ULong how_many, CosNaming::BindingList_var &bl, CosNaming::BindingIterator_var &bi)
 Get Binding of the given NamingContext. More...
 
CosNaming::NamingContext_ptr newContext ()
 Create new NamingContext. More...
 
void rebind (const CosNaming::Name &name, CORBA::Object_ptr obj, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Rebind object. More...
 
void rebindByString (const char *string_name, CORBA::Object_ptr obj, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Rebind Object. More...
 
void rebindContext (const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Rebind NamingContext. More...
 
void rebindContext (const char *string_name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Rebind NamingContext. More...
 
void rebindContextRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt)
 Rebind intermediate context recursively and rebind NamingContext. More...
 
void rebindRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj) throw (SystemException, CannotProceed, InvalidName)
 Bind intermediate context recursively and rebind object. More...
 
CORBA::Object_ptr resolve (const CosNaming::Name &name) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Return object bound on the specified NameComponent. More...
 
CORBA::Object_ptr resolve (const char *string_name) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Return object bound on the specified name. More...
 
CORBA::Object_ptr resolveStr (const char *string_name) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Resolve from name of string representation and get object. More...
 
CosNaming::Name subName (const CosNaming::Name &name, CORBA::Long begin, CORBA::Long end=-1)
 Get subset of given name component. More...
 
CosNaming::Name toName (const char *string_name) throw (SystemException, InvalidName)
 Resolve given string representation to NameComponent. More...
 
char * toString (const CosNaming::Name &name) throw (SystemException, InvalidName)
 Get string representation of given NameComponent. More...
 
char * toUrl (char *addr, char *string_name) throw (SystemException, InvalidAddress, InvalidName)
 Get URL representation from given addr and string_name. More...
 
void unbind (const CosNaming::Name &name) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Unbind a binding specified by NameComponent. More...
 
void unbind (const char *string_name) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Unbind a binding specified by string representation. More...
 
virtual ~CorbaNaming (void)
 Virtual destructor. More...
 

Protected Member Functions

CORBA::ULong getNameLength (const CosNaming::Name &name)
 Get string length of the name component's string representation. More...
 
void nameToString (const CosNaming::Name &name, char *string_name, CORBA::ULong slen)
 Get string representation of name component. More...
 
unsigned int split (const std::string &input, const std::string &delimiter, std::vector< std::string > &results)
 Split of string. More...
 

Protected Attributes

std::string m_nameServer
 Name of the name server. More...
 
CosNaming::NamingContextExt_var m_rootContext
 The root context of specified name server. More...
 
CORBA::ORB_var m_varORB
 ORB. More...
 

Private Attributes

CORBA::ULong m_blLength
 

Detailed Description

CORBA Naming Service helper class.

This class is a wrapper class of CosNaming::NamingContext. Almost the same operations which CosNaming::NamingContext has are provided, and some operation allows string naming representation of context and object instead of CosNaming::Name.

The object of the class would connect to a CORBA naming server at the instantiation or immediately after instantiation. After that the object invokes operations to the root context of it. This class realizes forced binding to deep NamingContext, without binding intermediate NamingContexts explicitly.

Since
0.4.0

Definition at line 89 of file CorbaNaming.h.

Member Typedef Documentation

typedef CosNaming::NamingContext::AlreadyBound RTC::CorbaNaming::AlreadyBound

Definition at line 168 of file CorbaNaming.h.

typedef CosNaming::NamingContext::CannotProceed RTC::CorbaNaming::CannotProceed

Definition at line 166 of file CorbaNaming.h.

typedef CosNaming::NamingContextExt::InvalidAddress RTC::CorbaNaming::InvalidAddress

Definition at line 170 of file CorbaNaming.h.

typedef CosNaming::NamingContext::InvalidName RTC::CorbaNaming::InvalidName

Definition at line 167 of file CorbaNaming.h.

typedef CosNaming::NamingContext::NotEmpty RTC::CorbaNaming::NotEmpty

Definition at line 169 of file CorbaNaming.h.

typedef CosNaming::NamingContext::NotFound RTC::CorbaNaming::NotFound

Definition at line 165 of file CorbaNaming.h.

typedef std::vector<CORBA::Object_ptr> RTC::CorbaNaming::ObjectList

Definition at line 171 of file CorbaNaming.h.

typedef CORBA::SystemException RTC::CorbaNaming::SystemException

Definition at line 164 of file CorbaNaming.h.

Constructor & Destructor Documentation

CorbaNaming::CorbaNaming ( CORBA::ORB_ptr  orb)

Consructor.

Constructor.

Parameters
orbORB

Definition at line 37 of file CorbaNaming.cpp.

CorbaNaming::CorbaNaming ( CORBA::ORB_ptr  orb,
const char *  name_server 
)

Consructor.

Constructor.

Parameters
orbORB
name_serverName of the name server

Definition at line 51 of file CorbaNaming.cpp.

virtual RTC::CorbaNaming::~CorbaNaming ( void  )
inlinevirtual

Virtual destructor.

Definition at line 139 of file CorbaNaming.h.

Member Function Documentation

void CorbaNaming::bind ( const CosNaming::Name &  name,
CORBA::Object_ptr  obj,
const bool  force = 1 
)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName,
AlreadyBound
)

Bind object on specified name component position.

Almost the same operation as CosNaming::bind(), but there is a difference that bind() is invoked for the root context of the given name server.

Bind between Name <name> and Object <obj> on this NamingContext. If c_n indicates the n-th of NameComponent, when name consists of n pieces of NameComponent, it is handled as follows.

cxt->bind(<c_1, c_2, ... c_n>, obj) is the same as the following operation. cxt->resolve(<c_1, ... c_(n-1)>)->bind(<c_n>, obj)

In other word, resolve from the first to the (n-1)th context and bind obj as name<n> on the (n-1)th context. NemingContext of <c_1, ... c_(n-1)> for resolving name must be already bound in bindContext() or rebindContext(). If NamingContext of <c_1, ... c_(n-1)> does not exist, NotFound excption will occur.

However, when flag of forced bind is true, even if <c_1, ... c_(n-1)> does not exist, finally obj will be bound to name name <c_n> by binding to the context recursively.

Even in any case, if the object of name<n> (Object or context) is bound on the (n-1)th context, AlreadyBound exception will occur.

Parameters
nameNameComponent of name applied to object
objObject that is associated
forceIf true, the intermediate context is bound forcibly. (The default value:true)
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.
AlreadyBoundThe object of name<c_n> is already bound.

Definition at line 108 of file CorbaNaming.cpp.

void CorbaNaming::bindByString ( const char *  string_name,
CORBA::Object_ptr  obj,
const bool  force = 1 
)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName,
AlreadyBound
)

Bind object on specified string name position.

This is the same as bind() except as the given name is string representation when Object is bound. bind(toName(string_name),obj) is the same.

Parameters
string_nameThe string representation of name applied to object
objObject that is associated
forceIf true, the intermediate context is bound forcibly. (The default value:true)
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.
AlreadyBoundThe object of name<c_n> is already bound.

Definition at line 137 of file CorbaNaming.cpp.

void CorbaNaming::bindContext ( const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  name_cxt,
const bool  force = 1 
)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName,
AlreadyBound
)

Bind NamingContext.

This is the same as bind() except as the bound object is NamingContext.

Parameters
nameNameComponent of name applied to object
name_cxtObject that is associated
forceIf true, the intermediate context is bound forcibly. (The default value:true)
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.
AlreadyBoundThe object of name<c_n> is already bound.

Definition at line 276 of file CorbaNaming.cpp.

void CorbaNaming::bindContext ( const char *  string_name,
CosNaming::NamingContext_ptr  name_cxt,
const bool  force = 1 
)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName,
AlreadyBound
)

Bind NamingContext.

This is the same as bindByString() except as the bound object is NamingContext.

Parameters
string_nameString representation of name applied to object
name_cxtNamingContext that is associated
forceIf true, the intermediate context is bound forcibly. (The default value:true)
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.
AlreadyBoundThe object of name<n> is already bound.

Definition at line 291 of file CorbaNaming.cpp.

void CorbaNaming::bindContextRecursive ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  name_cxt 
)

Bind intermediate context recursively and bind NamingContext.

This is the same as bindRecursive() except as the bound object is NamingContext.

Parameters
contextNamingContext that starts the bind
nameNameComponent of name applied to object
name_cxtNamingContext that is associated

Definition at line 307 of file CorbaNaming.cpp.

CosNaming::NamingContext_ptr CorbaNaming::bindNewContext ( const CosNaming::Name &  name,
bool  force = true 
)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName,
AlreadyBound
)

Bind new NamingContext.

Bind new context for the given name. The created NamingContext is a creation on the name server.

Parameters
nameNameComponent applied to NamingContext
forceIf true, the intermediate context is bound forcibly. (The default value:true)
Returns
New created NamingContext
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.
AlreadyBoundThe object of name<n> is already bound.

pbrief Bind new namingContext

Definition at line 434 of file CorbaNaming.cpp.

CosNaming::NamingContext_ptr CorbaNaming::bindNewContext ( const char *  string_name,
bool  force = true 
)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName,
AlreadyBound
)

Bind new NamingContext.

Bind new context corresponding to the given string. The created NamingContext is a creation on the name server.

Parameters
string_nameThe string representation of name applied to NamingContext
forceIf true, the intermediate context is bound forcibly. (The default value:true)
Returns
New created NamingContext
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.
AlreadyBoundThe object of name<n> is already bound.

pbrief Bind new namingContext

Definition at line 465 of file CorbaNaming.cpp.

CORBA::Object_ptr CorbaNaming::bindOrResolve ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CORBA::Object_ptr  obj 
)

Bind or resolve the given name component.

Bind object at the position that specified in NameComponent for the specified context. When other elements are already bound at the same position, get the already bound element.

Parameters
contextThe context to bind or resole
nameNameComponent applied to object
objObject that is associated
Returns
The object that is bound at position specified with NameComponent

Definition at line 681 of file CorbaNaming.cpp.

CosNaming::NamingContext_ptr CorbaNaming::bindOrResolveContext ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  new_context 
)

Bind or resolve the given name component.

Bind Context at the position that specified in NameComponent for the specified context. When other elements are already bound at the same position, get the already bound element.

Parameters
contextThe context to bind or resole
nameNameComponent applied to object
new_contextContext that is associated
Returns
The Context that is bound at the position specified with NameComponent

Definition at line 706 of file CorbaNaming.cpp.

CosNaming::NamingContext_ptr CorbaNaming::bindOrResolveContext ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name 
)

Bind or resolve the given name component.

Bind new Context at the position that specified in NameComponent for the specified context. When other elements are already bound at the same position, get the already bound element.

Parameters
contextThe context to bind or resole
nameNameComponent that indicates the position of new context
Returns
The Context that is bound at the position specified with NameComponent

Definition at line 722 of file CorbaNaming.cpp.

void CorbaNaming::bindRecursive ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CORBA::Object_ptr  obj 
)
throw (SystemException,
CannotProceed,
InvalidName,
AlreadyBound
)

Bind intermediate context recursively and bind object.

For NamingContext given in context, bind obj to name <c_n> with solving name component <c_1, ... c_(n-1)> specified by name as NamingContext. Bind new NamingContext when there is no NamingContext corresponding to c_(n-1) >.

Finally, NamingContext corresponding to <c_1, c_2, ..., c_(n-1)> will be generated, or CosNaming::bind(<c_n>, object) will be invoked after solving. At this time, if the binding already exists, the AlreadyBound exception will occur.

During process, when Binding that is not NamingContext of the same name as the context for solving exists, CannotProceed exception will occur and stop processing.

Parameters
contextNamingContext that starts the bind
nameNameComponent of name applied to object
objObject that is associated
Exceptions
CannotProceedSince one of NamingContext corresponding to <c_1, ..., c_(n-1)> is already bound to object other than NamingContext and processing cannot be continued
InvalidNamename 'name' is invalid.
AlreadyBoundThe object of name<c_n> is already bound.

Definition at line 151 of file CorbaNaming.cpp.

void CorbaNaming::clearAll ( )

Destroy all bindings.

Destroy all bindings that are registered.

Definition at line 546 of file CorbaNaming.cpp.

void CorbaNaming::destroy ( CosNaming::NamingContext_ptr  context)
throw (SystemException,
NotEmpty
)

Destroy the naming context.

Destroy the specified naming context. Any bindings should be <unbind> in which the given context is bound to some names before invoking <destroy> operation on it.

Parameters
contextNamingContext which is destroied.
Exceptions
NotEmptyThe target context is bound to the other context.

Definition at line 478 of file CorbaNaming.cpp.

void CorbaNaming::destroyRecursive ( CosNaming::NamingContext_ptr  context)
throw (SystemException,
NotEmpty,
NotFound,
CannotProceed,
InvalidName
)

Destroy the naming context recursively.

For NamingContext given by Context, Destroy name <c_n> with solving the name component specified by name as NamingContext recursively.

Parameters
contextNamingContext which is Destroied.
Exceptions
NotEmptyThe target context is bound to the other context.
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.

Definition at line 491 of file CorbaNaming.cpp.

CORBA::ULong CorbaNaming::getNameLength ( const CosNaming::Name &  name)
protected

Get string length of the name component's string representation.

Get string length of the name component's string representation. In string representation, if NameComponent consists of {Nc[0],Nc[1],Nc[2]Ž₯Ž₯Ž₯}, the format of Nc[0]id.Nc[0].kind/Nc[1]id.Nc[1].kind/Nc[2].id/Nc[2].kindŽ₯Ž₯Ž₯ will be got.

Parameters
nameThe getting target NameComponent
Returns
The string length value of specified component

Definition at line 869 of file CorbaNaming.cpp.

const char * CorbaNaming::getNameServer ( )

Get the name of name server.

Get the name of naming server.

Get the configured name of name server

Returns
The name of name server

Definition at line 735 of file CorbaNaming.cpp.

CosNaming::NamingContext_ptr CorbaNaming::getRootContext ( )

Get the root context.

Get the root context of the configured name server

Returns
Root context ot name server

Definition at line 747 of file CorbaNaming.cpp.

void CorbaNaming::init ( const char *  name_server)

Initialize the Naming Service.

Initialize the Naming Service on the specified name server.

Parameters
name_serverName of the name server

Definition at line 77 of file CorbaNaming.cpp.

bool CorbaNaming::isAlive ( )

Definition at line 87 of file CorbaNaming.cpp.

bool CorbaNaming::isNamingContext ( CORBA::Object_ptr  obj)

Determine whether the object is NamingContext.

Determine whether the specified element is NamingContext

Parameters
objThe target element for determination
Returns
Determination result (NamingContext:true, Else:false)

Definition at line 759 of file CorbaNaming.cpp.

bool CorbaNaming::isNamingContext ( const CosNaming::Name &  name)

Determine whether the given name component is NamingContext.

Determine whether the specified element is NameComponent

Parameters
nameThe target NameComponent for determination
Returns
Determination result (NamingContext:true, Else:false)

Definition at line 773 of file CorbaNaming.cpp.

bool CorbaNaming::isNamingContext ( const char *  string_name)

Determine whether the given string name is NamingContext.

Determine whether the element specified by string name is NamingContext

Parameters
string_nameThe string representation for determination
Returns
Determination result (NamingContext:true, Else:false)

Definition at line 785 of file CorbaNaming.cpp.

void CorbaNaming::list ( CosNaming::NamingContext_ptr  name_cxt,
CORBA::ULong  how_many,
CosNaming::BindingList_var &  bl,
CosNaming::BindingIterator_var &  bi 
)

Get Binding of the given NamingContext.

Get Binding on the given NamingContext.

Get Binding of the given NamingContext.

Parameters
name_cxtNamingContext of the getting target Binding
how_manyThe depth to get Binding
blThe holder to hold the got Binding
biThe iterator to detect the got Binding

Definition at line 558 of file CorbaNaming.cpp.

void CorbaNaming::nameToString ( const CosNaming::Name &  name,
char *  string_name,
CORBA::ULong  slen 
)
protected

Get string representation of name component.

Get string representation of the name component in specified range. In string representation, if NameComponent consists of {Nc[0],Nc[1],Nc[2]...}, the format of Nc[0]id.Nc[0].kind/Nc[1]id.Nc[1].kind/Nc[2].id/Nc[2].kind... will be got. It is rounded by the specified length when the length of the got string is over the specified length.

Parameters
nameThe getting target NameComponent
string_nameThe string of getting result
slenThe maximum length value of getting string

Definition at line 832 of file CorbaNaming.cpp.

CosNaming::NamingContext_ptr CorbaNaming::newContext ( )

Create new NamingContext.

Return NamingContext that has been created on the given name server. The returned NamingContext has not bound yet.

Returns
New created NamingContext

Definition at line 421 of file CorbaNaming.cpp.

void CorbaNaming::rebind ( const CosNaming::Name &  name,
CORBA::Object_ptr  obj,
const bool  force = 1 
)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName
)

Rebind object.

This is the same as bind() except as Binding specified by name already exists. If the binding already exists, new binding will be replaced.

Parameters
nameNameComponent of name applied to object
objObject that is associated
forceIf true, the intermediate context is bound forcibly. (The default value:true)
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameName 'name' is invalid.

Definition at line 185 of file CorbaNaming.cpp.

void CorbaNaming::rebindByString ( const char *  string_name,
CORBA::Object_ptr  obj,
const bool  force = 1 
)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName
)

Rebind Object.

Rebind object.

This is the same as rebind() except as the given name is string representation when object is rebound. rebind(toName(string_name), obj) is the same.

Parameters
string_nameNameComponent of name applied to object
objObject that is associated
forceIf true, the intermediate context is bound forcibly. (The default value:true)
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.

Definition at line 215 of file CorbaNaming.cpp.

void CorbaNaming::rebindContext ( const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  name_cxt,
const bool  force = 1 
)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName
)

Rebind NamingContext.

This is the same as bindContext() except as context specified by name already exists. If the binding already exists, new binding will be replaced.

Parameters
nameNameComponent applied to object
name_cxtObject that is associated
forceIf true, the intermediate context is bound forcibly. (The default value:true)
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNamethe argument 'name' is invalid.

Definition at line 322 of file CorbaNaming.cpp.

void CorbaNaming::rebindContext ( const char *  string_name,
CosNaming::NamingContext_ptr  name_cxt,
const bool  force = 1 
)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName
)

Rebind NamingContext.

This is the same as bindContext() except as context specified by name already exists. If the binding already exists, new binding will be replaced.

Parameters
string_nameString representation of name applied to object
name_cxtNamingContext that is associated
forceIf true, the intermediate context is bound forcibly. (The default value:true)
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.

Definition at line 338 of file CorbaNaming.cpp.

void CorbaNaming::rebindContextRecursive ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  name_cxt 
)

Rebind intermediate context recursively and rebind NamingContext.

This is the same as rebindRecursive() except as the bound object is NamingContext.

Parameters
contextNamingContext that starts the bind
nameNameComponent applied to object
name_cxtNamingContext that is associated

Definition at line 354 of file CorbaNaming.cpp.

void CorbaNaming::rebindRecursive ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CORBA::Object_ptr  obj 
)
throw (SystemException,
CannotProceed,
InvalidName
)

Bind intermediate context recursively and rebind object.

This is the same as bindRecursive() except as NamingContext or Object specified by name <c_n> already exists.

If the binding specified by name <c_n> already exists, new binding will be replaced.

Parameters
contextNamingContext that starts the bind
nameNameComponent of name applied to object
objObject that is associated
Exceptions
CannotProceedThe intermediate context cannot resolved.
InvalidNameThe given name is invalid.

Definition at line 230 of file CorbaNaming.cpp.

CORBA::Object_ptr CorbaNaming::resolve ( const CosNaming::Name &  name)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName
)

Return object bound on the specified NameComponent.

Return the object reference that is bound to name. Resolve the name component<c_1, c_2, ... c_n> recursively.

Almost the same operation as CosNaming::resolve(), but there is a difference that resolve() is invoked for the root context of the given name server.

Parameters
nameThe name component of object name that should be resolved
Returns
The reference to the resolved object
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.

Definition at line 369 of file CorbaNaming.cpp.

CORBA::Object_ptr CorbaNaming::resolve ( const char *  string_name)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName
)

Return object bound on the specified name.

Return the object reference that is bound to name. Resolve the name component<c_1, c_2, ... c_n> recursively.

Almost the same operation as CosNaming::resolve(), but there is a difference that resolve() is invoked for the root context of the given name server.

Parameters
string_nameThe string representation of object name that should be resolved
Returns
The reference to the resolved object
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.

Definition at line 382 of file CorbaNaming.cpp.

CORBA::Object_ptr CorbaNaming::resolveStr ( const char *  string_name)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName,
AlreadyBound
)

Resolve from name of string representation and get object.

Resolve specified string representation and get object

Parameters
string_nameThe string representation of getting target object
Returns
The resolved object
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.
AlreadyBoundThe object of name<n> is already bound.

Definition at line 664 of file CorbaNaming.cpp.

unsigned int CorbaNaming::split ( const std::string &  input,
const std::string &  delimiter,
std::vector< std::string > &  results 
)
protected

Split of string.

Split string with specified delimiter.

Parameters
inputThe split target string
delimiterThe delimiter for split
resultsSplit result
Returns
The number of split string elements

Definition at line 907 of file CorbaNaming.cpp.

CosNaming::Name CorbaNaming::subName ( const CosNaming::Name &  name,
CORBA::Long  begin,
CORBA::Long  end = -1 
)

Get subset of given name component.

Get the name component in specified range. Return the name component except the last element if the end position is not specified.

Parameters
nameThe target NameComponent for search
beginThe beginning position for getting range
endThe end position for getting range (The default value:-1)
Returns
NameComponent Getting result

Definition at line 797 of file CorbaNaming.cpp.

CosNaming::Name CorbaNaming::toName ( const char *  string_name)
throw (SystemException,
InvalidName
)

Resolve given string representation to NameComponent.

Transform given string representation to NameComponent.

Parameters
string_nameThe target string representation to transform
Returns
NameComponent The result of transformation
Exceptions
InvalidNameThe argument 'name' is invalid.

Definition at line 601 of file CorbaNaming.cpp.

char * CorbaNaming::toString ( const CosNaming::Name &  name)
throw (SystemException,
InvalidName
)

Get string representation of given NameComponent.

Transform specified NameComponent into string representation.

Parameters
nameThe target NameComponent for transformation
Returns
Trnasformation result of string representation
Exceptions
InvalidNameThe argument 'name' is invalid.

Definition at line 579 of file CorbaNaming.cpp.

char * CorbaNaming::toUrl ( char *  addr,
char *  string_name 
)
throw (SystemException,
InvalidAddress,
InvalidName
)

Get URL representation from given addr and string_name.

Convert specified addr and string_name into URL

Parameters
addrThe target address for conversion
string_nameThe target name for conversion
Returns
URL Conversion result
Exceptions
InvalidAddressThe argument 'addr' is invalid.
InvalidNameThe argument 'string_name' is invalid.

Definition at line 651 of file CorbaNaming.cpp.

void CorbaNaming::unbind ( const CosNaming::Name &  name)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName
)

Unbind a binding specified by NameComponent.

Return the object reference that is bound to name. Resolve the name component<c_1, c_2, ... c_n> recursively.

Almost the same operation as CosNaming::unbind(), but there is a difference that unbind() is invoked for the root context of the always given name server.

Parameters
nameThe name component of the deleted object
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.

Definition at line 395 of file CorbaNaming.cpp.

void CorbaNaming::unbind ( const char *  string_name)
throw (SystemException,
NotFound,
CannotProceed,
InvalidName
)

Unbind a binding specified by string representation.

Unbind a binding specified by NameComponent.

Return the object reference that is bound to name. Resolve the name component<c_1, c_2, ... c_n> recursively.

Almost the same operation as CosNaming::unbind(), but there is a difference that unbind() is invoked for the root context of the always given name server.

Parameters
string_nameThe string representation of object name that should be resolved
Returns
The resolved object reference
Exceptions
NotFoundThere is not <c_1, c_2, ..., c_(n-1)>.
CannotProceedProcessing cannot be continued for some reasons.
InvalidNameThe argument 'name' is invalid.

Definition at line 408 of file CorbaNaming.cpp.

Member Data Documentation

CORBA::ULong RTC::CorbaNaming::m_blLength
private

Definition at line 1616 of file CorbaNaming.h.

std::string RTC::CorbaNaming::m_nameServer
protected

Name of the name server.

Definition at line 1605 of file CorbaNaming.h.

CosNaming::NamingContextExt_var RTC::CorbaNaming::m_rootContext
protected

The root context of specified name server.

Definition at line 1613 of file CorbaNaming.h.

CORBA::ORB_var RTC::CorbaNaming::m_varORB
protected

ORB.

Definition at line 1596 of file CorbaNaming.h.


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


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Jun 10 2019 14:08:03