|
Public Types |
typedef CosNaming::NamingContext::NotFound | NotFound |
typedef CosNaming::NamingContext::CannotProceed | CannotProceed |
typedef CosNaming::NamingContext::InvalidName | InvalidName |
typedef CosNaming::NamingContext::AlreadyBound | AlreadyBound |
typedef CosNaming::NamingContext::NotEmpty | NotEmpty |
typedef CosNaming::NamingContextExt::InvalidAddress | InvalidAddress |
typedef std::vector< CORBA::Object_ptr > | ObjectList |
Public Member Functions |
| CorbaNaming (CORBA::ORB_ptr orb) |
| CorbaNaming (CORBA::ORB_ptr orb, const char *name_server) |
virtual | ~CorbaNaming () |
void | init (const char *name_server) |
void | bind (const CosNaming::Name &name, CORBA::Object_ptr obj, const bool force=1) throw (NotFound, CannotProceed, InvalidName, AlreadyBound) |
void | bindByString (const char *string_name, CORBA::Object_ptr obj, const bool force=1) throw (NotFound, CannotProceed, InvalidName, AlreadyBound) |
void | bindRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj) throw (CannotProceed, InvalidName, AlreadyBound) |
void | rebind (const CosNaming::Name &name, CORBA::Object_ptr obj, const bool force=1) throw (NotFound, CannotProceed, InvalidName) |
void | rebindByString (const char *string_name, CORBA::Object_ptr obj, const bool force=1) throw (NotFound, CannotProceed, InvalidName) |
void | rebindRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj) throw (CannotProceed, InvalidName) |
void | bindContext (const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (NotFound, CannotProceed, InvalidName, AlreadyBound) |
void | bindContext (const char *string_name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (NotFound, CannotProceed, InvalidName, AlreadyBound) |
void | bindContextRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt) |
void | rebindContext (const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (NotFound, CannotProceed, InvalidName) |
void | rebindContext (const char *string_name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (NotFound, CannotProceed, InvalidName) |
void | rebindContextRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt) |
CORBA::Object_ptr | resolve (const CosNaming::Name &name) throw (NotFound, CannotProceed, InvalidName) |
CORBA::Object_ptr | resolve (const char *string_name) throw (NotFound, CannotProceed, InvalidName) |
void | unbind (const CosNaming::Name &name) throw (NotFound, CannotProceed, InvalidName) |
void | unbind (const char *string_name) throw (NotFound, CannotProceed, InvalidName) |
CosNaming::NamingContext_ptr | newContext () |
CosNaming::NamingContext_ptr | bindNewContext (const CosNaming::Name &name, bool force=true) throw (NotFound, CannotProceed, InvalidName, AlreadyBound) |
CosNaming::NamingContext_ptr | bindNewContext (const char *string_name, bool force=true) throw (NotFound, CannotProceed, InvalidName, AlreadyBound) |
void | destroy (CosNaming::NamingContext_ptr context) throw (NotEmpty) |
| Destroy the naming context.
|
void | destroyRecursive (CosNaming::NamingContext_ptr context) throw (NotEmpty, NotFound, CannotProceed, InvalidName) |
| Destroy the naming context recursively.
|
void | clearAll () |
| Destroy all binding.
|
void | list (CosNaming::NamingContext_ptr name_cxt, unsigned long how_many, CosNaming::BindingList_var &bl, CosNaming::BindingIterator_var &bi) |
| Get Binding on the NamingContextDestroy all binding.
|
char * | toString (const CosNaming::Name &name) throw (InvalidName) |
| Get string representation of given NameComponent.
|
CosNaming::Name | toName (const char *string_name) throw (InvalidName) |
| Get NameComponent from gien string name representation.
|
char * | toUrl (char *addr, char *string_name) throw (InvalidAddress, InvalidName) |
| Get URL representation from given addr and string_name.
|
CORBA::Object_ptr | resolveStr (const char *string_name) throw (NotFound, CannotProceed, InvalidName, AlreadyBound) |
| Resolve from name of string representation and get object.
|
CORBA::Object_ptr | bindOrResolve (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj) |
| Bind of resolve the given name component.
|
CosNaming::NamingContext_ptr | bindOrResolveContext (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr new_context) |
| Bind of resolve the given name component.
|
CosNaming::NamingContext_ptr | bindOrResolveContext (CosNaming::NamingContext_ptr context, const CosNaming::Name &name) |
| Bind of resolve the given name component.
|
const char * | getNameServer () |
| Get the name of naming server.
|
CosNaming::NamingContext_ptr | getRootContext () |
| Get the root context.
|
bool | isNamingContext (CORBA::Object_ptr obj) |
| Whether the object is NamingContext.
|
bool | isNamingContext (const CosNaming::Name &name) |
| Whether the given name component is NamingContext.
|
bool | isNamingContext (const char *string_name) |
| Whether the given string name is NamingContext.
|
CosNaming::Name | subName (const CosNaming::Name &name, long begin, long end=-1) |
| Get subset of given name component.
|
Protected Member Functions |
void | nameToString (const CosNaming::Name &name, char *string_name, unsigned long slen) |
| Get string representation of name component.
|
CORBA::ULong | getNameLength (const CosNaming::Name &name) |
| Get string length of the name component's string representation.
|
unsigned int | split (const std::string &input, const std::string &delimiter, std::vector< std::string > &results) |
| Split of string.
|
Protected Attributes |
CORBA::ORB_var | m_varORB |
std::string | m_nameServer |
CosNaming::NamingContextExt_var | m_rootContext |
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.