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