KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.PortableInterceptor;
2
3
4 /**
5 * org/omg/PortableInterceptor/AdapterStateHelper.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 /** Type of object adapter state. State changes are reported either to
13    * the object adapter or to the adapter manager.
14    */

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