1 7 8 package com.sun.corba.se.impl.ior; 9 10 import java.io.IOException ; 11 12 import org.omg.CORBA_2_3.portable.InputStream ; 13 import org.omg.CORBA_2_3.portable.OutputStream ; 14 15 import com.sun.corba.se.spi.ior.ObjectId ; 16 import com.sun.corba.se.spi.ior.ObjectAdapterId ; 17 import com.sun.corba.se.spi.ior.ObjectKeyFactory ; 18 19 import com.sun.corba.se.spi.ior.iiop.GIOPVersion ; 20 21 import com.sun.corba.se.spi.orb.ORB ; 22 import com.sun.corba.se.spi.orb.ORBVersion ; 23 import com.sun.corba.se.spi.orb.ORBVersionFactory ; 24 25 import com.sun.corba.se.impl.ior.ObjectKeyFactoryImpl ; 26 27 public abstract class NewObjectKeyTemplateBase extends ObjectKeyTemplateBase 28 { 29 public NewObjectKeyTemplateBase( ORB orb, int magic, int scid, int serverid, 30 String orbid, ObjectAdapterId oaid ) 31 { 32 super( orb, magic, scid, serverid, orbid, oaid ) ; 33 35 if (magic != ObjectKeyFactoryImpl.JAVAMAGIC_NEWER) 36 throw wrapper.badMagic( new Integer ( magic ) ) ; 37 } 38 39 public void write(ObjectId objectId, OutputStream os) 40 { 41 super.write( objectId, os ) ; 42 getORBVersion().write( os ) ; 43 } 44 45 public void write(OutputStream os) 46 { 47 super.write( os ) ; 48 getORBVersion().write( os ) ; 49 } 50 51 protected void setORBVersion( InputStream is ) 52 { 53 ORBVersion version = ORBVersionFactory.create( is ) ; 54 setORBVersion( version ) ; 55 } 56 } 57 | Popular Tags |