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 |
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.
Definition at line 89 of file CorbaNaming.h.
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.
CorbaNaming::CorbaNaming | ( | CORBA::ORB_ptr | orb | ) |
CorbaNaming::CorbaNaming | ( | CORBA::ORB_ptr | orb, |
const char * | name_server | ||
) |
Consructor.
Constructor.
orb | ORB |
name_server | Name of the name server |
Definition at line 51 of file CorbaNaming.cpp.
|
inlinevirtual |
Virtual destructor.
Definition at line 139 of file CorbaNaming.h.
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.
name | NameComponent of name applied to object |
obj | Object that is associated |
force | If true, the intermediate context is bound forcibly. (The default value:true) |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The argument 'name' is invalid. |
AlreadyBound | The 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.
string_name | The string representation of name applied to object |
obj | Object that is associated |
force | If true, the intermediate context is bound forcibly. (The default value:true) |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The argument 'name' is invalid. |
AlreadyBound | The 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.
name | NameComponent of name applied to object |
name_cxt | Object that is associated |
force | If true, the intermediate context is bound forcibly. (The default value:true) |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The argument 'name' is invalid. |
AlreadyBound | The 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.
string_name | String representation of name applied to object |
name_cxt | NamingContext that is associated |
force | If true, the intermediate context is bound forcibly. (The default value:true) |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The argument 'name' is invalid. |
AlreadyBound | The 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.
context | NamingContext that starts the bind |
name | NameComponent of name applied to object |
name_cxt | NamingContext 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.
name | NameComponent applied to NamingContext |
force | If true, the intermediate context is bound forcibly. (The default value:true) |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The argument 'name' is invalid. |
AlreadyBound | The 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.
string_name | The string representation of name applied to NamingContext |
force | If true, the intermediate context is bound forcibly. (The default value:true) |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The argument 'name' is invalid. |
AlreadyBound | The 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.
context | The context to bind or resole |
name | NameComponent applied to object |
obj | Object that is associated |
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.
context | The context to bind or resole |
name | NameComponent applied to object |
new_context | Context that is associated |
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.
context | The context to bind or resole |
name | NameComponent that indicates the position of new context |
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.
context | NamingContext that starts the bind |
name | NameComponent of name applied to object |
obj | Object that is associated |
CannotProceed | Since one of NamingContext corresponding to <c_1, ..., c_(n-1)> is already bound to object other than NamingContext and processing cannot be continued |
InvalidName | name 'name' is invalid. |
AlreadyBound | The 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.
context | NamingContext which is destroied. |
NotEmpty | The 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.
context | NamingContext which is Destroied. |
NotEmpty | The target context is bound to the other context. |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The argument 'name' is invalid. |
Definition at line 491 of file CorbaNaming.cpp.
|
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.
name | The getting target NameComponent |
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
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
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.
name_server | Name 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
obj | The target element for determination |
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
name | The target NameComponent for determination |
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
string_name | The string representation for determination |
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.
name_cxt | NamingContext of the getting target Binding |
how_many | The depth to get Binding |
bl | The holder to hold the got Binding |
bi | The iterator to detect the got Binding |
Definition at line 558 of file CorbaNaming.cpp.
|
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.
name | The getting target NameComponent |
string_name | The string of getting result |
slen | The 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.
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.
name | NameComponent of name applied to object |
obj | Object that is associated |
force | If true, the intermediate context is bound forcibly. (The default value:true) |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | Name '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.
string_name | NameComponent of name applied to object |
obj | Object that is associated |
force | If true, the intermediate context is bound forcibly. (The default value:true) |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The 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.
name | NameComponent applied to object |
name_cxt | Object that is associated |
force | If true, the intermediate context is bound forcibly. (The default value:true) |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | the 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.
string_name | String representation of name applied to object |
name_cxt | NamingContext that is associated |
force | If true, the intermediate context is bound forcibly. (The default value:true) |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The 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.
context | NamingContext that starts the bind |
name | NameComponent applied to object |
name_cxt | NamingContext 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.
context | NamingContext that starts the bind |
name | NameComponent of name applied to object |
obj | Object that is associated |
CannotProceed | The intermediate context cannot resolved. |
InvalidName | The 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.
name | The name component of object name that should be resolved |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The 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.
string_name | The string representation of object name that should be resolved |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The 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
string_name | The string representation of getting target object |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The argument 'name' is invalid. |
AlreadyBound | The object of name<n> is already bound. |
Definition at line 664 of file CorbaNaming.cpp.
|
protected |
Split of string.
Split string with specified delimiter.
input | The split target string |
delimiter | The delimiter for split |
results | Split result |
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.
name | The target NameComponent for search |
begin | The beginning position for getting range |
end | The end position for getting range (The default value:-1) |
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.
string_name | The target string representation to transform |
InvalidName | The 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.
name | The target NameComponent for transformation |
InvalidName | The 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
addr | The target address for conversion |
string_name | The target name for conversion |
InvalidAddress | The argument 'addr' is invalid. |
InvalidName | The 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.
name | The name component of the deleted object |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The 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.
string_name | The string representation of object name that should be resolved |
NotFound | There is not <c_1, c_2, ..., c_(n-1)>. |
CannotProceed | Processing cannot be continued for some reasons. |
InvalidName | The argument 'name' is invalid. |
Definition at line 408 of file CorbaNaming.cpp.
|
private |
Definition at line 1616 of file CorbaNaming.h.
|
protected |
Name of the name server.
Definition at line 1605 of file CorbaNaming.h.
|
protected |
The root context of specified name server.
Definition at line 1613 of file CorbaNaming.h.
|
protected |
ORB.
Definition at line 1596 of file CorbaNaming.h.