1 package gcc.org.omg.GIOP; 2 3 4 10 11 12 abstract public class RequestHeader_1_1Helper 14 { 15 private static String _id = "IDL:omg.org/GIOP/RequestHeader_1_1:1.0"; 16 17 public static void insert (org.omg.CORBA.Any a, gcc.org.omg.GIOP.RequestHeader_1_1 that) 18 { 19 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 20 a.type (type ()); 21 write (out, that); 22 a.read_value (out.create_input_stream (), type ()); 23 } 24 25 public static gcc.org.omg.GIOP.RequestHeader_1_1 extract (org.omg.CORBA.Any a) 26 { 27 return read (a.create_input_stream ()); 28 } 29 30 private static org.omg.CORBA.TypeCode __typeCode = null; 31 private static boolean __active = false; 32 synchronized public static org.omg.CORBA.TypeCode type () 33 { 34 if (__typeCode == null) 35 { 36 synchronized (org.omg.CORBA.TypeCode .class) 37 { 38 if (__typeCode == null) 39 { 40 if (__active) 41 { 42 return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); 43 } 44 __active = true; 45 org.omg.CORBA.StructMember [] _members0 = new org.omg.CORBA.StructMember [7]; 46 org.omg.CORBA.TypeCode _tcOf_members0 = null; 47 _tcOf_members0 = gcc.org.omg.IOP.ServiceContextHelper.type (); 48 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0); 49 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (gcc.org.omg.IOP.ServiceContextListHelper.id (), "ServiceContextList", _tcOf_members0); 50 _members0[0] = new org.omg.CORBA.StructMember ( 51 "service_context", 52 _tcOf_members0, 53 null); 54 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_ulong); 55 _members0[1] = new org.omg.CORBA.StructMember ( 56 "request_id", 57 _tcOf_members0, 58 null); 59 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_boolean); 60 _members0[2] = new org.omg.CORBA.StructMember ( 61 "response_expected", 62 _tcOf_members0, 63 null); 64 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_octet); 65 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (3, _tcOf_members0 ); 66 _members0[3] = new org.omg.CORBA.StructMember ( 67 "reserved", 68 _tcOf_members0, 69 null); 70 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_octet); 71 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0); 72 _members0[4] = new org.omg.CORBA.StructMember ( 73 "object_key", 74 _tcOf_members0, 75 null); 76 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); 77 _members0[5] = new org.omg.CORBA.StructMember ( 78 "operation", 79 _tcOf_members0, 80 null); 81 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_octet); 82 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0); 83 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (gcc.org.omg.GIOP.PrincipalHelper.id (), "Principal", _tcOf_members0); 84 _members0[6] = new org.omg.CORBA.StructMember ( 85 "requesting_principal", 86 _tcOf_members0, 87 null); 88 __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (gcc.org.omg.GIOP.RequestHeader_1_1Helper.id (), "RequestHeader_1_1", _members0); 89 __active = false; 90 } 91 } 92 } 93 return __typeCode; 94 } 95 96 public static String id () 97 { 98 return _id; 99 } 100 101 public static gcc.org.omg.GIOP.RequestHeader_1_1 read (org.omg.CORBA.portable.InputStream istream) 102 { 103 gcc.org.omg.GIOP.RequestHeader_1_1 value = new gcc.org.omg.GIOP.RequestHeader_1_1 (); 104 value.service_context = gcc.org.omg.IOP.ServiceContextListHelper.read (istream); 105 value.request_id = istream.read_ulong (); 106 value.response_expected = istream.read_boolean (); 107 value.reserved = new byte[3]; 108 for (int _o0 = 0;_o0 < (3); ++_o0) 109 { 110 value.reserved[_o0] = istream.read_octet (); 111 } 112 int _len1 = istream.read_long (); 113 value.object_key = new byte[_len1]; 114 istream.read_octet_array (value.object_key, 0, _len1); 115 value.operation = istream.read_string (); 116 value.requesting_principal = gcc.org.omg.GIOP.PrincipalHelper.read (istream); 117 return value; 118 } 119 120 public static void write (org.omg.CORBA.portable.OutputStream ostream, gcc.org.omg.GIOP.RequestHeader_1_1 value) 121 { 122 gcc.org.omg.IOP.ServiceContextListHelper.write (ostream, value.service_context); 123 ostream.write_ulong (value.request_id); 124 ostream.write_boolean (value.response_expected); 125 if (value.reserved.length != (3)) 126 throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 127 for (int _i0 = 0;_i0 < (3); ++_i0) 128 { 129 ostream.write_octet (value.reserved[_i0]); 130 } 131 ostream.write_long (value.object_key.length); 132 ostream.write_octet_array (value.object_key, 0, value.object_key.length); 133 ostream.write_string (value.operation); 134 gcc.org.omg.GIOP.PrincipalHelper.write (ostream, value.requesting_principal); 135 } 136 137 } 138 | Popular Tags |