1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/classes/org/omg/CosNaming/_BindingIteratorImplBase.java Wed Apr 27 01:21:28 2016 +0800 1.3 @@ -0,0 +1,108 @@ 1.4 +/* 1.5 + * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved. 1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 + * 1.8 + * This code is free software; you can redistribute it and/or modify it 1.9 + * under the terms of the GNU General Public License version 2 only, as 1.10 + * published by the Free Software Foundation. Oracle designates this 1.11 + * particular file as subject to the "Classpath" exception as provided 1.12 + * by Oracle in the LICENSE file that accompanied this code. 1.13 + * 1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.17 + * version 2 for more details (a copy is included in the LICENSE file that 1.18 + * accompanied this code). 1.19 + * 1.20 + * You should have received a copy of the GNU General Public License version 1.21 + * 2 along with this work; if not, write to the Free Software Foundation, 1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.23 + * 1.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.25 + * or visit www.oracle.com if you need additional information or have any 1.26 + * questions. 1.27 + */ 1.28 +/* 1.29 + * File: ./org/omg/CosNaming/_BindingIteratorImplBase.java 1.30 + * From: nameservice.idl 1.31 + * Date: Tue Aug 11 03:12:09 1998 1.32 + * By: idltojava Java IDL 1.2 Aug 11 1998 02:00:18 1.33 + * @deprecated Deprecated in JDK 1.4. 1.34 + */ 1.35 + 1.36 +package org.omg.CosNaming; 1.37 +public abstract class _BindingIteratorImplBase extends org.omg.CORBA.DynamicImplementation implements org.omg.CosNaming.BindingIterator { 1.38 + // Constructor 1.39 + public _BindingIteratorImplBase() { 1.40 + super(); 1.41 + } 1.42 + // Type strings for this class and its superclases 1.43 + private static final String _type_ids[] = { 1.44 + "IDL:omg.org/CosNaming/BindingIterator:1.0" 1.45 + }; 1.46 + 1.47 + public String[] _ids() { return (String[]) _type_ids.clone(); } 1.48 + 1.49 + private static java.util.Dictionary _methods = new java.util.Hashtable(); 1.50 + static { 1.51 + _methods.put("next_one", new java.lang.Integer(0)); 1.52 + _methods.put("next_n", new java.lang.Integer(1)); 1.53 + _methods.put("destroy", new java.lang.Integer(2)); 1.54 + } 1.55 + // DSI Dispatch call 1.56 + public void invoke(org.omg.CORBA.ServerRequest r) { 1.57 + switch (((java.lang.Integer) _methods.get(r.op_name())).intValue()) { 1.58 + case 0: // org.omg.CosNaming.BindingIterator.next_one 1.59 + { 1.60 + org.omg.CORBA.NVList _list = _orb().create_list(0); 1.61 + org.omg.CORBA.Any _b = _orb().create_any(); 1.62 + _b.type(org.omg.CosNaming.BindingHelper.type()); 1.63 + _list.add_value("b", _b, org.omg.CORBA.ARG_OUT.value); 1.64 + r.params(_list); 1.65 + org.omg.CosNaming.BindingHolder b; 1.66 + b = new org.omg.CosNaming.BindingHolder(); 1.67 + boolean ___result; 1.68 + ___result = this.next_one(b); 1.69 + org.omg.CosNaming.BindingHelper.insert(_b, b.value); 1.70 + org.omg.CORBA.Any __result = _orb().create_any(); 1.71 + __result.insert_boolean(___result); 1.72 + r.result(__result); 1.73 + } 1.74 + break; 1.75 + case 1: // org.omg.CosNaming.BindingIterator.next_n 1.76 + { 1.77 + org.omg.CORBA.NVList _list = _orb().create_list(0); 1.78 + org.omg.CORBA.Any _how_many = _orb().create_any(); 1.79 + _how_many.type(org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_ulong)); 1.80 + _list.add_value("how_many", _how_many, org.omg.CORBA.ARG_IN.value); 1.81 + org.omg.CORBA.Any _bl = _orb().create_any(); 1.82 + _bl.type(org.omg.CosNaming.BindingListHelper.type()); 1.83 + _list.add_value("bl", _bl, org.omg.CORBA.ARG_OUT.value); 1.84 + r.params(_list); 1.85 + int how_many; 1.86 + how_many = _how_many.extract_ulong(); 1.87 + org.omg.CosNaming.BindingListHolder bl; 1.88 + bl = new org.omg.CosNaming.BindingListHolder(); 1.89 + boolean ___result; 1.90 + ___result = this.next_n(how_many, bl); 1.91 + org.omg.CosNaming.BindingListHelper.insert(_bl, bl.value); 1.92 + org.omg.CORBA.Any __result = _orb().create_any(); 1.93 + __result.insert_boolean(___result); 1.94 + r.result(__result); 1.95 + } 1.96 + break; 1.97 + case 2: // org.omg.CosNaming.BindingIterator.destroy 1.98 + { 1.99 + org.omg.CORBA.NVList _list = _orb().create_list(0); 1.100 + r.params(_list); 1.101 + this.destroy(); 1.102 + org.omg.CORBA.Any __return = _orb().create_any(); 1.103 + __return.type(_orb().get_primitive_tc(org.omg.CORBA.TCKind.tk_void)); 1.104 + r.result(__return); 1.105 + } 1.106 + break; 1.107 + default: 1.108 + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 1.109 + } 1.110 + } 1.111 +}