This object is used to contain and manipulate a list of names that are bound to the VisiBroker ORB objects or to other NamingContext objects. Client applications use this interface to
resolve or
list all of the names within that context. Object implementations use this object to
bind names to object implementations or to bind a name to a
NamingContext object.
Include the file CosNaming_c.hh when using this class.
module CosNaming {
interface NamingContext {
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, CannotProceed, InvalidName, AlreadyBound);
void destroy()
raises(NotEmpty);
void list(in unsigned long how_many,
out BindingList bl,
out BindingIterator bi);
};
};
If the parameter _n is a complex name, this method attempts to bind the specified
Object to the specified
Name by resolving the context associated with the first
NameComponent and then binding the object to the new context using the following
Name:
This recursive process of resolving and binding continues until the context associated with the NameComponent (n-1) is resolved and the actual name-to-object binding is stored. If parameter _
n is a simple name, _
obj will be bound to _
n within this
NamingContext.
|
|
|
|
|
One of the NameComponent objects in the sequence could not be resolved. The client may still be able to continue the operation from the returned naming context.
|
|
The specified Name has no name components or the id field of one of its name components is an empty string.
|
|
The specified Name has already been bound to another object within the NamingContext.
|
virtual void rebind(const Name& _n, CORBA::Object_ptr _obj);
This method is exactly the same as the bind method, except that it never raises the
AlreadyBound exception. If the specified
Name has already been bound to another object, this method replaces that binding with the new binding.
|
|
|
A Name structure, initialized with the desired name for the object.
|
|
|
|
|
|
|
|
One of the NameComponent objects in the sequence could not be resolved. The client may still be able to continue the operation from the returned naming context.
|
|
The specified Name has no name components or the id field of one of its name components is an empty string.
|
virtual void bind_context(const Name& _n, NamingContext_ptr _nc);
This method is identical to the bind method, except that it associates the supplied
Name with a
NamingContext, not an arbitrary VisiBroker ORB object.
|
|
|
A Name structure initialized with the desired name for the naming context. The first (n-1) NameComponent structures in the sequence must resolve to a NamingContext.
|
|
The NamingContext object to be bound.
|
|
|
|
The Name, or one of its components, could not be found.
|
|
One of the NameComponent objects in the sequence could not be resolved. The client may still be able to continue the operation from the returned naming context.
|
|
The specified Name has no name components or the id field of one of its name components is an empty string.
|
|
The specified Name has already been bound to another object within the NamingContext.
|
virtual void rebind_context(const Name& _n, NamingContext_ptr _nc);
This method is exactly the same as the bind_context method, except that this method never raises the
AlreadyBound exception. If the specified
Name has already been bound to another naming context, this method replaces that binding with the new binding.
|
|
|
A Name structure, initialized with the desired name for the object.
|
|
The NamingContext object to be rebound.
|
|
|
|
|
|
One of the NameComponent objects in the sequence could not be resolved. The client may still be able to continue the operation from the returned naming context.
|
|
The specified Name has no name components or the id field of one of its name components is an empty string.
|
This method attempts to resolve the specified Name and return an object reference. If parameter _
n is a
simple name, it is resolved relative to this
NamingContext.
If _n is a
complex name, it is resolved using the context associated with the first
NameComponent. Next, the new context to resolve the following
Name:
|
|
|
A Name structure, initialized with the name for the desired object.
|
|
|
|
|
|
One of the NameComponent objects in the sequence could not be resolved. The client may still be able to continue the operation from the returned naming context.
|
|
The specified Name has no name components or the id field of one of its name components is an empty string.
|
This method performs the inverse operation of the bind method, removing the binding associated with the specified
Name.
|
|
|
A Name structure, initialized with the desired name to be unbound.
|
|
|
|
|
|
One of the NameComponent objects in the sequence could not be resolved. The client may still be able to continue the operation from the returned naming context.
|
|
The specified Name has no name components or the id field of one of its name components is an empty string.
|
|
|
|
A Name structure, initialized with the specified Name for the newly created NamingContext object.
|
|
|
|
|
|
One of the NameComponent objects in the sequence could not be resolved. The client may still be able to continue the operation from the returned NamingContext.
|
|
The specified Name has no name components or the id field of one of its name components is an empty string.
|
|
The specified Name has already been bound to another object within the NamingContext.
|
Before using this method, all Name objects that have been bound relative to this
NamingContext should be unbound using the
unbind method. Any attempt to destroy a
NamingContext that is not empty raises a
NotEmpty exception.
|
|
|
The NamingContext to be destroyed is not empty.
|
virtual void list(CORBA::ULong _how_many, BindingList_out _bl,
BindingIterator_out _bi)
This method returns all of the bindings contained by this context. A maximum of _how_many Names are returned with the
BindingList. Any left over bindings are returned via the
BindingIterator. The returned
BindingList and
BindingIterator are described in detail in
“Binding and BindingList” and can be used to navigate the list of names.
class _VISNMEXPORT NamingContextExt : public virtual NamingContext, public virtual CORBA_Object
The NamingContextExt interface, which extends
NamingContext, provides the operations required to use stringified names and URLs.
Included the naming file CosNaming_c.hh when you use this class.
|
|
|
A Name structure initialized with the desired name for object.
|
|
|
|
The specified Name has no name components or the id field of one of its name components is an empty string.
|
This operation returns a Name object for the specified stringified name.
|
|
|
The specified Name has no name components or the id field of one of its name components is an empty string.
|
|
|
|
|
|
The specified Name has no name components or the id field of one of its name components is an empty string.
|
This operation returns a Name object for the specified stringified name.
|
|
|
The Name, or one of its components, could not be found.
|
|
One of the NameComponent objects in the sequence could not be resolved. The client may still be able to continue the operation from the returned NamingContext.
|
|
The specified Name has no name components or the id field of one of its name components is an empty string.
|
The Binding,
BindingList, and
BindingIterator interfaces are used to describe the name-object bindings contained in a
NamingContext. The
Binding struct encapsulates one such pair. The
binding_name field represents the
Name and the
binding_type indicates whether the
Name is bound to a VisiBroker ORB object or a
NamingContext object.
The BindingList is a sequence of
Binding structures contained by a
NamingContext object. An example program that uses the
BindingList can be found in
<install dir>/examples/vbroker/ins/pluggable_adaptor.
Include the file CosNaming_c.hh when you use these data types and structure.
This object allows a client application to walk through the unbounded collection of bindings returned by the NamingContext operation
list. An example program that uses the
BindingIterator can be found in
<install dir>/examples/vbroker/ins/pluggable_adaptor.
Include the file CosNaming_c.hh when you use this class.
This method returns the next Binding from the collection. It returns
CORBA::FALSE if the list has been exhausted. Otherwise, it returns
CORBA::TRUE.
This method returns a BindingList containing the number of requested
Binding objects from the list. The number of bindings returned may be less than the requested amount if the list is exhausted.
FALSE is returned when the list has been exhausted. Otherwise,
TRUE is returned.
This interface is provided to instantiate an initial NamingContext. A client may bind to an object of this type and use the
create_context method to create an initial context. Once the initial context has been created, the
new_context method can be used to create other contexts. An instance of this naming context factory is created when the naming service is started, described in the Naming Service section of the
VisiBroker C++ Developer's Guide.
To create an initial NamingContextFactory that automatically creates a single root context, go to
“ExtendedNamingContextFactory”.
Include the file CosNamingExt_c.hh when you use this class.
class _VISNMEXPORT ExtendedNamingContextFactory : public virtual CosNamingExt::NamingContextFactory, public virtual CORBA_Object
This interface extends the NamingContextFactory interface and allows the creation of a default root within a factory when the extended naming service is started, described in the Naming Service section of the
VisiBroker C++ Developer's Guide.
Include the file CosNamingExt_c.hh when you use this class.