1 7 8 package com.sun.corba.se.impl.ior; 9 10 import java.util.Iterator ; 11 12 import org.omg.CORBA_2_3.portable.InputStream ; 13 import org.omg.CORBA_2_3.portable.OutputStream ; 14 15 import org.omg.CORBA.OctetSeqHolder ; 16 17 import com.sun.corba.se.spi.activation.POANameHelper ; 18 19 import com.sun.corba.se.spi.orb.ORB ; 20 import com.sun.corba.se.spi.orb.ORBVersion ; 21 import com.sun.corba.se.spi.orb.ORBVersionFactory ; 22 23 import com.sun.corba.se.spi.ior.ObjectAdapterId ; 24 25 import com.sun.corba.se.impl.ior.ObjectKeyFactoryImpl ; 26 27 30 public final class POAObjectKeyTemplate extends NewObjectKeyTemplateBase 31 { 32 34 public POAObjectKeyTemplate( ORB orb, int magic, int scid, InputStream is ) 35 { 36 super( orb, magic, scid, is.read_long(), is.read_string(), 37 new ObjectAdapterIdArray( POANameHelper.read( is ) ) ) ; 38 39 setORBVersion( is ) ; 40 } 41 42 45 public POAObjectKeyTemplate( ORB orb, int magic, int scid, InputStream is, 46 OctetSeqHolder osh ) 47 { 48 super( orb, magic, scid, is.read_long(), is.read_string(), 49 new ObjectAdapterIdArray( POANameHelper.read( is ) ) ) ; 50 51 osh.value = readObjectKey( is ) ; 52 53 setORBVersion( is ) ; 54 } 55 56 public POAObjectKeyTemplate( ORB orb, int scid, int serverid, String orbid, 57 ObjectAdapterId objectAdapterId) 58 { 59 super( orb, ObjectKeyFactoryImpl.JAVAMAGIC_NEWER, scid, serverid, orbid, 60 objectAdapterId ) ; 61 62 setORBVersion( ORBVersionFactory.getORBVersion() ) ; 63 } 64 65 public void writeTemplate(OutputStream os) 66 { 67 os.write_long( getMagic() ) ; 68 os.write_long( getSubcontractId() ) ; 69 os.write_long( getServerId() ) ; 70 os.write_string( getORBId() ) ; 71 getObjectAdapterId().write( os ) ; 72 } 73 } 74 | Popular Tags |