KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > CosNaming > _NamingContextImplBase


1 /*
2  * @(#)_NamingContextImplBase.java 1.15 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 /*
8  * File: ./org/omg/CosNaming/_NamingContextImplBase.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  * @deprecated Deprecated in JDK 1.4.
13  */

14
15 package org.omg.CosNaming;
16 public abstract class _NamingContextImplBase extends org.omg.CORBA.DynamicImplementation JavaDoc implements org.omg.CosNaming.NamingContext JavaDoc {
17     // Constructor
18
public _NamingContextImplBase() {
19     super();
20     }
21     // Type strings for this class and its superclases
22
private static final String JavaDoc _type_ids[] = {
23         "IDL:omg.org/CosNaming/NamingContext:1.0"
24     };
25
26     public String JavaDoc[] _ids() { return (String JavaDoc[]) _type_ids.clone(); }
27
28     private static java.util.Dictionary JavaDoc _methods = new java.util.Hashtable JavaDoc();
29     static {
30     _methods.put("bind", new java.lang.Integer JavaDoc(0));
31     _methods.put("bind_context", new java.lang.Integer JavaDoc(1));
32     _methods.put("rebind", new java.lang.Integer JavaDoc(2));
33     _methods.put("rebind_context", new java.lang.Integer JavaDoc(3));
34     _methods.put("resolve", new java.lang.Integer JavaDoc(4));
35     _methods.put("unbind", new java.lang.Integer JavaDoc(5));
36     _methods.put("list", new java.lang.Integer JavaDoc(6));
37     _methods.put("new_context", new java.lang.Integer JavaDoc(7));
38     _methods.put("bind_new_context", new java.lang.Integer JavaDoc(8));
39     _methods.put("destroy", new java.lang.Integer JavaDoc(9));
40     }
41     // DSI Dispatch call
42
public void invoke(org.omg.CORBA.ServerRequest JavaDoc r) {
43     switch (((java.lang.Integer JavaDoc) _methods.get(r.op_name())).intValue()) {
44     case 0: // org.omg.CosNaming.NamingContext.bind
45
{
46         org.omg.CORBA.NVList JavaDoc _list = _orb().create_list(0);
47         org.omg.CORBA.Any JavaDoc _n = _orb().create_any();
48         _n.type(org.omg.CosNaming.NameHelper.type());
49         _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value);
50         org.omg.CORBA.Any JavaDoc _obj = _orb().create_any();
51         _obj.type(org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_objref));
52         _list.add_value("obj", _obj, org.omg.CORBA.ARG_IN.value);
53         r.params(_list);
54         org.omg.CosNaming.NameComponent JavaDoc[] n;
55         n = org.omg.CosNaming.NameHelper.extract(_n);
56         org.omg.CORBA.Object JavaDoc obj;
57         obj = _obj.extract_Object();
58         try {
59             this.bind(n, obj);
60         }
61         catch (org.omg.CosNaming.NamingContextPackage.NotFound JavaDoc e0) {
62             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
63             org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0);
64             r.except(_except);
65             return;
66         }
67         catch (org.omg.CosNaming.NamingContextPackage.CannotProceed JavaDoc e1) {
68             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
69             org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e1);
70             r.except(_except);
71             return;
72         }
73         catch (org.omg.CosNaming.NamingContextPackage.InvalidName JavaDoc e2) {
74             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
75             org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e2);
76             r.except(_except);
77             return;
78         }
79         catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound JavaDoc e3) {
80             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
81             org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.insert(_except, e3);
82             r.except(_except);
83             return;
84         }
85         org.omg.CORBA.Any JavaDoc __return = _orb().create_any();
86         __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void));
87         r.result(__return);
88         }
89         break;
90     case 1: // org.omg.CosNaming.NamingContext.bind_context
91
{
92         org.omg.CORBA.NVList JavaDoc _list = _orb().create_list(0);
93         org.omg.CORBA.Any JavaDoc _n = _orb().create_any();
94         _n.type(org.omg.CosNaming.NameHelper.type());
95         _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value);
96         org.omg.CORBA.Any JavaDoc _nc = _orb().create_any();
97         _nc.type(org.omg.CosNaming.NamingContextHelper.type());
98         _list.add_value("nc", _nc, org.omg.CORBA.ARG_IN.value);
99         r.params(_list);
100         org.omg.CosNaming.NameComponent JavaDoc[] n;
101         n = org.omg.CosNaming.NameHelper.extract(_n);
102         org.omg.CosNaming.NamingContext JavaDoc nc;
103         nc = org.omg.CosNaming.NamingContextHelper.extract(_nc);
104         try {
105             this.bind_context(n, nc);
106         }
107         catch (org.omg.CosNaming.NamingContextPackage.NotFound JavaDoc e0) {
108             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
109             org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0);
110             r.except(_except);
111             return;
112         }
113         catch (org.omg.CosNaming.NamingContextPackage.CannotProceed JavaDoc e1) {
114             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
115             org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e1);
116             r.except(_except);
117             return;
118         }
119         catch (org.omg.CosNaming.NamingContextPackage.InvalidName JavaDoc e2) {
120             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
121             org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e2);
122             r.except(_except);
123             return;
124         }
125         catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound JavaDoc e3) {
126             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
127             org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.insert(_except, e3);
128             r.except(_except);
129             return;
130         }
131         org.omg.CORBA.Any JavaDoc __return = _orb().create_any();
132         __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void));
133         r.result(__return);
134         }
135         break;
136     case 2: // org.omg.CosNaming.NamingContext.rebind
137
{
138         org.omg.CORBA.NVList JavaDoc _list = _orb().create_list(0);
139         org.omg.CORBA.Any JavaDoc _n = _orb().create_any();
140         _n.type(org.omg.CosNaming.NameHelper.type());
141         _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value);
142         org.omg.CORBA.Any JavaDoc _obj = _orb().create_any();
143         _obj.type(org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_objref));
144         _list.add_value("obj", _obj, org.omg.CORBA.ARG_IN.value);
145         r.params(_list);
146         org.omg.CosNaming.NameComponent JavaDoc[] n;
147         n = org.omg.CosNaming.NameHelper.extract(_n);
148         org.omg.CORBA.Object JavaDoc obj;
149         obj = _obj.extract_Object();
150         try {
151             this.rebind(n, obj);
152         }
153         catch (org.omg.CosNaming.NamingContextPackage.NotFound JavaDoc e0) {
154             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
155             org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0);
156             r.except(_except);
157             return;
158         }
159         catch (org.omg.CosNaming.NamingContextPackage.CannotProceed JavaDoc e1) {
160             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
161             org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e1);
162             r.except(_except);
163             return;
164         }
165         catch (org.omg.CosNaming.NamingContextPackage.InvalidName JavaDoc e2) {
166             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
167             org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e2);
168             r.except(_except);
169             return;
170         }
171         org.omg.CORBA.Any JavaDoc __return = _orb().create_any();
172         __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void));
173         r.result(__return);
174         }
175         break;
176     case 3: // org.omg.CosNaming.NamingContext.rebind_context
177
{
178         org.omg.CORBA.NVList JavaDoc _list = _orb().create_list(0);
179         org.omg.CORBA.Any JavaDoc _n = _orb().create_any();
180         _n.type(org.omg.CosNaming.NameHelper.type());
181         _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value);
182         org.omg.CORBA.Any JavaDoc _nc = _orb().create_any();
183         _nc.type(org.omg.CosNaming.NamingContextHelper.type());
184         _list.add_value("nc", _nc, org.omg.CORBA.ARG_IN.value);
185         r.params(_list);
186         org.omg.CosNaming.NameComponent JavaDoc[] n;
187         n = org.omg.CosNaming.NameHelper.extract(_n);
188         org.omg.CosNaming.NamingContext JavaDoc nc;
189         nc = org.omg.CosNaming.NamingContextHelper.extract(_nc);
190         try {
191             this.rebind_context(n, nc);
192         }
193         catch (org.omg.CosNaming.NamingContextPackage.NotFound JavaDoc e0) {
194             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
195             org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0);
196             r.except(_except);
197             return;
198         }
199         catch (org.omg.CosNaming.NamingContextPackage.CannotProceed JavaDoc e1) {
200             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
201             org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e1);
202             r.except(_except);
203             return;
204         }
205         catch (org.omg.CosNaming.NamingContextPackage.InvalidName JavaDoc e2) {
206             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
207             org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e2);
208             r.except(_except);
209             return;
210         }
211         org.omg.CORBA.Any JavaDoc __return = _orb().create_any();
212         __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void));
213         r.result(__return);
214         }
215         break;
216     case 4: // org.omg.CosNaming.NamingContext.resolve
217
{
218         org.omg.CORBA.NVList JavaDoc _list = _orb().create_list(0);
219         org.omg.CORBA.Any JavaDoc _n = _orb().create_any();
220         _n.type(org.omg.CosNaming.NameHelper.type());
221         _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value);
222         r.params(_list);
223         org.omg.CosNaming.NameComponent JavaDoc[] n;
224         n = org.omg.CosNaming.NameHelper.extract(_n);
225         org.omg.CORBA.Object JavaDoc ___result;
226         try {
227             ___result = this.resolve(n);
228         }
229         catch (org.omg.CosNaming.NamingContextPackage.NotFound JavaDoc e0) {
230             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
231             org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0);
232             r.except(_except);
233             return;
234         }
235         catch (org.omg.CosNaming.NamingContextPackage.CannotProceed JavaDoc e1) {
236             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
237             org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e1);
238             r.except(_except);
239             return;
240         }
241         catch (org.omg.CosNaming.NamingContextPackage.InvalidName JavaDoc e2) {
242             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
243             org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e2);
244             r.except(_except);
245             return;
246         }
247         org.omg.CORBA.Any JavaDoc __result = _orb().create_any();
248         __result.insert_Object(___result);
249         r.result(__result);
250         }
251         break;
252     case 5: // org.omg.CosNaming.NamingContext.unbind
253
{
254         org.omg.CORBA.NVList JavaDoc _list = _orb().create_list(0);
255         org.omg.CORBA.Any JavaDoc _n = _orb().create_any();
256         _n.type(org.omg.CosNaming.NameHelper.type());
257         _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value);
258         r.params(_list);
259         org.omg.CosNaming.NameComponent JavaDoc[] n;
260         n = org.omg.CosNaming.NameHelper.extract(_n);
261         try {
262             this.unbind(n);
263         }
264         catch (org.omg.CosNaming.NamingContextPackage.NotFound JavaDoc e0) {
265             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
266             org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0);
267             r.except(_except);
268             return;
269         }
270         catch (org.omg.CosNaming.NamingContextPackage.CannotProceed JavaDoc e1) {
271             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
272             org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e1);
273             r.except(_except);
274             return;
275         }
276         catch (org.omg.CosNaming.NamingContextPackage.InvalidName JavaDoc e2) {
277             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
278             org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e2);
279             r.except(_except);
280             return;
281         }
282         org.omg.CORBA.Any JavaDoc __return = _orb().create_any();
283         __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void));
284         r.result(__return);
285         }
286         break;
287     case 6: // org.omg.CosNaming.NamingContext.list
288
{
289         org.omg.CORBA.NVList JavaDoc _list = _orb().create_list(0);
290         org.omg.CORBA.Any JavaDoc _how_many = _orb().create_any();
291         _how_many.type(org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_ulong));
292         _list.add_value("how_many", _how_many, org.omg.CORBA.ARG_IN.value);
293         org.omg.CORBA.Any JavaDoc _bl = _orb().create_any();
294         _bl.type(org.omg.CosNaming.BindingListHelper.type());
295         _list.add_value("bl", _bl, org.omg.CORBA.ARG_OUT.value);
296         org.omg.CORBA.Any JavaDoc _bi = _orb().create_any();
297         _bi.type(org.omg.CosNaming.BindingIteratorHelper.type());
298         _list.add_value("bi", _bi, org.omg.CORBA.ARG_OUT.value);
299         r.params(_list);
300         int how_many;
301         how_many = _how_many.extract_ulong();
302         org.omg.CosNaming.BindingListHolder JavaDoc bl;
303         bl = new org.omg.CosNaming.BindingListHolder JavaDoc();
304         org.omg.CosNaming.BindingIteratorHolder JavaDoc bi;
305         bi = new org.omg.CosNaming.BindingIteratorHolder JavaDoc();
306         this.list(how_many, bl, bi);
307         org.omg.CosNaming.BindingListHelper.insert(_bl, bl.value);
308         org.omg.CosNaming.BindingIteratorHelper.insert(_bi, bi.value);
309         org.omg.CORBA.Any JavaDoc __return = _orb().create_any();
310         __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void));
311         r.result(__return);
312         }
313         break;
314     case 7: // org.omg.CosNaming.NamingContext.new_context
315
{
316         org.omg.CORBA.NVList JavaDoc _list = _orb().create_list(0);
317         r.params(_list);
318         org.omg.CosNaming.NamingContext JavaDoc ___result;
319         ___result = this.new_context();
320         org.omg.CORBA.Any JavaDoc __result = _orb().create_any();
321         org.omg.CosNaming.NamingContextHelper.insert(__result, ___result);
322         r.result(__result);
323         }
324         break;
325     case 8: // org.omg.CosNaming.NamingContext.bind_new_context
326
{
327         org.omg.CORBA.NVList JavaDoc _list = _orb().create_list(0);
328         org.omg.CORBA.Any JavaDoc _n = _orb().create_any();
329         _n.type(org.omg.CosNaming.NameHelper.type());
330         _list.add_value("n", _n, org.omg.CORBA.ARG_IN.value);
331         r.params(_list);
332         org.omg.CosNaming.NameComponent JavaDoc[] n;
333         n = org.omg.CosNaming.NameHelper.extract(_n);
334         org.omg.CosNaming.NamingContext JavaDoc ___result;
335         try {
336             ___result = this.bind_new_context(n);
337         }
338         catch (org.omg.CosNaming.NamingContextPackage.NotFound JavaDoc e0) {
339             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
340             org.omg.CosNaming.NamingContextPackage.NotFoundHelper.insert(_except, e0);
341             r.except(_except);
342             return;
343         }
344         catch (org.omg.CosNaming.NamingContextPackage.AlreadyBound JavaDoc e1) {
345             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
346             org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.insert(_except, e1);
347             r.except(_except);
348             return;
349         }
350         catch (org.omg.CosNaming.NamingContextPackage.CannotProceed JavaDoc e2) {
351             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
352             org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.insert(_except, e2);
353             r.except(_except);
354             return;
355         }
356         catch (org.omg.CosNaming.NamingContextPackage.InvalidName JavaDoc e3) {
357             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
358             org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.insert(_except, e3);
359             r.except(_except);
360             return;
361         }
362         org.omg.CORBA.Any JavaDoc __result = _orb().create_any();
363         org.omg.CosNaming.NamingContextHelper.insert(__result, ___result);
364         r.result(__result);
365         }
366         break;
367     case 9: // org.omg.CosNaming.NamingContext.destroy
368
{
369         org.omg.CORBA.NVList JavaDoc _list = _orb().create_list(0);
370         r.params(_list);
371         try {
372             this.destroy();
373         }
374         catch (org.omg.CosNaming.NamingContextPackage.NotEmpty JavaDoc e0) {
375             org.omg.CORBA.Any JavaDoc _except = _orb().create_any();
376             org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.insert(_except, e0);
377             r.except(_except);
378             return;
379         }
380         org.omg.CORBA.Any JavaDoc __return = _orb().create_any();
381         __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void));
382         r.result(__return);
383         }
384         break;
385     default:
386         throw new org.omg.CORBA.BAD_OPERATION JavaDoc(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
387     }
388     }
389 }
390
Popular Tags