Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

CosNaming::NamingContext Interface Reference

The NamingContext interface provides operations which support the following:. More...

import "CosNaming.idl";

Inherited by CosNaming::NamingContextExt.

List of all members.

Public Types

enum  NotFoundReason { missing_node, not_context, not_object }

Public Methods

void bind (in Name n, in Object obj) raises (NotFound, CannotProceed, InvalidName, AlreadyBound)
 Creates a binding of a name and an object in the naming context. More...

void rebind (in Name n, in Object obj) raises (NotFound, CannotProceed, InvalidName)
 Creates a binding of a name and an object in the naming context even if the name is already bound in the context. More...

void bind_context (in Name n, in NamingContext nc) raises (NotFound, CannotProceed, InvalidName, AlreadyBound)
 Names an object that is a naming context. More...

void rebind_context (in Name n, in NamingContext nc) raises (NotFound, CannotProceed, InvalidName)
 Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context. More...

Object resolve (in Name n) raises (NotFound, CannotProceed, InvalidName)
 The resolve operation is the process of retrieving an object bound to a name in a given context. More...

void unbind (in Name n) raises (NotFound, CannotProceed, InvalidName)
 The unbind operation removes a name binding from a context. More...

NamingContext new_context ()
 This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked. More...

NamingContext bind_new_context (in Name n) raises (NotFound, CannotProceed, InvalidName, AlreadyBound)
 This operation creates a new context and binds it to the name supplied as an argument. More...

void destroy () raises (NotEmpty)
 The destroy operation deletes a naming context. More...

void list (in unsigned long how_many, out BindingList bl, out BindingIterator bi)
 The list operation returns at most the requested number of bindings in BindingList bl. More...


Detailed Description

The NamingContext interface provides operations which support the following:.


Member Enumeration Documentation

enum CosNaming::NamingContext::NotFoundReason
 

Enumeration values:
missing_node 
not_context 
not_object 


Member Function Documentation

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

Creates a binding of a name and an object in the naming context.

Naming contexts that are bound using bind do not participate in name resolution when compound names are passed to be resolved. A bind operation that is passed a compound name is defined as follows:

 ctx->bind(< c1 ; c2 ; ... ; cn >, obj) :=
 (ctx->resolve(< c1 ; c2 ; ... ; cn-1 >))->bind(< cn >, obj)
 
m n - binding name.
m obj - object to bind.
@raises AlreadyBound - if the name is bound in the context.

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

Names an object that is a naming context.

Naming contexts that are bound using bind_context() participate in name resolution when compound names are passed to be resolved. A bind_context operation that is passed a compound name is defined as follows:

 ctx->bind_context(< c1 ; c2 ; ... ; cn >, nc) :=
 (ctx->resolve(< c1 ; c2 ; ... ; cn-1 >))->bind_context(< cn >, nc)
 
m n - binding name.
m nc - naming context to bind.
@raises AlreadyBound - if the name is bound in the context.

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

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 naming server as the context in which it was bound (that is, the naming server that implements the context denoted by the name argument excluding the last component). A bind_new_context that is passed a compound name is defined as follows:

 ctx->bind_new_context(< c1 ; c2 ; ... ; cn >) :=
 (ctx->resolve(< c1 ; c2 ; ... ; cn-1 >))->bind_new_context(< cn >)
 
m n - binding name.
Returns:
new binding context. @raises AlreadyBound - if the name is bound in the context.

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

The destroy operation deletes a naming context.

The list operation allows a client to iterate through a set of bindings in a naming context.

@raises NotEmpty - if the naming context contains bindings.

void CosNaming::NamingContext::list in unsigned long    how_many,
out BindingList    bl,
out BindingIterator    bi
 

The list operation returns at most the requested number of bindings in BindingList bl.

  • If the naming context contains additional bindings, the list operation returns a BindingIterator with the additional bindings.
  • If the naming context does not contain additional bindings, the binding iterator is a nil object reference.
m how_many - maximum number of binding to return in bl.
m bl - list of bindings.
m bi - iterator over remaining bindings.

NamingContext CosNaming::NamingContext::new_context  
 

This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked.

The new context is not bound to any name.

Returns:
new binding context.

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

Creates a binding of a name and an object in the naming context even if the name is already bound in the context.

Naming contexts that are bound using rebind do not participate in name resolution when compound names are passed to be resolved.

m n - binding name.
m obj - object to bind.

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

Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.

Naming contexts that are bound using rebind_context() participate in name resolution when compound names are passed to be resolved.

m n - binding name.
m nc - naming context to bind.

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

The resolve operation is the process of retrieving an object bound to a name in a given context.

The given name must exactly match the bound name. The naming service does not return the type of the object. Clients are responsible for "narrowing" the object to the appropriate type. That is, clients typically cast the returned object from Object to a more specialized interface. Names can have multiple components; therefore, name resolution can traverse multiple contexts. A compound resolve is defined as follows:

 ctx->resolve(< c1 ; c2 ; ... ; cn >) :=
 ctx->resolve(< c1 ; c2 ; ... ; cn-1 >)->resolve(< cn >)
 
m n - binding name.
Returns:
bound object.

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

The unbind operation removes a name binding from a context.

A unbind operation that is passed a compound name is defined as follows:

 ctx->unbind(< c1 ; c2 ; ... ; cn >) :=
 (ctx->resolve(< c1 ; c2 ; ... ; cn-1 >))->unbind(< cn >)
 
m n - binding name.