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