File: BindingIteratorPOA.java

package info (click to toggle)
openjdk-6 6b11-9.1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 75,608 kB
  • ctags: 37,292
  • sloc: java: 184,215; cpp: 17,212; sh: 3,935; makefile: 2,117; ansic: 925; python: 173; asm: 83
file content (123 lines) | stat: -rw-r--r-- 3,677 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
package org.omg.CosNaming;


/**
* org/omg/CosNaming/BindingIteratorPOA.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/org/omg/CosNaming/nameservice.idl
* Friday, May 25, 2007 3:39:57 o'clock PM GMT-05:00
*/


/**
   * The BindingIterator interface allows a client to iterate through
   * the bindings using the next_one or next_n operations.
   * 
   * The bindings iterator is obtained by using the <tt>list</tt>
   * method on the <tt>NamingContext</tt>. 
   * @see org.omg.CosNaming.NamingContext#list
   */
public abstract class BindingIteratorPOA extends org.omg.PortableServer.Servant
 implements org.omg.CosNaming.BindingIteratorOperations, org.omg.CORBA.portable.InvokeHandler
{

  // Constructors

  private static java.util.Hashtable _methods = new java.util.Hashtable ();
  static
  {
    _methods.put ("next_one", new java.lang.Integer (0));
    _methods.put ("next_n", new java.lang.Integer (1));
    _methods.put ("destroy", new java.lang.Integer (2));
  }

  public org.omg.CORBA.portable.OutputStream _invoke (String $method,
                                org.omg.CORBA.portable.InputStream in,
                                org.omg.CORBA.portable.ResponseHandler $rh)
  {
    org.omg.CORBA.portable.OutputStream out = null;
    java.lang.Integer __method = (java.lang.Integer)_methods.get ($method);
    if (__method == null)
      throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);

    switch (__method.intValue ())
    {

  /**
       * This operation returns the next binding. If there are no more
       * bindings, false is returned.
       * 
       * @param b the returned binding
       */
       case 0:  // CosNaming/BindingIterator/next_one
       {
         org.omg.CosNaming.BindingHolder b = new org.omg.CosNaming.BindingHolder ();
         boolean $result = false;
         $result = this.next_one (b);
         out = $rh.createReply();
         out.write_boolean ($result);
         org.omg.CosNaming.BindingHelper.write (out, b.value);
         break;
       }


  /**
       * This operation returns at most the requested number of bindings.
       * 
       * @param how_many the maximum number of bindings tro return <p>
       * 
       * @param bl the returned bindings
       */
       case 1:  // CosNaming/BindingIterator/next_n
       {
         int how_many = in.read_ulong ();
         org.omg.CosNaming.BindingListHolder bl = new org.omg.CosNaming.BindingListHolder ();
         boolean $result = false;
         $result = this.next_n (how_many, bl);
         out = $rh.createReply();
         out.write_boolean ($result);
         org.omg.CosNaming.BindingListHelper.write (out, bl.value);
         break;
       }


  /**
       * This operation destroys the iterator.
       */
       case 2:  // CosNaming/BindingIterator/destroy
       {
         this.destroy ();
         out = $rh.createReply();
         break;
       }

       default:
         throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
    }

    return out;
  } // _invoke

  // Type-specific CORBA::Object operations
  private static String[] __ids = {
    "IDL:omg.org/CosNaming/BindingIterator:1.0"};

  public String[] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId)
  {
    return (String[])__ids.clone ();
  }

  public BindingIterator _this() 
  {
    return BindingIteratorHelper.narrow(
    super._this_object());
  }

  public BindingIterator _this(org.omg.CORBA.ORB orb) 
  {
    return BindingIteratorHelper.narrow(
    super._this_object(orb));
  }


} // class BindingIteratorPOA