1. package org.omg.CosNaming;
  2. /**
  3. * org/omg/CosNaming/_NamingContextStub.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.1"
  5. * from ../../../../src/share/classes/org/omg/CosNaming/nameservice.idl
  6. * Monday, February 23, 2004 7:03:07 AM GMT
  7. */
  8. /**
  9. * A naming context is an object that contains a set of name bindings in
  10. * which each name is unique. Different names can be bound to an object
  11. * in the same or different contexts at the same time. <p>
  12. *
  13. * See <a href="http://www.omg.org/technology/documents/formal/naming_service.htm">
  14. * CORBA COS
  15. * Naming Specification.</a>
  16. */
  17. public class _NamingContextStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.CosNaming.NamingContext
  18. {
  19. /**
  20. * Creates a binding of a name and an object in the naming context.
  21. * Naming contexts that are bound using bind do not participate in name
  22. * resolution when compound names are passed to be resolved.
  23. *
  24. * @param n Name of the object <p>
  25. *
  26. * @param obj The Object to bind with the given name<p>
  27. *
  28. * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates
  29. * the name does not identify a binding.<p>
  30. *
  31. * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed
  32. * Indicates that the implementation has given up for some reason.
  33. * The client, however, may be able to continue the operation
  34. * at the returned naming context.<p>
  35. *
  36. * @exception org.omg.CosNaming.NamingContextPackage.InvalidName
  37. * Indicates that the name is invalid. <p>
  38. *
  39. * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound
  40. * Indicates an object is already bound to the specified name.<p>
  41. */
  42. public void bind (org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, org.omg.CosNaming.NamingContextPackage.AlreadyBound
  43. {
  44. org.omg.CORBA.portable.InputStream $in = null;
  45. try {
  46. org.omg.CORBA.portable.OutputStream $out = _request ("bind", true);
  47. org.omg.CosNaming.NameHelper.write ($out, n);
  48. org.omg.CORBA.ObjectHelper.write ($out, obj);
  49. $in = _invoke ($out);
  50. return;
  51. } catch (org.omg.CORBA.portable.ApplicationException $ex) {
  52. $in = $ex.getInputStream ();
  53. String _id = $ex.getId ();
  54. if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
  55. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
  56. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
  57. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
  58. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
  59. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
  60. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0"))
  61. throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in);
  62. else
  63. throw new org.omg.CORBA.MARSHAL (_id);
  64. } catch (org.omg.CORBA.portable.RemarshalException $rm) {
  65. bind (n, obj );
  66. } finally {
  67. _releaseReply ($in);
  68. }
  69. } // bind
  70. /**
  71. * Names an object that is a naming context. Naming contexts that
  72. * are bound using bind_context() participate in name resolution
  73. * when compound names are passed to be resolved.
  74. *
  75. * @param n Name of the object <p>
  76. *
  77. * @param nc NamingContect object to bind with the given name <p>
  78. *
  79. * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
  80. *
  81. * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
  82. * given up for some reason. The client, however, may be able to
  83. * continue the operation at the returned naming context.<p>
  84. *
  85. * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
  86. *
  87. * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound Indicates an object is already
  88. * bound to the specified name.<p>
  89. */
  90. public void bind_context (org.omg.CosNaming.NameComponent[] n, org.omg.CosNaming.NamingContext nc) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, org.omg.CosNaming.NamingContextPackage.AlreadyBound
  91. {
  92. org.omg.CORBA.portable.InputStream $in = null;
  93. try {
  94. org.omg.CORBA.portable.OutputStream $out = _request ("bind_context", true);
  95. org.omg.CosNaming.NameHelper.write ($out, n);
  96. org.omg.CosNaming.NamingContextHelper.write ($out, nc);
  97. $in = _invoke ($out);
  98. return;
  99. } catch (org.omg.CORBA.portable.ApplicationException $ex) {
  100. $in = $ex.getInputStream ();
  101. String _id = $ex.getId ();
  102. if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
  103. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
  104. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
  105. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
  106. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
  107. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
  108. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0"))
  109. throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in);
  110. else
  111. throw new org.omg.CORBA.MARSHAL (_id);
  112. } catch (org.omg.CORBA.portable.RemarshalException $rm) {
  113. bind_context (n, nc );
  114. } finally {
  115. _releaseReply ($in);
  116. }
  117. } // bind_context
  118. /**
  119. * Creates a binding of a name and an object in the naming context
  120. * even if the name is already bound in the context. Naming contexts
  121. * that are bound using rebind do not participate in name resolution
  122. * when compound names are passed to be resolved.
  123. *
  124. * @param n Name of the object <p>
  125. *
  126. * @parm obj The Object to rebind with the given name <p>
  127. *
  128. * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
  129. *
  130. * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
  131. * given up for some reason. The client, however, may be able to
  132. * continue the operation at the returned naming context.<p>
  133. *
  134. * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
  135. */
  136. public void rebind (org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
  137. {
  138. org.omg.CORBA.portable.InputStream $in = null;
  139. try {
  140. org.omg.CORBA.portable.OutputStream $out = _request ("rebind", true);
  141. org.omg.CosNaming.NameHelper.write ($out, n);
  142. org.omg.CORBA.ObjectHelper.write ($out, obj);
  143. $in = _invoke ($out);
  144. return;
  145. } catch (org.omg.CORBA.portable.ApplicationException $ex) {
  146. $in = $ex.getInputStream ();
  147. String _id = $ex.getId ();
  148. if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
  149. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
  150. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
  151. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
  152. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
  153. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
  154. else
  155. throw new org.omg.CORBA.MARSHAL (_id);
  156. } catch (org.omg.CORBA.portable.RemarshalException $rm) {
  157. rebind (n, obj );
  158. } finally {
  159. _releaseReply ($in);
  160. }
  161. } // rebind
  162. /**
  163. * Creates a binding of a name and a naming context in the naming
  164. * context even if the name is already bound in the context. Naming
  165. * contexts that are bound using rebind_context() participate in name
  166. * resolution when compound names are passed to be resolved.
  167. *
  168. * @param n Name of the object <p>
  169. *
  170. * @param nc NamingContect object to rebind with the given name <p>
  171. *
  172. * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
  173. *
  174. * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
  175. * given up for some reason. The client, however, may be able to
  176. * continue the operation at the returned naming context.<p>
  177. *
  178. * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
  179. */
  180. public void rebind_context (org.omg.CosNaming.NameComponent[] n, org.omg.CosNaming.NamingContext nc) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
  181. {
  182. org.omg.CORBA.portable.InputStream $in = null;
  183. try {
  184. org.omg.CORBA.portable.OutputStream $out = _request ("rebind_context", true);
  185. org.omg.CosNaming.NameHelper.write ($out, n);
  186. org.omg.CosNaming.NamingContextHelper.write ($out, nc);
  187. $in = _invoke ($out);
  188. return;
  189. } catch (org.omg.CORBA.portable.ApplicationException $ex) {
  190. $in = $ex.getInputStream ();
  191. String _id = $ex.getId ();
  192. if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
  193. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
  194. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
  195. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
  196. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
  197. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
  198. else
  199. throw new org.omg.CORBA.MARSHAL (_id);
  200. } catch (org.omg.CORBA.portable.RemarshalException $rm) {
  201. rebind_context (n, nc );
  202. } finally {
  203. _releaseReply ($in);
  204. }
  205. } // rebind_context
  206. /**
  207. * The resolve operation is the process of retrieving an object
  208. * bound to a name in a given context. The given name must exactly
  209. * match the bound name. The naming service does not return the type
  210. * of the object. Clients are responsible for "narrowing" the object
  211. * to the appropriate type. That is, clients typically cast the returned
  212. * object from Object to a more specialized interface.
  213. *
  214. * @param n Name of the object <p>
  215. *
  216. * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
  217. *
  218. * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
  219. * given up for some reason. The client, however, may be able to
  220. * continue the operation at the returned naming context.<p>
  221. *
  222. * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
  223. */
  224. public org.omg.CORBA.Object resolve (org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
  225. {
  226. org.omg.CORBA.portable.InputStream $in = null;
  227. try {
  228. org.omg.CORBA.portable.OutputStream $out = _request ("resolve", true);
  229. org.omg.CosNaming.NameHelper.write ($out, n);
  230. $in = _invoke ($out);
  231. org.omg.CORBA.Object $result = org.omg.CORBA.ObjectHelper.read ($in);
  232. return $result;
  233. } catch (org.omg.CORBA.portable.ApplicationException $ex) {
  234. $in = $ex.getInputStream ();
  235. String _id = $ex.getId ();
  236. if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
  237. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
  238. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
  239. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
  240. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
  241. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
  242. else
  243. throw new org.omg.CORBA.MARSHAL (_id);
  244. } catch (org.omg.CORBA.portable.RemarshalException $rm) {
  245. return resolve (n );
  246. } finally {
  247. _releaseReply ($in);
  248. }
  249. } // resolve
  250. /**
  251. * The unbind operation removes a name binding from a context.
  252. *
  253. * @param n Name of the object <p>
  254. *
  255. * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
  256. *
  257. * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
  258. * given up for some reason. The client, however, may be able to
  259. * continue the operation at the returned naming context.<p>
  260. *
  261. * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
  262. */
  263. public void unbind (org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
  264. {
  265. org.omg.CORBA.portable.InputStream $in = null;
  266. try {
  267. org.omg.CORBA.portable.OutputStream $out = _request ("unbind", true);
  268. org.omg.CosNaming.NameHelper.write ($out, n);
  269. $in = _invoke ($out);
  270. return;
  271. } catch (org.omg.CORBA.portable.ApplicationException $ex) {
  272. $in = $ex.getInputStream ();
  273. String _id = $ex.getId ();
  274. if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
  275. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
  276. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
  277. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
  278. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
  279. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
  280. else
  281. throw new org.omg.CORBA.MARSHAL (_id);
  282. } catch (org.omg.CORBA.portable.RemarshalException $rm) {
  283. unbind (n );
  284. } finally {
  285. _releaseReply ($in);
  286. }
  287. } // unbind
  288. /**
  289. * The list operation allows a client to iterate through a set of
  290. * bindings in a naming context. <p>
  291. *
  292. * The list operation returns at most the requested number of
  293. * bindings in BindingList bl.
  294. * <ul>
  295. * <li>If the naming context contains additional
  296. * bindings, the list operation returns a BindingIterator with the
  297. * additional bindings.
  298. * <li>If the naming context does not contain additional
  299. * bindings, the binding iterator is a nil object reference.
  300. * </ul>
  301. *
  302. * @param how_many the maximum number of bindings to return <p>
  303. *
  304. * @param bl the returned list of bindings <p>
  305. *
  306. * @param bi the returned binding iterator <p>
  307. */
  308. public void list (int how_many, org.omg.CosNaming.BindingListHolder bl, org.omg.CosNaming.BindingIteratorHolder bi)
  309. {
  310. org.omg.CORBA.portable.InputStream $in = null;
  311. try {
  312. org.omg.CORBA.portable.OutputStream $out = _request ("list", true);
  313. $out.write_ulong (how_many);
  314. $in = _invoke ($out);
  315. bl.value = org.omg.CosNaming.BindingListHelper.read ($in);
  316. bi.value = org.omg.CosNaming.BindingIteratorHelper.read ($in);
  317. return;
  318. } catch (org.omg.CORBA.portable.ApplicationException $ex) {
  319. $in = $ex.getInputStream ();
  320. String _id = $ex.getId ();
  321. throw new org.omg.CORBA.MARSHAL (_id);
  322. } catch (org.omg.CORBA.portable.RemarshalException $rm) {
  323. list (how_many, bl, bi );
  324. } finally {
  325. _releaseReply ($in);
  326. }
  327. } // list
  328. /**
  329. * This operation returns a naming context implemented by the same
  330. * naming server as the context on which the operation was invoked.
  331. * The new context is not bound to any name.
  332. */
  333. public org.omg.CosNaming.NamingContext new_context ()
  334. {
  335. org.omg.CORBA.portable.InputStream $in = null;
  336. try {
  337. org.omg.CORBA.portable.OutputStream $out = _request ("new_context", true);
  338. $in = _invoke ($out);
  339. org.omg.CosNaming.NamingContext $result = org.omg.CosNaming.NamingContextHelper.read ($in);
  340. return $result;
  341. } catch (org.omg.CORBA.portable.ApplicationException $ex) {
  342. $in = $ex.getInputStream ();
  343. String _id = $ex.getId ();
  344. throw new org.omg.CORBA.MARSHAL (_id);
  345. } catch (org.omg.CORBA.portable.RemarshalException $rm) {
  346. return new_context ( );
  347. } finally {
  348. _releaseReply ($in);
  349. }
  350. } // new_context
  351. /**
  352. * This operation creates a new context and binds it to the name
  353. * supplied as an argument. The newly-created context is implemented
  354. * by the same naming server as the context in which it was bound (that
  355. * is, the naming server that implements the context denoted by the
  356. * name argument excluding the last component).
  357. *
  358. * @param n Name of the object <p>
  359. *
  360. * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
  361. *
  362. * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound Indicates an object is already
  363. * bound to the specified name.<p>
  364. *
  365. * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
  366. * given up for some reason. The client, however, may be able to
  367. * continue the operation at the returned naming context.<p>
  368. *
  369. * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
  370. */
  371. public org.omg.CosNaming.NamingContext bind_new_context (org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.AlreadyBound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
  372. {
  373. org.omg.CORBA.portable.InputStream $in = null;
  374. try {
  375. org.omg.CORBA.portable.OutputStream $out = _request ("bind_new_context", true);
  376. org.omg.CosNaming.NameHelper.write ($out, n);
  377. $in = _invoke ($out);
  378. org.omg.CosNaming.NamingContext $result = org.omg.CosNaming.NamingContextHelper.read ($in);
  379. return $result;
  380. } catch (org.omg.CORBA.portable.ApplicationException $ex) {
  381. $in = $ex.getInputStream ();
  382. String _id = $ex.getId ();
  383. if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
  384. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
  385. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0"))
  386. throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in);
  387. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
  388. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
  389. else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
  390. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
  391. else
  392. throw new org.omg.CORBA.MARSHAL (_id);
  393. } catch (org.omg.CORBA.portable.RemarshalException $rm) {
  394. return bind_new_context (n );
  395. } finally {
  396. _releaseReply ($in);
  397. }
  398. } // bind_new_context
  399. /**
  400. * The destroy operation deletes a naming context. If the naming
  401. * context contains bindings, the NotEmpty exception is raised.
  402. *
  403. * @exception org.omg.CosNaming.NamingContextPackage.NotEmpty Indicates that the Naming Context contains bindings.
  404. */
  405. public void destroy () throws org.omg.CosNaming.NamingContextPackage.NotEmpty
  406. {
  407. org.omg.CORBA.portable.InputStream $in = null;
  408. try {
  409. org.omg.CORBA.portable.OutputStream $out = _request ("destroy", true);
  410. $in = _invoke ($out);
  411. return;
  412. } catch (org.omg.CORBA.portable.ApplicationException $ex) {
  413. $in = $ex.getInputStream ();
  414. String _id = $ex.getId ();
  415. if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotEmpty:1.0"))
  416. throw org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.read ($in);
  417. else
  418. throw new org.omg.CORBA.MARSHAL (_id);
  419. } catch (org.omg.CORBA.portable.RemarshalException $rm) {
  420. destroy ( );
  421. } finally {
  422. _releaseReply ($in);
  423. }
  424. } // destroy
  425. // Type-specific CORBA::Object operations
  426. private static String[] __ids = {
  427. "IDL:omg.org/CosNaming/NamingContext:1.0"};
  428. public String[] _ids ()
  429. {
  430. return (String[])__ids.clone ();
  431. }
  432. private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
  433. {
  434. String str = s.readUTF ();
  435. String[] args = null;
  436. java.util.Properties props = null;
  437. org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
  438. org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
  439. _set_delegate (delegate);
  440. }
  441. private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
  442. {
  443. String[] args = null;
  444. java.util.Properties props = null;
  445. String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
  446. s.writeUTF (str);
  447. }
  448. } // class _NamingContextStub