KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.PortableInterceptor;
2
3
4 /**
5 * org/omg/PortableInterceptor/ObjectReferenceTemplateHelper.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 /** The object reference template. An instance of this must
13    * exist for each object adapter created in an ORB. The server_id,
14    * orb_id, and adapter_name attributes uniquely identify this template
15    * within the scope of an IMR. Note that adapter_id is similarly unique
16    * within the same scope, but it is opaque, and less useful in many
17    * cases.
18    */

19 abstract public class ObjectReferenceTemplateHelper
20 {
21   private static String JavaDoc _id = "IDL:omg.org/PortableInterceptor/ObjectReferenceTemplate:1.0";
22
23
24   public static void insert (org.omg.CORBA.Any JavaDoc a, org.omg.PortableInterceptor.ObjectReferenceTemplate JavaDoc that)
25   {
26     org.omg.CORBA.portable.OutputStream JavaDoc out = a.create_output_stream ();
27     a.type (type ());
28     write (out, that);
29     a.read_value (out.create_input_stream (), type ());
30   }
31
32   public static org.omg.PortableInterceptor.ObjectReferenceTemplate JavaDoc extract (org.omg.CORBA.Any JavaDoc a)
33   {
34     return read (a.create_input_stream ());
35   }
36
37   private static org.omg.CORBA.TypeCode JavaDoc __typeCode = null;
38   private static boolean __active = false;
39   synchronized public static org.omg.CORBA.TypeCode JavaDoc type ()
40   {
41     if (__typeCode == null)
42     {
43       synchronized (org.omg.CORBA.TypeCode JavaDoc.class)
44       {
45         if (__typeCode == null)
46         {
47           if (__active)
48           {
49             return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
50           }
51           __active = true;
52           org.omg.CORBA.ValueMember JavaDoc[] _members0 = new org.omg.CORBA.ValueMember JavaDoc[0];
53           org.omg.CORBA.TypeCode JavaDoc _tcOf_members0 = null;
54           __typeCode = org.omg.CORBA.ORB.init ().create_value_tc (_id, "ObjectReferenceTemplate", org.omg.CORBA.VM_ABSTRACT.value, null, _members0);
55           __active = false;
56         }
57       }
58     }
59     return __typeCode;
60   }
61
62   public static String JavaDoc id ()
63   {
64     return _id;
65   }
66
67   public static org.omg.PortableInterceptor.ObjectReferenceTemplate JavaDoc read (org.omg.CORBA.portable.InputStream JavaDoc istream)
68   {
69     return (org.omg.PortableInterceptor.ObjectReferenceTemplate JavaDoc)((org.omg.CORBA_2_3.portable.InputStream JavaDoc) istream).read_value (id ());
70   }
71
72   public static void write (org.omg.CORBA.portable.OutputStream JavaDoc ostream, org.omg.PortableInterceptor.ObjectReferenceTemplate JavaDoc value)
73   {
74     ((org.omg.CORBA_2_3.portable.OutputStream JavaDoc) ostream).write_value (value, id ());
75   }
76
77
78 }
79
Popular Tags