KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)UnknownUserExceptionHelper.java 1.5 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package org.omg.CORBA;
8
9
10 /**
11 * The Helper for <tt>UnknownUserException</tt>. For more information on
12 * Helper files, see <a HREF="doc-files/generatedfiles.html#helper">
13 * "Generated Files: Helper Files"</a>.<P>
14 * org/omg/CORBA/UnknownUserExceptionHelper.java
15 * Generated by the IDL-to-Java compiler (portable), version "3.0"
16 * from CORBA.idl
17 * Thursday, August 24, 2000 5:52:22 PM PDT
18 */

19
20 abstract public class UnknownUserExceptionHelper
21 {
22   private static String JavaDoc _id = "IDL:omg.org/CORBA/UnknownUserException:1.0";
23
24   public static void insert (org.omg.CORBA.Any JavaDoc a, org.omg.CORBA.UnknownUserException 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.CORBA.UnknownUserException 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.StructMember JavaDoc[] _members0 = new org.omg.CORBA.StructMember JavaDoc [1];
53           org.omg.CORBA.TypeCode JavaDoc _tcOf_members0 = null;
54           _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_any);
55           _members0[0] = new org.omg.CORBA.StructMember JavaDoc (
56             "except",
57             _tcOf_members0,
58             null);
59           __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.omg.CORBA.UnknownUserExceptionHelper.id (), "UnknownUserException", _members0);
60           __active = false;
61         }
62       }
63     }
64     return __typeCode;
65   }
66
67   public static String JavaDoc id ()
68   {
69     return _id;
70   }
71
72   public static org.omg.CORBA.UnknownUserException JavaDoc read (org.omg.CORBA.portable.InputStream JavaDoc istream)
73   {
74     org.omg.CORBA.UnknownUserException JavaDoc value = new org.omg.CORBA.UnknownUserException JavaDoc ();
75     // read and discard the repository ID
76
istream.read_string ();
77     value.except = istream.read_any ();
78     return value;
79   }
80
81   public static void write (org.omg.CORBA.portable.OutputStream JavaDoc ostream, org.omg.CORBA.UnknownUserException JavaDoc value)
82   {
83     // write the repository ID
84
ostream.write_string (id ());
85     ostream.write_any (value.except);
86   }
87
88 }
89
Popular Tags