KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)_BindingIteratorImplBase.java 1.16 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/_BindingIteratorImplBase.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 _BindingIteratorImplBase extends org.omg.CORBA.DynamicImplementation JavaDoc implements org.omg.CosNaming.BindingIterator JavaDoc {
17     // Constructor
18
public _BindingIteratorImplBase() {
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/BindingIterator: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("next_one", new java.lang.Integer JavaDoc(0));
31     _methods.put("next_n", new java.lang.Integer JavaDoc(1));
32     _methods.put("destroy", new java.lang.Integer JavaDoc(2));
33     }
34     // DSI Dispatch call
35
public void invoke(org.omg.CORBA.ServerRequest JavaDoc r) {
36     switch (((java.lang.Integer JavaDoc) _methods.get(r.op_name())).intValue()) {
37     case 0: // org.omg.CosNaming.BindingIterator.next_one
38
{
39         org.omg.CORBA.NVList JavaDoc _list = _orb().create_list(0);
40         org.omg.CORBA.Any JavaDoc _b = _orb().create_any();
41         _b.type(org.omg.CosNaming.BindingHelper.type());
42         _list.add_value("b", _b, org.omg.CORBA.ARG_OUT.value);
43         r.params(_list);
44         org.omg.CosNaming.BindingHolder JavaDoc b;
45         b = new org.omg.CosNaming.BindingHolder JavaDoc();
46         boolean ___result;
47         ___result = this.next_one(b);
48         org.omg.CosNaming.BindingHelper.insert(_b, b.value);
49         org.omg.CORBA.Any JavaDoc __result = _orb().create_any();
50         __result.insert_boolean(___result);
51         r.result(__result);
52         }
53         break;
54     case 1: // org.omg.CosNaming.BindingIterator.next_n
55
{
56         org.omg.CORBA.NVList JavaDoc _list = _orb().create_list(0);
57         org.omg.CORBA.Any JavaDoc _how_many = _orb().create_any();
58         _how_many.type(org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_ulong));
59         _list.add_value("how_many", _how_many, org.omg.CORBA.ARG_IN.value);
60         org.omg.CORBA.Any JavaDoc _bl = _orb().create_any();
61         _bl.type(org.omg.CosNaming.BindingListHelper.type());
62         _list.add_value("bl", _bl, org.omg.CORBA.ARG_OUT.value);
63         r.params(_list);
64         int how_many;
65         how_many = _how_many.extract_ulong();
66         org.omg.CosNaming.BindingListHolder JavaDoc bl;
67         bl = new org.omg.CosNaming.BindingListHolder JavaDoc();
68         boolean ___result;
69         ___result = this.next_n(how_many, bl);
70         org.omg.CosNaming.BindingListHelper.insert(_bl, bl.value);
71         org.omg.CORBA.Any JavaDoc __result = _orb().create_any();
72         __result.insert_boolean(___result);
73         r.result(__result);
74         }
75         break;
76     case 2: // org.omg.CosNaming.BindingIterator.destroy
77
{
78         org.omg.CORBA.NVList JavaDoc _list = _orb().create_list(0);
79         r.params(_list);
80         this.destroy();
81         org.omg.CORBA.Any JavaDoc __return = _orb().create_any();
82         __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void));
83         r.result(__return);
84         }
85         break;
86     default:
87         throw new org.omg.CORBA.BAD_OPERATION JavaDoc(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
88     }
89     }
90 }
91
Popular Tags