1 package com.sun.corba.se.PortableActivationIDL; 2 3 4 10 11 12 14 abstract public class ServerProxyHelper 15 { 16 private static String _id = "IDL:PortableActivationIDL/ServerProxy:1.0"; 17 18 public static void insert (org.omg.CORBA.Any a, com.sun.corba.se.PortableActivationIDL.ServerProxy that) 19 { 20 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 21 a.type (type ()); 22 write (out, that); 23 a.read_value (out.create_input_stream (), type ()); 24 } 25 26 public static com.sun.corba.se.PortableActivationIDL.ServerProxy extract (org.omg.CORBA.Any a) 27 { 28 return read (a.create_input_stream ()); 29 } 30 31 private static org.omg.CORBA.TypeCode __typeCode = null; 32 synchronized public static org.omg.CORBA.TypeCode type () 33 { 34 if (__typeCode == null) 35 { 36 __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (com.sun.corba.se.PortableActivationIDL.ServerProxyHelper.id (), "ServerProxy"); 37 } 38 return __typeCode; 39 } 40 41 public static String id () 42 { 43 return _id; 44 } 45 46 public static com.sun.corba.se.PortableActivationIDL.ServerProxy read (org.omg.CORBA.portable.InputStream istream) 47 { 48 return narrow (istream.read_Object (_ServerProxyStub.class)); 49 } 50 51 public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.corba.se.PortableActivationIDL.ServerProxy value) 52 { 53 ostream.write_Object ((org.omg.CORBA.Object ) value); 54 } 55 56 public static com.sun.corba.se.PortableActivationIDL.ServerProxy narrow (org.omg.CORBA.Object obj) 57 { 58 if (obj == null) 59 return null; 60 else if (obj instanceof com.sun.corba.se.PortableActivationIDL.ServerProxy) 61 return (com.sun.corba.se.PortableActivationIDL.ServerProxy)obj; 62 else if (!obj._is_a (id ())) 63 throw new org.omg.CORBA.BAD_PARAM (); 64 else 65 { 66 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl )obj)._get_delegate (); 67 com.sun.corba.se.PortableActivationIDL._ServerProxyStub stub = new com.sun.corba.se.PortableActivationIDL._ServerProxyStub (); 68 stub._set_delegate(delegate); 69 return stub; 70 } 71 } 72 73 public static com.sun.corba.se.PortableActivationIDL.ServerProxy unchecked_narrow (org.omg.CORBA.Object obj) 74 { 75 if (obj == null) 76 return null; 77 else if (obj instanceof com.sun.corba.se.PortableActivationIDL.ServerProxy) 78 return (com.sun.corba.se.PortableActivationIDL.ServerProxy)obj; 79 else 80 { 81 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl )obj)._get_delegate (); 82 com.sun.corba.se.PortableActivationIDL._ServerProxyStub stub = new com.sun.corba.se.PortableActivationIDL._ServerProxyStub (); 83 stub._set_delegate(delegate); 84 return stub; 85 } 86 } 87 88 } 89 | Popular Tags |