KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > IOP > ComponentIdHelper


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

10
11
12 /**
13      * Standard way of representing multicomponent profiles.
14      * This would be encapsulated in a TaggedProfile.
15      */

16 abstract public class ComponentIdHelper
17 {
18   private static String JavaDoc _id = "IDL:omg.org/IOP/ComponentId:1.0";
19
20   public static void insert (org.omg.CORBA.Any JavaDoc a, int 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 int 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 ().get_primitive_tc (org.omg.CORBA.TCKind.tk_ulong);
39       __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.IOP.ComponentIdHelper.id (), "ComponentId", __typeCode);
40     }
41     return __typeCode;
42   }
43
44   public static String JavaDoc id ()
45   {
46     return _id;
47   }
48
49   public static int read (org.omg.CORBA.portable.InputStream JavaDoc istream)
50   {
51     int value = (int)0;
52     value = istream.read_ulong ();
53     return value;
54   }
55
56   public static void write (org.omg.CORBA.portable.OutputStream JavaDoc ostream, int value)
57   {
58     ostream.write_ulong (value);
59   }
60
61 }
62
Popular Tags