KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > CORBA > PolicyErrorHelper


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

10
11
12 /**
13    * Thrown to indicate problems with parameter values passed to the
14    * <code>ORB.create_policy</code> operation.
15    */

16 abstract public class PolicyErrorHelper
17 {
18   private static String JavaDoc _id = "IDL:omg.org/CORBA/PolicyError:1.0";
19
20   public static void insert (org.omg.CORBA.Any JavaDoc a, org.omg.CORBA.PolicyError 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.CORBA.PolicyError 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   private static boolean __active = false;
35   synchronized public static org.omg.CORBA.TypeCode JavaDoc type ()
36   {
37     if (__typeCode == null)
38     {
39       synchronized (org.omg.CORBA.TypeCode JavaDoc.class)
40       {
41         if (__typeCode == null)
42         {
43           if (__active)
44           {
45             return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
46           }
47           __active = true;
48           org.omg.CORBA.StructMember JavaDoc[] _members0 = new org.omg.CORBA.StructMember JavaDoc [1];
49           org.omg.CORBA.TypeCode JavaDoc _tcOf_members0 = null;
50           _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_short);
51           _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.PolicyErrorCodeHelper.id (), "PolicyErrorCode", _tcOf_members0);
52           _members0[0] = new org.omg.CORBA.StructMember JavaDoc (
53             "reason",
54             _tcOf_members0,
55             null);
56           __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.omg.CORBA.PolicyErrorHelper.id (), "PolicyError", _members0);
57           __active = false;
58         }
59       }
60     }
61     return __typeCode;
62   }
63
64   public static String JavaDoc id ()
65   {
66     return _id;
67   }
68
69   public static org.omg.CORBA.PolicyError JavaDoc read (org.omg.CORBA.portable.InputStream JavaDoc istream)
70   {
71     org.omg.CORBA.PolicyError JavaDoc value = new org.omg.CORBA.PolicyError JavaDoc ();
72     // read and discard the repository ID
73
istream.read_string ();
74     value.reason = istream.read_short ();
75     return value;
76   }
77
78   public static void write (org.omg.CORBA.portable.OutputStream JavaDoc ostream, org.omg.CORBA.PolicyError JavaDoc value)
79   {
80     // write the repository ID
81
ostream.write_string (id ());
82     ostream.write_short (value.reason);
83   }
84
85 }
86
Popular Tags