001 package org.omg.CosNaming;
002
003
004 /**
005 * org/omg/CosNaming/_NamingContextExtStub.java .
006 * Generated by the IDL-to-Java compiler (portable), version "3.2"
007 * from /home/iurt/rpm/BUILD/geronimo-spec-corba/src/main/idl/CosNaming.idl
008 * Saturday, November 26, 2011 9:53:36 PM UTC
009 */
010
011
012 /**
013 * A naming context extension is an extenrion to naming context that contains a set of name bindings in
014 * which each name is unique. Different names can be bound to an object
015 * in the same or different contexts at the same time. <p>
016 *
017 * See <a href=" http://www.omg.org/corba/sectrans.htm#nam">CORBA COS
018 * Naming Specification.</a>
019 */
020 public class _NamingContextExtStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.CosNaming.NamingContextExt
021 {
022
023
024 /**
025 * The to_string operation is the process of retrieving a stringified name
026 * from a name object.
027 *
028 * @param n String Name of the object <p>
029 *
030 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
031 */
032 public String to_string (org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.InvalidName
033 {
034 org.omg.CORBA.portable.InputStream $in = null;
035 try {
036 org.omg.CORBA.portable.OutputStream $out = _request ("to_string", true);
037 org.omg.CosNaming.NameHelper.write ($out, n);
038 $in = _invoke ($out);
039 String $result = org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.read ($in);
040 return $result;
041 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
042 $in = $ex.getInputStream ();
043 String _id = $ex.getId ();
044 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
045 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
046 else
047 throw new org.omg.CORBA.MARSHAL (_id);
048 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
049 return to_string (n );
050 } finally {
051 _releaseReply ($in);
052 }
053 } // to_string
054
055
056 /**
057 * The to_name operation is the process of retrieving a name object
058 * to a stringified name.
059 *
060 * @param n String Name of the object <p>
061 *
062 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
063 */
064 public org.omg.CosNaming.NameComponent[] to_name (String sn) throws org.omg.CosNaming.NamingContextPackage.InvalidName
065 {
066 org.omg.CORBA.portable.InputStream $in = null;
067 try {
068 org.omg.CORBA.portable.OutputStream $out = _request ("to_name", true);
069 org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.write ($out, sn);
070 $in = _invoke ($out);
071 org.omg.CosNaming.NameComponent $result[] = org.omg.CosNaming.NameHelper.read ($in);
072 return $result;
073 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
074 $in = $ex.getInputStream ();
075 String _id = $ex.getId ();
076 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
077 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
078 else
079 throw new org.omg.CORBA.MARSHAL (_id);
080 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
081 return to_name (sn );
082 } finally {
083 _releaseReply ($in);
084 }
085 } // to_name
086
087
088 /**
089 * The to_url operation is the process of retrieving a url representation from a stringified name and
090 * address.
091 *
092 * @param addr Address of the object <p>
093 *
094 * @param sn String Name of the object <p>
095 *
096 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
097 *
098 * @exception org.omg.CosNaming.NamingContextPackage.InvalidAddress Indicates that the Address is invalid. <p>
099 */
100 public String to_url (String addr, String sn) throws org.omg.CosNaming.NamingContextExtPackage.InvalidAddress, org.omg.CosNaming.NamingContextPackage.InvalidName
101 {
102 org.omg.CORBA.portable.InputStream $in = null;
103 try {
104 org.omg.CORBA.portable.OutputStream $out = _request ("to_url", true);
105 org.omg.CosNaming.NamingContextExtPackage.AddressHelper.write ($out, addr);
106 org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.write ($out, sn);
107 $in = _invoke ($out);
108 String $result = org.omg.CosNaming.NamingContextExtPackage.URLStringHelper.read ($in);
109 return $result;
110 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
111 $in = $ex.getInputStream ();
112 String _id = $ex.getId ();
113 if (_id.equals ("IDL:omg.org/CosNaming/NamingContextExt/InvalidAddress:1.0"))
114 throw org.omg.CosNaming.NamingContextExtPackage.InvalidAddressHelper.read ($in);
115 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
116 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
117 else
118 throw new org.omg.CORBA.MARSHAL (_id);
119 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
120 return to_url (addr, sn );
121 } finally {
122 _releaseReply ($in);
123 }
124 } // to_url
125
126
127 /**
128 * The resolve_str operation is the process of retrieving an object
129 * bound to a stringified name in a given context. The given name must exactly
130 * match the bound name. The naming service does not return the type
131 * of the object. Clients are responsible for "narrowing" the object
132 * to the appropriate type. That is, clients typically cast the returned
133 * object from Object to a more specialized interface.
134 *
135 * @param n String Name of the object <p>
136 *
137 * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
138 *
139 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
140 * given up for some reason. The client, however, may be able to
141 * continue the operation at the returned naming context.<p>
142 *
143 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
144 */
145 public org.omg.CORBA.Object resolve_str (String n) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
146 {
147 org.omg.CORBA.portable.InputStream $in = null;
148 try {
149 org.omg.CORBA.portable.OutputStream $out = _request ("resolve_str", true);
150 org.omg.CosNaming.NamingContextExtPackage.StringNameHelper.write ($out, n);
151 $in = _invoke ($out);
152 org.omg.CORBA.Object $result = org.omg.CORBA.ObjectHelper.read ($in);
153 return $result;
154 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
155 $in = $ex.getInputStream ();
156 String _id = $ex.getId ();
157 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
158 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
159 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
160 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
161 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
162 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
163 else
164 throw new org.omg.CORBA.MARSHAL (_id);
165 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
166 return resolve_str (n );
167 } finally {
168 _releaseReply ($in);
169 }
170 } // resolve_str
171
172
173 /**
174 * Creates a binding of a name and an object in the naming context.
175 * Naming contexts that are bound using bind do not participate in name
176 * resolution when compound names are passed to be resolved.
177 *
178 * @param n Name of the object <p>
179 *
180 * @param obj The Object to bind with the given name<p>
181 *
182 * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
183 *
184 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
185 * given up for some reason. The client, however, may be able to
186 * continue the operation at the returned naming context.<p>
187 *
188 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
189 *
190 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound Indicates an object is already
191 * bound to the specified name.<p>
192 */
193 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
194 {
195 org.omg.CORBA.portable.InputStream $in = null;
196 try {
197 org.omg.CORBA.portable.OutputStream $out = _request ("bind", true);
198 org.omg.CosNaming.NameHelper.write ($out, n);
199 org.omg.CORBA.ObjectHelper.write ($out, obj);
200 $in = _invoke ($out);
201 return;
202 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
203 $in = $ex.getInputStream ();
204 String _id = $ex.getId ();
205 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
206 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
207 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
208 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
209 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
210 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
211 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0"))
212 throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in);
213 else
214 throw new org.omg.CORBA.MARSHAL (_id);
215 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
216 bind (n, obj );
217 } finally {
218 _releaseReply ($in);
219 }
220 } // bind
221
222
223 /**
224 * Names an object that is a naming context. Naming contexts that
225 * are bound using bind_context() participate in name resolution
226 * when compound names are passed to be resolved.
227 *
228 * @param n Name of the object <p>
229 *
230 * @param nc NamingContect object to bind with the given name <p>
231 *
232 * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
233 *
234 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
235 * given up for some reason. The client, however, may be able to
236 * continue the operation at the returned naming context.<p>
237 *
238 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
239 *
240 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound Indicates an object is already
241 * bound to the specified name.<p>
242 */
243 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
244 {
245 org.omg.CORBA.portable.InputStream $in = null;
246 try {
247 org.omg.CORBA.portable.OutputStream $out = _request ("bind_context", true);
248 org.omg.CosNaming.NameHelper.write ($out, n);
249 org.omg.CosNaming.NamingContextHelper.write ($out, nc);
250 $in = _invoke ($out);
251 return;
252 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
253 $in = $ex.getInputStream ();
254 String _id = $ex.getId ();
255 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
256 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
257 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
258 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
259 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
260 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
261 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0"))
262 throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in);
263 else
264 throw new org.omg.CORBA.MARSHAL (_id);
265 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
266 bind_context (n, nc );
267 } finally {
268 _releaseReply ($in);
269 }
270 } // bind_context
271
272
273 /**
274 * Creates a binding of a name and an object in the naming context
275 * even if the name is already bound in the context. Naming contexts
276 * that are bound using rebind do not participate in name resolution
277 * when compound names are passed to be resolved.
278 *
279 * @param n Name of the object <p>
280 *
281 * @parm obj The Object to rebind with the given name <p>
282 *
283 * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
284 *
285 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
286 * given up for some reason. The client, however, may be able to
287 * continue the operation at the returned naming context.<p>
288 *
289 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
290 */
291 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
292 {
293 org.omg.CORBA.portable.InputStream $in = null;
294 try {
295 org.omg.CORBA.portable.OutputStream $out = _request ("rebind", true);
296 org.omg.CosNaming.NameHelper.write ($out, n);
297 org.omg.CORBA.ObjectHelper.write ($out, obj);
298 $in = _invoke ($out);
299 return;
300 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
301 $in = $ex.getInputStream ();
302 String _id = $ex.getId ();
303 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
304 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
305 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
306 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
307 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
308 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
309 else
310 throw new org.omg.CORBA.MARSHAL (_id);
311 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
312 rebind (n, obj );
313 } finally {
314 _releaseReply ($in);
315 }
316 } // rebind
317
318
319 /**
320 * Creates a binding of a name and a naming context in the naming
321 * context even if the name is already bound in the context. Naming
322 * contexts that are bound using rebind_context() participate in name
323 * resolution when compound names are passed to be resolved.
324 *
325 * @param n Name of the object <p>
326 *
327 * @param nc NamingContect object to rebind with the given name <p>
328 *
329 * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
330 *
331 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
332 * given up for some reason. The client, however, may be able to
333 * continue the operation at the returned naming context.<p>
334 *
335 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
336 */
337 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
338 {
339 org.omg.CORBA.portable.InputStream $in = null;
340 try {
341 org.omg.CORBA.portable.OutputStream $out = _request ("rebind_context", true);
342 org.omg.CosNaming.NameHelper.write ($out, n);
343 org.omg.CosNaming.NamingContextHelper.write ($out, nc);
344 $in = _invoke ($out);
345 return;
346 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
347 $in = $ex.getInputStream ();
348 String _id = $ex.getId ();
349 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
350 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
351 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
352 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
353 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
354 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
355 else
356 throw new org.omg.CORBA.MARSHAL (_id);
357 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
358 rebind_context (n, nc );
359 } finally {
360 _releaseReply ($in);
361 }
362 } // rebind_context
363
364
365 /**
366 * The resolve operation is the process of retrieving an object
367 * bound to a name in a given context. The given name must exactly
368 * match the bound name. The naming service does not return the type
369 * of the object. Clients are responsible for "narrowing" the object
370 * to the appropriate type. That is, clients typically cast the returned
371 * object from Object to a more specialized interface.
372 *
373 * @param n Name of the object <p>
374 *
375 * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
376 *
377 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
378 * given up for some reason. The client, however, may be able to
379 * continue the operation at the returned naming context.<p>
380 *
381 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
382 */
383 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
384 {
385 org.omg.CORBA.portable.InputStream $in = null;
386 try {
387 org.omg.CORBA.portable.OutputStream $out = _request ("resolve", true);
388 org.omg.CosNaming.NameHelper.write ($out, n);
389 $in = _invoke ($out);
390 org.omg.CORBA.Object $result = org.omg.CORBA.ObjectHelper.read ($in);
391 return $result;
392 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
393 $in = $ex.getInputStream ();
394 String _id = $ex.getId ();
395 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
396 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
397 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
398 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
399 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
400 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
401 else
402 throw new org.omg.CORBA.MARSHAL (_id);
403 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
404 return resolve (n );
405 } finally {
406 _releaseReply ($in);
407 }
408 } // resolve
409
410
411 /**
412 * The unbind operation removes a name binding from a context.
413 *
414 * @param n Name of the object <p>
415 *
416 * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
417 *
418 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
419 * given up for some reason. The client, however, may be able to
420 * continue the operation at the returned naming context.<p>
421 *
422 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
423 */
424 public void unbind (org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
425 {
426 org.omg.CORBA.portable.InputStream $in = null;
427 try {
428 org.omg.CORBA.portable.OutputStream $out = _request ("unbind", true);
429 org.omg.CosNaming.NameHelper.write ($out, n);
430 $in = _invoke ($out);
431 return;
432 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
433 $in = $ex.getInputStream ();
434 String _id = $ex.getId ();
435 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
436 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
437 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
438 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
439 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
440 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
441 else
442 throw new org.omg.CORBA.MARSHAL (_id);
443 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
444 unbind (n );
445 } finally {
446 _releaseReply ($in);
447 }
448 } // unbind
449
450
451 /**
452 * The list operation allows a client to iterate through a set of
453 * bindings in a naming context. <p>
454 *
455 * The list operation returns at most the requested number of
456 * bindings in BindingList bl.
457 * <ul>
458 * <li>If the naming context contains additional
459 * bindings, the list operation returns a BindingIterator with the
460 * additional bindings.
461 * <li>If the naming context does not contain additional
462 * bindings, the binding iterator is a nil object reference.
463 * </ul>
464 *
465 * @param how_many the maximum number of bindings to return <p>
466 *
467 * @param bl the returned list of bindings <p>
468 *
469 * @param bi the returned binding iterator <p>
470 */
471 public void list (int how_many, org.omg.CosNaming.BindingListHolder bl, org.omg.CosNaming.BindingIteratorHolder bi)
472 {
473 org.omg.CORBA.portable.InputStream $in = null;
474 try {
475 org.omg.CORBA.portable.OutputStream $out = _request ("list", true);
476 $out.write_ulong (how_many);
477 $in = _invoke ($out);
478 bl.value = org.omg.CosNaming.BindingListHelper.read ($in);
479 bi.value = org.omg.CosNaming.BindingIteratorHelper.read ($in);
480 return;
481 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
482 $in = $ex.getInputStream ();
483 String _id = $ex.getId ();
484 throw new org.omg.CORBA.MARSHAL (_id);
485 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
486 list (how_many, bl, bi );
487 } finally {
488 _releaseReply ($in);
489 }
490 } // list
491
492
493 /**
494 * This operation returns a naming context implemented by the same
495 * naming server as the context on which the operation was invoked.
496 * The new context is not bound to any name.
497 */
498 public org.omg.CosNaming.NamingContext new_context ()
499 {
500 org.omg.CORBA.portable.InputStream $in = null;
501 try {
502 org.omg.CORBA.portable.OutputStream $out = _request ("new_context", true);
503 $in = _invoke ($out);
504 org.omg.CosNaming.NamingContext $result = org.omg.CosNaming.NamingContextHelper.read ($in);
505 return $result;
506 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
507 $in = $ex.getInputStream ();
508 String _id = $ex.getId ();
509 throw new org.omg.CORBA.MARSHAL (_id);
510 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
511 return new_context ( );
512 } finally {
513 _releaseReply ($in);
514 }
515 } // new_context
516
517
518 /**
519 * This operation creates a new context and binds it to the name
520 * supplied as an argument. The newly-created context is implemented
521 * by the same naming server as the context in which it was bound (that
522 * is, the naming server that implements the context denoted by the
523 * name argument excluding the last component).
524 *
525 * @param n Name of the object <p>
526 *
527 * @exception org.omg.CosNaming.NamingContextPackage.NotFound Indicates the name does not identify a binding.<p>
528 *
529 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound Indicates an object is already
530 * bound to the specified name.<p>
531 *
532 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed Indicates that the implementation has
533 * given up for some reason. The client, however, may be able to
534 * continue the operation at the returned naming context.<p>
535 *
536 * @exception org.omg.CosNaming.NamingContextPackage.InvalidName Indicates that the name is invalid. <p>
537 */
538 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
539 {
540 org.omg.CORBA.portable.InputStream $in = null;
541 try {
542 org.omg.CORBA.portable.OutputStream $out = _request ("bind_new_context", true);
543 org.omg.CosNaming.NameHelper.write ($out, n);
544 $in = _invoke ($out);
545 org.omg.CosNaming.NamingContext $result = org.omg.CosNaming.NamingContextHelper.read ($in);
546 return $result;
547 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
548 $in = $ex.getInputStream ();
549 String _id = $ex.getId ();
550 if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
551 throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
552 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0"))
553 throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in);
554 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
555 throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
556 else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
557 throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
558 else
559 throw new org.omg.CORBA.MARSHAL (_id);
560 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
561 return bind_new_context (n );
562 } finally {
563 _releaseReply ($in);
564 }
565 } // bind_new_context
566
567 // Type-specific CORBA::Object operations
568 private static String[] __ids = {
569 "IDL:omg.org/CosNaming/NamingContextExt:1.0",
570 "IDL:omg.org/CosNaming/NamingContext:1.0"};
571
572 public String[] _ids ()
573 {
574 return (String[])__ids.clone ();
575 }
576
577 private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
578 {
579 String str = s.readUTF ();
580 String[] args = null;
581 java.util.Properties props = null;
582 org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
583 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
584 _set_delegate (delegate);
585 }
586
587 private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
588 {
589 String[] args = null;
590 java.util.Properties props = null;
591 String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
592 s.writeUTF (str);
593 }
594 } // class _NamingContextExtStub