KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > PortableInterceptor > AdapterManagerIdHelper


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

10
11
12 /** Adapter manager identifier. Every object adapter has an adapter manager,
13    * indicated in this API only through the ID. A group of object adapter
14    * instances may share the same adapter manager, in which case state transitions
15    * reported for the adapter manager are observed by all object adapters with the
16    * same adapter manager ID.
17    */

18 abstract public class AdapterManagerIdHelper
19 {
20   private static String JavaDoc _id = "IDL:omg.org/PortableInterceptor/AdapterManagerId:1.0";
21
22   public static void insert (org.omg.CORBA.Any JavaDoc a, int that)
23   {
24     org.omg.CORBA.portable.OutputStream JavaDoc out = a.create_output_stream ();
25     a.type (type ());
26     write (out, that);
27     a.read_value (out.create_input_stream (), type ());
28   }
29
30   public static int extract (org.omg.CORBA.Any JavaDoc a)
31   {
32     return read (a.create_input_stream ());
33   }
34
35   private static org.omg.CORBA.TypeCode JavaDoc __typeCode = null;
36   synchronized public static org.omg.CORBA.TypeCode JavaDoc type ()
37   {
38     if (__typeCode == null)
39     {
40       __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
41       __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.PortableInterceptor.AdapterManagerIdHelper.id (), "AdapterManagerId", __typeCode);
42     }
43     return __typeCode;
44   }
45
46   public static String JavaDoc id ()
47   {
48     return _id;
49   }
50
51   public static int read (org.omg.CORBA.portable.InputStream JavaDoc istream)
52   {
53     int value = (int)0;
54     value = istream.read_long ();
55     return value;
56   }
57
58   public static void write (org.omg.CORBA.portable.OutputStream JavaDoc ostream, int value)
59   {
60     ostream.write_long (value);
61   }
62
63 }
64
Popular Tags