KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.CosNaming;
2
3
4 /**
5 * org/omg/CosNaming/BindingTypeHelper.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.2"
7 * from ../../../../src/share/classes/org/omg/CosNaming/nameservice.idl
8 * Saturday, February 9, 2008 9:40:10 AM GMT
9 */

10
11
12 /**
13    * Specifies whether the given binding is for a object (that is not a
14    * naming context) or for a naming context.
15    */

16 abstract public class BindingTypeHelper
17 {
18   private static String JavaDoc _id = "IDL:omg.org/CosNaming/BindingType:1.0";
19
20   public static void insert (org.omg.CORBA.Any JavaDoc a, org.omg.CosNaming.BindingType JavaDoc that)
21   {
22     org.omg.CORBA.portable.OutputStream JavaDoc out = a.create_output_stream ();
23     a.type (type ());
24     write (out, that);
25     a.read_value (out.create_input_stream (), type ());
26   }
27
28   public static org.omg.CosNaming.BindingType JavaDoc extract (org.omg.CORBA.Any JavaDoc a)
29   {
30     return read (a.create_input_stream ());
31   }
32
33   private static org.omg.CORBA.TypeCode JavaDoc __typeCode = null;
34   synchronized public static org.omg.CORBA.TypeCode JavaDoc type ()
35   {
36     if (__typeCode == null)
37     {
38       __typeCode = org.omg.CORBA.ORB.init ().create_enum_tc (org.omg.CosNaming.BindingTypeHelper.id (), "BindingType", new String JavaDoc[] { "nobject", "ncontext"} );
39     }
40     return __typeCode;
41   }
42
43   public static String JavaDoc id ()
44   {
45     return _id;
46   }
47
48   public static org.omg.CosNaming.BindingType JavaDoc read (org.omg.CORBA.portable.InputStream JavaDoc istream)
49   {
50     return org.omg.CosNaming.BindingType.from_int (istream.read_long ());
51   }
52
53   public static void write (org.omg.CORBA.portable.OutputStream JavaDoc ostream, org.omg.CosNaming.BindingType JavaDoc value)
54   {
55     ostream.write_long (value.value ());
56   }
57
58 }
59
Popular Tags