org.omg.CosNaming
Class _NamingContextExtStub

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--org.omg.CosNaming._NamingContextExtStub
All Implemented Interfaces:
IDLEntity, NamingContext, NamingContextExt, NamingContextExtOperations, NamingContextOperations, Object, java.io.Serializable

public class _NamingContextExtStub
extends ObjectImpl
implements NamingContextExt

This interface has been introduced for the Interoperable Name Service. This interface extends NamingContext and provides several new methods to manage CORBA URL.

See Also:
Serialized Form

Constructor Summary
_NamingContextExtStub()
           
 
Method Summary
 java.lang.String[] _ids()
           
 void bind_context(NameComponent[] n, NamingContext nc)
          Names an object that is a naming context.
 NamingContext bind_new_context(NameComponent[] n)
          This operation creates a new context and binds it to the name supplied as an argument.
 void bind(NameComponent[] n, Object obj)
          Creates a binding of a name and an object in the naming context.
 void destroy()
          The destroy operation deletes a naming context.
 void list(int how_many, BindingListHolder bl, BindingIteratorHolder bi)
          The list operation allows a client to iterate through a set of bindings in a naming context.
 NamingContext new_context()
          This operation returns a naming context implemented by the same naming server as the context on which the operation was invoked.
 void rebind_context(NameComponent[] n, NamingContext nc)
          Creates a binding of a name and a naming context in the naming context even if the name is already bound in the context.
 void rebind(NameComponent[] n, Object obj)
          Creates a binding of a name and an object in the naming context even if the name is already bound in the context.
 Object resolve_str(java.lang.String n)
          This is a convenience operation that performs a resolve in the same manner as NamingContext::resolve.
 Object resolve(NameComponent[] n)
          Names can have multiple components; therefore, name resolution can traverse multiple contexts.
 NameComponent[] to_name(java.lang.String sn)
          This operation accepts a stringified name and returns a Name.
 java.lang.String to_string(NameComponent[] n)
          This operation accepts Name and returns a stringified name.
 java.lang.String to_url(java.lang.String addr, java.lang.String sn)
          This operation takes an URL address and performs any escapes necessary on the stringified name and returns a fully formed URL string.
 void unbind(NameComponent[] n)
          The unbind operation removes a name binding from a context.
 
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Constructor Detail

_NamingContextExtStub

public _NamingContextExtStub()
Method Detail

_ids

public java.lang.String[] _ids()
Overrides:
_ids in class ObjectImpl

to_string

public java.lang.String to_string(NameComponent[] n)
                           throws InvalidName
Description copied from interface: NamingContextExtOperations
This operation accepts Name and returns a stringified name.
Specified by:
to_string in interface NamingContextExtOperations
Following copied from interface: org.omg.CosNaming.NamingContextExtOperations
Parameters:
n - the name to stringified.
Throws:
InvalidName - This exception is raised if the name is invalid.

to_name

public NameComponent[] to_name(java.lang.String sn)
                        throws InvalidName
Description copied from interface: NamingContextExtOperations
This operation accepts a stringified name and returns a Name.
Specified by:
to_name in interface NamingContextExtOperations
Following copied from interface: org.omg.CosNaming.NamingContextExtOperations
Parameters:
sn - the stringified name to transform to a name.
Throws:
InvalideName - This exception is raised if the stringified name is syntactically malformed or violates an implementation limit.

to_url

public java.lang.String to_url(java.lang.String addr,
                               java.lang.String sn)
                        throws InvalidAddress,
                               InvalidName
Description copied from interface: NamingContextExtOperations
This operation takes an URL address and performs any escapes necessary on the stringified name and returns a fully formed URL string.
Specified by:
to_url in interface NamingContextExtOperations
Following copied from interface: org.omg.CosNaming.NamingContextExtOperations
Parameters:
addr - the address ( for example myhost.xyz.com )
sn - the stringified name to add to the URL
Returns:
the URL string format.
Throws:
InvalidAddress - This exception is raises if a address is invalid ( it means that the address does not respect the address format ).
InvalidName - This exception is raised if the stringified name is syntactically malformed or violates an implementation limit.

resolve_str

public Object resolve_str(java.lang.String n)
                   throws NotFound,
                          CannotProceed,
                          InvalidName
Description copied from interface: NamingContextExtOperations
This is a convenience operation that performs a resolve in the same manner as NamingContext::resolve. It accepts a stringified name as an argument instead of a Name.
Specified by:
resolve_str in interface NamingContextExtOperations
Following copied from interface: org.omg.CosNaming.NamingContextExtOperations
Parameters:
n - the stringified name of the object (or naming context) to resolve
Returns:
the resolved object.
Throws:
NotFound - Indicates the name does not identify a binding.
CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.
InvalidName - Indicates the name is invalid. (A name of length 0 is invalid; implementations may place other restrictions on names.)

bind

public void bind(NameComponent[] n,
                 Object obj)
          throws NotFound,
                 CannotProceed,
                 InvalidName,
                 AlreadyBound
