1 package com.sun.corba.se.PortableActivationIDL; 2 3 4 10 11 12 17 abstract public class TCPPortHelper 18 { 19 private static String _id = "IDL:PortableActivationIDL/TCPPort:1.0"; 20 21 public static void insert (org.omg.CORBA.Any a, int that) 22 { 23 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 24 a.type (type ()); 25 write (out, that); 26 a.read_value (out.create_input_stream (), type ()); 27 } 28 29 public static int extract (org.omg.CORBA.Any a) 30 { 31 return read (a.create_input_stream ()); 32 } 33 34 private static org.omg.CORBA.TypeCode __typeCode = null; 35 synchronized public static org.omg.CORBA.TypeCode type () 36 { 37 if (__typeCode == null) 38 { 39 __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long); 40 __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.corba.se.PortableActivationIDL.TCPPortHelper.id (), "TCPPort", __typeCode); 41 } 42 return __typeCode; 43 } 44 45 public static String id () 46 { 47 return _id; 48 } 49 50 public static int read (org.omg.CORBA.portable.InputStream istream) 51 { 52 int value = (int)0; 53 value = istream.read_long (); 54 return value; 55 } 56 57 public static void write (org.omg.CORBA.portable.OutputStream ostream, int value) 58 { 59 ostream.write_long (value); 60 } 61 62 } 63 | Popular Tags |