1 22 package org.jboss.test.excepiiop.interfaces; 23 24 25 31 32 abstract public class IdlExceptionHelper 33 { 34 private static String _id = "IDL:org/jboss/test/excepiiop/interfaces/IdlException:1.0"; 35 36 public static void insert (org.omg.CORBA.Any a, org.jboss.test.excepiiop.interfaces.IdlException that) 37 { 38 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 39 a.type (type ()); 40 write (out, that); 41 a.read_value (out.create_input_stream (), type ()); 42 } 43 44 public static org.jboss.test.excepiiop.interfaces.IdlException extract (org.omg.CORBA.Any a) 45 { 46 return read (a.create_input_stream ()); 47 } 48 49 private static org.omg.CORBA.TypeCode __typeCode = null; 50 private static boolean __active = false; 51 synchronized public static org.omg.CORBA.TypeCode type () 52 { 53 if (__typeCode == null) 54 { 55 synchronized (org.omg.CORBA.TypeCode .class) 56 { 57 if (__typeCode == null) 58 { 59 if (__active) 60 { 61 return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); 62 } 63 __active = true; 64 org.omg.CORBA.StructMember [] _members0 = new org.omg.CORBA.StructMember [2]; 65 org.omg.CORBA.TypeCode _tcOf_members0 = null; 66 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long); 67 _members0[0] = new org.omg.CORBA.StructMember ( 68 "i", 69 _tcOf_members0, 70 null); 71 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); 72 _members0[1] = new org.omg.CORBA.StructMember ( 73 "s", 74 _tcOf_members0, 75 null); 76 __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.jboss.test.excepiiop.interfaces.IdlExceptionHelper.id (), "IdlException", _members0); 77 __active = false; 78 } 79 } 80 } 81 return __typeCode; 82 } 83 84 public static String id () 85 { 86 return _id; 87 } 88 89 public static org.jboss.test.excepiiop.interfaces.IdlException read (org.omg.CORBA.portable.InputStream istream) 90 { 91 org.jboss.test.excepiiop.interfaces.IdlException value = new org.jboss.test.excepiiop.interfaces.IdlException (); 92 istream.read_string (); 94 value.i = istream.read_long (); 95 value.s = istream.read_string (); 96 return value; 97 } 98 99 public static void write (org.omg.CORBA.portable.OutputStream ostream, org.jboss.test.excepiiop.interfaces.IdlException value) 100 { 101 ostream.write_string (id ()); 103 ostream.write_long (value.i); 104 ostream.write_string (value.s); 105 } 106 107 } 108 | Popular Tags |