TAO_CosNaming  2.0.8
Classes | Public Types | Public Member Functions
CosNaming::NamingContext Interface Reference

Interface for managing name bindings and naming contexts. More...

import "CosNaming.idl";

Inheritance diagram for CosNaming::NamingContext:
Inheritance graph
[legend]

List of all members.

Classes

exception  AlreadyBound
exception  CannotProceed
exception  InvalidName
exception  NotEmpty
 Indicates that the context is not empty. More...
exception  NotFound
 Indicates that the name does not identify a binding. More...

Public Types

enum  NotFoundReason { missing_node, not_context, not_object }

Public Member Functions

void bind (in Name n, in Object obj) raises (NotFound, CannotProceed, InvalidName, AlreadyBound)
void rebind (in Name n, in Object obj) raises (NotFound, CannotProceed, InvalidName)
void bind_context (in Name n, in NamingContext nc) raises (NotFound, CannotProceed, InvalidName, AlreadyBound)
void rebind_context (in Name n, in NamingContext nc) raises (NotFound, CannotProceed, InvalidName)
Object resolve (in Name n) raises (NotFound, CannotProceed, InvalidName)
void unbind (in Name n) raises (NotFound, CannotProceed, InvalidName)
NamingContext new_context ()
NamingContext bind_new_context (in Name n) raises (NotFound, AlreadyBound, CannotProceed, InvalidName)
void destroy () raises (NotEmpty)
void list (in unsigned long how_many, out BindingList bl, out BindingIterator bi)

Detailed Description

Interface for managing name bindings and naming contexts.


Member Enumeration Documentation

Enumerator:
missing_node 
not_context 
not_object 

Member Function Documentation

void CosNaming::NamingContext::bind ( in Name  n,
in Object  obj 
) raises (NotFound, CannotProceed, InvalidName, AlreadyBound)

Create a binding for name <n> and object <obj> in the naming context. Compound names are treated as follows: ctx->bind (<c1; c2; c3; cn>, obj) = (ctx->resolve (<c1; c2; cn-1>))->bind (<cn>, obj) if the there already exists a binding for the specified name, <AlreadyBound> exception is thrown. Naming contexts should be bound using <bind_context> and <rebind_context> in order to participate in name resolution later.

void CosNaming::NamingContext::bind_context ( in Name  n,
in NamingContext  nc 
) raises (NotFound, CannotProceed, InvalidName, AlreadyBound)

This is the version of <bind> specifically for binding naming contexts, so that they will participate in name resolution when compound names are passed to be resolved.

NamingContext CosNaming::NamingContext::bind_new_context ( in Name  n) raises (NotFound, AlreadyBound, CannotProceed, InvalidName)

This operation creates a new context and binds it to the name supplied as an argument. The newly-created context is implemented by the same server as the context in which it was bound (the name argument excluding the last component).

void CosNaming::NamingContext::destroy ( ) raises (NotEmpty)

Delete the naming context.

Note:
the user should <unbind> any bindings in which the given context is bound to some names before invoking <destroy> operation on it.
void CosNaming::NamingContext::list ( in unsigned long  how_many,
out BindingList  bl,
out BindingIterator  bi 
)

Returns at most the requested number of bindings how_many in bl. If the naming context contains additional bindings, they are returned with a BindingIterator. In the naming context does not contain any additional bindings bi returned as null.

NamingContext CosNaming::NamingContext::new_context ( )

This operation returns a new naming context implemented by the same naming server in which the operation was invoked. The context is not bound.

void CosNaming::NamingContext::rebind ( in Name  n,
in Object  obj 
) raises (NotFound, CannotProceed, InvalidName)

This is similar to <bind> operation above, except for when the binding for the specified name already exists in the specified context. In that case, the existing binding is replaced with the new one.

void CosNaming::NamingContext::rebind_context ( in Name  n,
in NamingContext  nc 
) raises (NotFound, CannotProceed, InvalidName)

This is a version of <rebind> specifically for naming contexts, so that they can participate in name resolution when compound names are passed.

Object CosNaming::NamingContext::resolve ( in Name  n) raises (NotFound, CannotProceed, InvalidName)

Return object reference that is bound to the name. Compound name resolve is defined as follows: ctx->resolve (<c1; c2; cn>) = ctx->resolve (<c1; c2 cn-1>)->resolve (<cn>) The naming service does not return the type of the object. Clients are responsible for "narrowing" the object to the appropriate type.

void CosNaming::NamingContext::unbind ( in Name  n) raises (NotFound, CannotProceed, InvalidName)

Remove the name binding from the context. When compound names are used, unbind is defined as follows: ctx->unbind (<c1; c2; cn>) = (ctx->resolve (<c1; c2; cn-1>))->unbind (<cn>)


The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines