4
|
1 |
/*
|
5555
|
2 |
* Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
|
4
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
5555
|
7 |
* published by the Free Software Foundation. Oracle designates this
|
4
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
5555
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
4
|
10 |
*
|
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
* accompanied this code).
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License version
|
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
*
|
5555
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
* or visit www.oracle.com if you need additional information or have any
|
|
23 |
* questions.
|
4
|
24 |
*/
|
|
25 |
/*
|
|
26 |
* File: ./org/omg/CosNaming/_BindingIteratorImplBase.java
|
|
27 |
* From: nameservice.idl
|
|
28 |
* Date: Tue Aug 11 03:12:09 1998
|
|
29 |
* By: idltojava Java IDL 1.2 Aug 11 1998 02:00:18
|
|
30 |
* @deprecated Deprecated in JDK 1.4.
|
|
31 |
*/
|
|
32 |
|
|
33 |
package org.omg.CosNaming;
|
|
34 |
public abstract class _BindingIteratorImplBase extends org.omg.CORBA.DynamicImplementation implements org.omg.CosNaming.BindingIterator {
|
|
35 |
// Constructor
|
|
36 |
public _BindingIteratorImplBase() {
|
|
37 |
super();
|
|
38 |
}
|
|
39 |
// Type strings for this class and its superclases
|
|
40 |
private static final String _type_ids[] = {
|
|
41 |
"IDL:omg.org/CosNaming/BindingIterator:1.0"
|
|
42 |
};
|
|
43 |
|
|
44 |
public String[] _ids() { return (String[]) _type_ids.clone(); }
|
|
45 |
|
|
46 |
private static java.util.Dictionary _methods = new java.util.Hashtable();
|
|
47 |
static {
|
|
48 |
_methods.put("next_one", new java.lang.Integer(0));
|
|
49 |
_methods.put("next_n", new java.lang.Integer(1));
|
|
50 |
_methods.put("destroy", new java.lang.Integer(2));
|
|
51 |
}
|
|
52 |
// DSI Dispatch call
|
|
53 |
public void invoke(org.omg.CORBA.ServerRequest r) {
|
|
54 |
switch (((java.lang.Integer) _methods.get(r.op_name())).intValue()) {
|
|
55 |
case 0: // org.omg.CosNaming.BindingIterator.next_one
|
|
56 |
{
|
|
57 |
org.omg.CORBA.NVList _list = _orb().create_list(0);
|
|
58 |
org.omg.CORBA.Any _b = _orb().create_any();
|
|
59 |
_b.type(org.omg.CosNaming.BindingHelper.type());
|
|
60 |
_list.add_value("b", _b, org.omg.CORBA.ARG_OUT.value);
|
|
61 |
r.params(_list);
|
|
62 |
org.omg.CosNaming.BindingHolder b;
|
|
63 |
b = new org.omg.CosNaming.BindingHolder();
|
|
64 |
boolean ___result;
|
|
65 |
___result = this.next_one(b);
|
|
66 |
org.omg.CosNaming.BindingHelper.insert(_b, b.value);
|
|
67 |
org.omg.CORBA.Any __result = _orb().create_any();
|
|
68 |
__result.insert_boolean(___result);
|
|
69 |
r.result(__result);
|
|
70 |
}
|
|
71 |
break;
|
|
72 |
case 1: // org.omg.CosNaming.BindingIterator.next_n
|
|
73 |
{
|
|
74 |
org.omg.CORBA.NVList _list = _orb().create_list(0);
|
|
75 |
org.omg.CORBA.Any _how_many = _orb().create_any();
|
|
76 |
_how_many.type(org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_ulong));
|
|
77 |
_list.add_value("how_many", _how_many, org.omg.CORBA.ARG_IN.value);
|
|
78 |
org.omg.CORBA.Any _bl = _orb().create_any();
|
|
79 |
_bl.type(org.omg.CosNaming.BindingListHelper.type());
|
|
80 |
_list.add_value("bl", _bl, org.omg.CORBA.ARG_OUT.value);
|
|
81 |
r.params(_list);
|
|
82 |
int how_many;
|
|
83 |
how_many = _how_many.extract_ulong();
|
|
84 |
org.omg.CosNaming.BindingListHolder bl;
|
|
85 |
bl = new org.omg.CosNaming.BindingListHolder();
|
|
86 |
boolean ___result;
|
|
87 |
___result = this.next_n(how_many, bl);
|
|
88 |
org.omg.CosNaming.BindingListHelper.insert(_bl, bl.value);
|
|
89 |
org.omg.CORBA.Any __result = _orb().create_any();
|
|
90 |
__result.insert_boolean(___result);
|
|
91 |
r.result(__result);
|
|
92 |
}
|
|
93 |
break;
|
|
94 |
case 2: // org.omg.CosNaming.BindingIterator.destroy
|
|
95 |
{
|
|
96 |
org.omg.CORBA.NVList _list = _orb().create_list(0);
|
|
97 |
r.params(_list);
|
|
98 |
this.destroy();
|
|
99 |
org.omg.CORBA.Any __return = _orb().create_any();
|
|
100 |
__return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void));
|
|
101 |
r.result(__return);
|
|
102 |
}
|
|
103 |
break;
|
|
104 |
default:
|
|
105 |
throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
|
|
106 |
}
|
|
107 |
}
|
|
108 |
}
|