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