Description copied from interface: NamingContextOperations
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.
Specified by:
bind in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - The compound name for the object to bind
obj - The object to bind
Throws:
NotFound - Indicates the name does not identify a binding.
CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.
Indicates - the name is invalid. (A name of length 0 is invalid; implementations may place other restrictions on names.)
AlreadyBound - Indicates an object is already bound to the specified name. Only one object can be bound to a particular name in a context. The bind and the bind_context operations raise the AlreadyBound exception if the name is bound in the context; the rebind and rebind_context operations unbind the name and rebind the name to the object passed as an argument.

rebind

public void rebind(NameComponent[] n,
                   Object obj)
            throws NotFound,
                   CannotProceed,
                   InvalidName
Description copied from interface: NamingContextOperations
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.
Specified by:
rebind in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - The compound name for the object to rebind
obj - The object to rebind
Throws:
NotFound - Indicates the name does not identify a binding.
CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.
InvalidName - Indicates the name is invalid. (A name of length 0 is invalid; implementations may place other restrictions on names.)
AlreadyBound - Indicates an object is already bound to the specified name. Only one object can be bound to a particular name in a context. The bind and the bind_context operations raise the AlreadyBound exception if the name is bound in the context; the rebind and rebind_context operations unbind the name and rebind the name to the object passed as an argument.

bind_context

public void bind_context(NameComponent[] n,
                         NamingContext nc)
                  throws NotFound,
                         CannotProceed,
                         InvalidName,
                         AlreadyBound
Description copied from interface: NamingContextOperations
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.
Specified by:
bind_context in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - The compound name for the naming context to bind
obj - The naming context to bind
Throws:
NotFound - Indicates the name does not identify a binding.
CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.
InvalidName - Indicates the name is invalid. (A name of length 0 is invalid; implementations may place other restrictions on names.)
AlreadyBound - Indicates an object is already bound to the specified name. Only one object can be bound to a particular name in a context. The bind and the bind_context operations raise the AlreadyBound exception if the name is bound in the context; the rebind and rebind_context operations unbind the name and rebind the name to the object passed as an argument.

rebind_context

public void rebind_context(NameComponent[] n,
                           NamingContext nc)
                    throws NotFound,
                           CannotProceed,
                           InvalidName
Description copied from interface: NamingContextOperations
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.
Specified by:
rebind_context in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - The compound name for the naming context to rebind
obj - The naming context to rebind
Throws:
NotFound - Indicates the name does not identify a binding.
CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.
InvalidName - Indicates the name is invalid. (A name of length 0 is invalid; implementations may place other restrictions on names.)
AlreadyBound - Indicates an object is already bound to the specified name. Only one object can be bound to a particular name in a context. The bind and the bind_context operations raise the AlreadyBound exception if the name is bound in the context; the rebind and rebind_context operations unbind the name and rebind the name to the object passed as an argument.

resolve

public Object resolve(NameComponent[] n)
               throws NotFound,
                      CannotProceed,
                      InvalidName
Description copied from interface: NamingContextOperations
Names can have multiple components; therefore, name resolution can traverse multiple contexts.
Specified by:
resolve in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - The compound name for the object to resolve.
Returns:
the resolved object.
Throws:
NotFound - Indicates the name does not identify a binding.
CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.
InvalidName - Indicates the name is invalid. (A name of length 0 is invalid; implementations may place other restrictions on names.)

unbind

public void unbind(NameComponent[] n)
            throws NotFound,
                   CannotProceed,
                   InvalidName
Description copied from interface: NamingContextOperations
The unbind operation removes a name binding from a context.
Specified by:
unbind in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - The compound name for the node to unbind ( an object or a naming context )
Throws:
NotFound - Indicates the name does not identify a binding.
CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.
InvalidName - Indicates the name is invalid. (A name of length 0 is invalid; implementations may place other restrictions on names.)

new_context

public NamingContext new_context()
Description copied from interface: NamingContextOperations
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.
Specified by:
new_context in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Returns:
A new naming context ( this new naming context must be binded )

bind_new_context

public NamingContext bind_new_context(NameComponent[] n)
                               throws NotFound,
                                      AlreadyBound,
                                      CannotProceed,
                                      InvalidName
Description copied from interface: NamingContextOperations
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).
Specified by:
bind_new_context in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
n - The compound name for the naming context to create and to bind.
Throws:
NotFound - Indicates the name does not identify a binding.
CannotProceed - Indicates that the implementation has given up for some reason. The client, however, may be able to continue the operation at the returned naming context.
InvalidName - Indicates the name is invalid. (A name of length 0 is invalid; implementations may place other restrictions on names.)
AlreadyBound - Indicates an object is already bound to the specified name. Only one object can be bound to a particular name in a context.

destroy

public void destroy()
             throws NotEmpty
Description copied from interface: NamingContextOperations
The destroy operation deletes a naming context.
Specified by:
destroy in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Throws:
NotEmpty - If the naming context contains bindings, the NotEmpty exception is raised.

list

public void list(int how_many,
                 BindingListHolder bl,
                 BindingIteratorHolder bi)
Description copied from interface: NamingContextOperations
The list operation allows a client to iterate through a set of bindings in a naming context.
Specified by:
list in interface NamingContextOperations
Following copied from interface: org.omg.CosNaming.NamingContextOperations
Parameters:
how_many - Maximum number of elements into the binding list.
bl - This parameter returns a list that contains all node of the naming context
bi - This parameter returns a binding iterator to iterate in the list.
Returns:
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.