1. /*
  2. * @(#)NamingContext.java 1.6 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. /*
  8. * File: ./org/omg/CosNaming/NamingContext.java
  9. * From: nameservice.idl
  10. * Date: Tue Aug 11 03:12:09 1998
  11. * By: idltojava Java IDL 1.2 Aug 11 1998 02:00:18
  12. */
  13. package org.omg.CosNaming;
  14. /**
  15. * A naming context is an object that contains a set of name bindings in
  16. * which each name is unique. Different names can be bound to an object
  17. * in the same or different contexts at the same time. <p>
  18. ** See <a href=" http://www.omg.org/corba/sectrans.htm#nam">CORBA COS
  19. * Naming Specification.</a>
  20. */public interface NamingContext
  21. extends org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity {
  22. /**
  23. * Creates a binding of a name and an object in the naming context.
  24. * Naming contexts that are bound using bind do not participate in name
  25. * resolution when compound names are passed to be resolved.
  26. ** @param n Name of the object <p>
  27. ** @param obj The Object to bind with the given name<p>
  28. ** @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
  29. ** @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
  30. * given up for some reason. The client, however, may be able to
  31. * continue the operation at the returned naming context.<p>
  32. ** @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
  33. ** @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound Indicates an object is already
  34. * bound to the specified name.<p>
  35. */
  36. void bind(org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj)
  37. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, org.omg.CosNaming.NamingContextPackage.AlreadyBound;
  38. /**
  39. * Names an object that is a naming context. Naming contexts that
  40. * are bound using bind_context() participate in name resolution
  41. * when compound names are passed to be resolved.
  42. ** @param n Name of the object <p>
  43. ** @param nc NamingContect object to bind with the given name <p>
  44. ** @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
  45. ** @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
  46. * given up for some reason. The client, however, may be able to
  47. * continue the operation at the returned naming context.<p>
  48. ** @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
  49. ** @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound Indicates an object is already
  50. * bound to the specified name.<p>
  51. */
  52. void bind_context(org.omg.CosNaming.NameComponent[] n, org.omg.CosNaming.NamingContext nc)
  53. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, org.omg.CosNaming.NamingContextPackage.AlreadyBound;
  54. /**
  55. * Creates a binding of a name and an object in the naming context
  56. * even if the name is already bound in the context. Naming contexts
  57. * that are bound using rebind do not participate in name resolution
  58. * when compound names are passed to be resolved.
  59. ** @param n Name of the object <p>
  60. ** @parm obj The Object to rebind with the given name <p>
  61. ** @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
  62. ** @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
  63. * given up for some reason. The client, however, may be able to
  64. * continue the operation at the returned naming context.<p>
  65. ** @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
  66. */
  67. void rebind(org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj)
  68. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName;
  69. /**
  70. * Creates a binding of a name and a naming context in the naming
  71. * context even if the name is already bound in the context. Naming
  72. * contexts that are bound using rebind_context() participate in name
  73. * resolution when compound names are passed to be resolved.
  74. ** @param n Name of the object <p>
  75. ** @param nc NamingContect object to rebind with the given name <p>
  76. ** @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
  77. ** @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
  78. * given up for some reason. The client, however, may be able to
  79. * continue the operation at the returned naming context.<p>
  80. ** @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
  81. */
  82. void rebind_context(org.omg.CosNaming.NameComponent[] n, org.omg.CosNaming.NamingContext nc)
  83. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName;
  84. /**
  85. * The resolve operation is the process of retrieving an object
  86. * bound to a name in a given context. The given name must exactly
  87. * match the bound name. The naming service does not return the type
  88. * of the object. Clients are responsible for "narrowing" the object
  89. * to the appropriate type. That is, clients typically cast the returned
  90. * object from Object to a more specialized interface.
  91. ** @param n Name of the object <p>
  92. ** @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
  93. ** @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
  94. * given up for some reason. The client, however, may be able to
  95. * continue the operation at the returned naming context.<p>
  96. ** @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
  97. */
  98. org.omg.CORBA.Object resolve(org.omg.CosNaming.NameComponent[] n)
  99. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName;
  100. /**
  101. * The unbind operation removes a name binding from a context.
  102. ** @param n Name of the object <p>
  103. ** @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
  104. ** @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
  105. * given up for some reason. The client, however, may be able to
  106. * continue the operation at the returned naming context.<p>
  107. ** @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
  108. */
  109. void unbind(org.omg.CosNaming.NameComponent[] n)
  110. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName;
  111. /**
  112. * The list operation allows a client to iterate through a set of
  113. * bindings in a naming context. <p>
  114. ** The list operation returns at most the requested number of
  115. * bindings in BindingList bl.
  116. * <ul>
  117. * <li>If the naming context contains additional
  118. * bindings, the list operation returns a BindingIterator with the
  119. * additional bindings.
  120. * <li>If the naming context does not contain additional
  121. * bindings, the binding iterator is a nil object reference.
  122. * </ul>
  123. ** @param how_many the maximum number of bindings to return <p>
  124. ** @param bl the returned list of bindings <p>
  125. ** @param bi the returned binding iterator <p>
  126. */
  127. void list(int how_many, org.omg.CosNaming.BindingListHolder bl, org.omg.CosNaming.BindingIteratorHolder bi)
  128. ;
  129. /**
  130. * This operation returns a naming context implemented by the same
  131. * naming server as the context on which the operation was invoked.
  132. * The new context is not bound to any name.
  133. */
  134. org.omg.CosNaming.NamingContext new_context()
  135. ;
  136. /**
  137. * This operation creates a new context and binds it to the name
  138. * supplied as an argument. The newly-created context is implemented
  139. * by the same naming server as the context in which it was bound (that
  140. * is, the naming server that implements the context denoted by the
  141. * name argument excluding the last component).
  142. ** @param n Name of the object <p>
  143. ** @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
  144. ** @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound Indicates an object is already
  145. * bound to the specified name.<p>
  146. ** @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
  147. * given up for some reason. The client, however, may be able to
  148. * continue the operation at the returned naming context.<p>
  149. ** @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
  150. */
  151. org.omg.CosNaming.NamingContext bind_new_context(org.omg.CosNaming.NameComponent[] n)
  152. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.AlreadyBound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName;
  153. /**
  154. * The destroy operation deletes a naming context. If the naming
  155. * context contains bindings, the NotEmpty exception is raised.
  156. ** @exception org.omg.CosNaming.NamingContextPackage.NotEmpty Indicates that the Naming Context contains bindings.
  157. */
  158. void destroy()
  159. throws org.omg.CosNaming.NamingContextPackage.NotEmpty;
  160. }