1. /*
  2. * @(#)_NamingContextStub.java 1.11 00/02/02
  3. *
  4. * Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. /*
  11. * File: ./org/omg/CosNaming/_NamingContextStub.java
  12. * From: nameservice.idl
  13. * Date: Tue Aug 11 03:12:09 1998
  14. * By: idltojava Java IDL 1.2 Aug 11 1998 02:00:18
  15. */
  16. package org.omg.CosNaming;
  17. public class _NamingContextStub
  18. extends org.omg.CORBA.portable.ObjectImpl
  19. implements org.omg.CosNaming.NamingContext {
  20. public _NamingContextStub(org.omg.CORBA.portable.Delegate d) {
  21. super();
  22. _set_delegate(d);
  23. }
  24. private static final String _type_ids[] = {
  25. "IDL:omg.org/CosNaming/NamingContext:1.0"
  26. };
  27. public String[] _ids() { return (String[]) _type_ids.clone(); }
  28. // IDL operations
  29. // Implementation of ::CosNaming::NamingContext::bind
  30. public void bind(org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj)
  31. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, org.omg.CosNaming.NamingContextPackage.AlreadyBound {
  32. org.omg.CORBA.Request r = _request("bind");
  33. org.omg.CORBA.Any _n = r.add_in_arg();
  34. org.omg.CosNaming.NameHelper.insert(_n, n);
  35. org.omg.CORBA.Any _obj = r.add_in_arg();
  36. _obj.insert_Object(obj);
  37. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type());
  38. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type());
  39. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type());
  40. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.type());
  41. r.invoke();
  42. java.lang.Exception __ex = r.env().exception();
  43. if (__ex instanceof org.omg.CORBA.UnknownUserException) {
  44. org.omg.CORBA.UnknownUserException __userEx = (org.omg.CORBA.UnknownUserException) __ex;
  45. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type())) {
  46. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(__userEx.except);
  47. }
  48. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type())) {
  49. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.extract(__userEx.except);
  50. }
  51. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type())) {
  52. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.extract(__userEx.except);
  53. }
  54. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.type())) {
  55. throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.extract(__userEx.except);
  56. }
  57. }
  58. }
  59. // Implementation of ::CosNaming::NamingContext::bind_context
  60. public void bind_context(org.omg.CosNaming.NameComponent[] n, org.omg.CosNaming.NamingContext nc)
  61. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, org.omg.CosNaming.NamingContextPackage.AlreadyBound {
  62. org.omg.CORBA.Request r = _request("bind_context");
  63. org.omg.CORBA.Any _n = r.add_in_arg();
  64. org.omg.CosNaming.NameHelper.insert(_n, n);
  65. org.omg.CORBA.Any _nc = r.add_in_arg();
  66. org.omg.CosNaming.NamingContextHelper.insert(_nc, nc);
  67. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type());
  68. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type());
  69. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type());
  70. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.type());
  71. r.invoke();
  72. java.lang.Exception __ex = r.env().exception();
  73. if (__ex instanceof org.omg.CORBA.UnknownUserException) {
  74. org.omg.CORBA.UnknownUserException __userEx = (org.omg.CORBA.UnknownUserException) __ex;
  75. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type())) {
  76. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(__userEx.except);
  77. }
  78. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type())) {
  79. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.extract(__userEx.except);
  80. }
  81. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type())) {
  82. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.extract(__userEx.except);
  83. }
  84. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.type())) {
  85. throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.extract(__userEx.except);
  86. }
  87. }
  88. }
  89. // Implementation of ::CosNaming::NamingContext::rebind
  90. public void rebind(org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj)
  91. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName {
  92. org.omg.CORBA.Request r = _request("rebind");
  93. org.omg.CORBA.Any _n = r.add_in_arg();
  94. org.omg.CosNaming.NameHelper.insert(_n, n);
  95. org.omg.CORBA.Any _obj = r.add_in_arg();
  96. _obj.insert_Object(obj);
  97. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type());
  98. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type());
  99. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type());
  100. r.invoke();
  101. java.lang.Exception __ex = r.env().exception();
  102. if (__ex instanceof org.omg.CORBA.UnknownUserException) {
  103. org.omg.CORBA.UnknownUserException __userEx = (org.omg.CORBA.UnknownUserException) __ex;
  104. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type())) {
  105. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(__userEx.except);
  106. }
  107. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type())) {
  108. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.extract(__userEx.except);
  109. }
  110. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type())) {
  111. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.extract(__userEx.except);
  112. }
  113. }
  114. }
  115. // Implementation of ::CosNaming::NamingContext::rebind_context
  116. public void rebind_context(org.omg.CosNaming.NameComponent[] n, org.omg.CosNaming.NamingContext nc)
  117. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName {
  118. org.omg.CORBA.Request r = _request("rebind_context");
  119. org.omg.CORBA.Any _n = r.add_in_arg();
  120. org.omg.CosNaming.NameHelper.insert(_n, n);
  121. org.omg.CORBA.Any _nc = r.add_in_arg();
  122. org.omg.CosNaming.NamingContextHelper.insert(_nc, nc);
  123. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type());
  124. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type());
  125. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type());
  126. r.invoke();
  127. java.lang.Exception __ex = r.env().exception();
  128. if (__ex instanceof org.omg.CORBA.UnknownUserException) {
  129. org.omg.CORBA.UnknownUserException __userEx = (org.omg.CORBA.UnknownUserException) __ex;
  130. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type())) {
  131. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(__userEx.except);
  132. }
  133. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type())) {
  134. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.extract(__userEx.except);
  135. }
  136. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type())) {
  137. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.extract(__userEx.except);
  138. }
  139. }
  140. }
  141. // Implementation of ::CosNaming::NamingContext::resolve
  142. public org.omg.CORBA.Object resolve(org.omg.CosNaming.NameComponent[] n)
  143. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName {
  144. org.omg.CORBA.Request r = _request("resolve");
  145. r.set_return_type(org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_objref));
  146. org.omg.CORBA.Any _n = r.add_in_arg();
  147. org.omg.CosNaming.NameHelper.insert(_n, n);
  148. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type());
  149. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type());
  150. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type());
  151. r.invoke();
  152. java.lang.Exception __ex = r.env().exception();
  153. if (__ex instanceof org.omg.CORBA.UnknownUserException) {
  154. org.omg.CORBA.UnknownUserException __userEx = (org.omg.CORBA.UnknownUserException) __ex;
  155. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type())) {
  156. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(__userEx.except);
  157. }
  158. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type())) {
  159. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.extract(__userEx.except);
  160. }
  161. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type())) {
  162. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.extract(__userEx.except);
  163. }
  164. }
  165. org.omg.CORBA.Object __result;
  166. __result = r.return_value().extract_Object();
  167. return __result;
  168. }
  169. // Implementation of ::CosNaming::NamingContext::unbind
  170. public void unbind(org.omg.CosNaming.NameComponent[] n)
  171. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName {
  172. org.omg.CORBA.Request r = _request("unbind");
  173. org.omg.CORBA.Any _n = r.add_in_arg();
  174. org.omg.CosNaming.NameHelper.insert(_n, n);
  175. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type());
  176. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type());
  177. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type());
  178. r.invoke();
  179. java.lang.Exception __ex = r.env().exception();
  180. if (__ex instanceof org.omg.CORBA.UnknownUserException) {
  181. org.omg.CORBA.UnknownUserException __userEx = (org.omg.CORBA.UnknownUserException) __ex;
  182. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type())) {
  183. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(__userEx.except);
  184. }
  185. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type())) {
  186. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.extract(__userEx.except);
  187. }
  188. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type())) {
  189. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.extract(__userEx.except);
  190. }
  191. }
  192. }
  193. // Implementation of ::CosNaming::NamingContext::list
  194. public void list(int how_many, org.omg.CosNaming.BindingListHolder bl, org.omg.CosNaming.BindingIteratorHolder bi)
  195. {
  196. org.omg.CORBA.Request r = _request("list");
  197. org.omg.CORBA.Any _how_many = r.add_in_arg();
  198. _how_many.insert_ulong(how_many);
  199. org.omg.CORBA.Any _bl = r.add_out_arg();
  200. _bl.type(org.omg.CosNaming.BindingListHelper.type());
  201. org.omg.CORBA.Any _bi = r.add_out_arg();
  202. _bi.type(org.omg.CosNaming.BindingIteratorHelper.type());
  203. r.invoke();
  204. bl.value = org.omg.CosNaming.BindingListHelper.extract(_bl);
  205. bi.value = org.omg.CosNaming.BindingIteratorHelper.extract(_bi);
  206. }
  207. // Implementation of ::CosNaming::NamingContext::new_context
  208. public org.omg.CosNaming.NamingContext new_context()
  209. {
  210. org.omg.CORBA.Request r = _request("new_context");
  211. r.set_return_type(org.omg.CosNaming.NamingContextHelper.type());
  212. r.invoke();
  213. org.omg.CosNaming.NamingContext __result;
  214. __result = org.omg.CosNaming.NamingContextHelper.extract(r.return_value());
  215. return __result;
  216. }
  217. // Implementation of ::CosNaming::NamingContext::bind_new_context
  218. public org.omg.CosNaming.NamingContext bind_new_context(org.omg.CosNaming.NameComponent[] n)
  219. throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.AlreadyBound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName {
  220. org.omg.CORBA.Request r = _request("bind_new_context");
  221. r.set_return_type(org.omg.CosNaming.NamingContextHelper.type());
  222. org.omg.CORBA.Any _n = r.add_in_arg();
  223. org.omg.CosNaming.NameHelper.insert(_n, n);
  224. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type());
  225. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.type());
  226. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type());
  227. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type());
  228. r.invoke();
  229. java.lang.Exception __ex = r.env().exception();
  230. if (__ex instanceof org.omg.CORBA.UnknownUserException) {
  231. org.omg.CORBA.UnknownUserException __userEx = (org.omg.CORBA.UnknownUserException) __ex;
  232. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.NotFoundHelper.type())) {
  233. throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(__userEx.except);
  234. }
  235. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.type())) {
  236. throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.extract(__userEx.except);
  237. }
  238. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.type())) {
  239. throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.extract(__userEx.except);
  240. }
  241. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.type())) {
  242. throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.extract(__userEx.except);
  243. }
  244. }
  245. org.omg.CosNaming.NamingContext __result;
  246. __result = org.omg.CosNaming.NamingContextHelper.extract(r.return_value());
  247. return __result;
  248. }
  249. // Implementation of ::CosNaming::NamingContext::destroy
  250. public void destroy()
  251. throws org.omg.CosNaming.NamingContextPackage.NotEmpty {
  252. org.omg.CORBA.Request r = _request("destroy");
  253. r.exceptions().add(org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.type());
  254. r.invoke();
  255. java.lang.Exception __ex = r.env().exception();
  256. if (__ex instanceof org.omg.CORBA.UnknownUserException) {
  257. org.omg.CORBA.UnknownUserException __userEx = (org.omg.CORBA.UnknownUserException) __ex;
  258. if (__userEx.except.type().equals(org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.type())) {
  259. throw org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.extract(__userEx.except);
  260. }
  261. }
  262. }
  263. };