1 7 8 package com.sun.corba.se.impl.ior; 9 10 import org.omg.CORBA_2_3.portable.InputStream ; 11 12 import com.sun.corba.se.spi.ior.TaggedProfile ; 13 import com.sun.corba.se.spi.ior.TaggedProfileTemplate ; 14 import com.sun.corba.se.spi.ior.ObjectId ; 15 import com.sun.corba.se.spi.ior.ObjectKeyTemplate ; 16 import com.sun.corba.se.spi.ior.ObjectKey ; 17 18 import com.sun.corba.se.spi.orb.ORB ; 19 20 import com.sun.corba.se.spi.ior.iiop.GIOPVersion ; 21 22 import com.sun.corba.se.impl.encoding.EncapsOutputStream ; 23 24 27 public class GenericTaggedProfile extends GenericIdentifiable implements TaggedProfile 28 { 29 private ORB orb ; 30 31 public GenericTaggedProfile( int id, InputStream is ) 32 { 33 super( id, is ) ; 34 this.orb = (ORB)(is.orb()) ; 35 } 36 37 public GenericTaggedProfile( ORB orb, int id, byte[] data ) 38 { 39 super( id, data ) ; 40 this.orb = orb ; 41 } 42 43 public TaggedProfileTemplate getTaggedProfileTemplate() 44 { 45 return null ; 46 } 47 48 public ObjectId getObjectId() 49 { 50 return null ; 51 } 52 53 public ObjectKeyTemplate getObjectKeyTemplate() 54 { 55 return null ; 56 } 57 58 public ObjectKey getObjectKey() 59 { 60 return null ; 61 } 62 63 public boolean isEquivalent( TaggedProfile prof ) 64 { 65 return equals( prof ) ; 66 } 67 68 public void makeImmutable() 69 { 70 } 72 73 public boolean isLocal() 74 { 75 return false ; 76 } 77 78 public org.omg.IOP.TaggedProfile getIOPProfile() 79 { 80 EncapsOutputStream os = new EncapsOutputStream( orb ) ; 81 write( os ) ; 82 InputStream is = (InputStream )(os.create_input_stream()) ; 83 return org.omg.IOP.TaggedProfileHelper.read( is ) ; 84 } 85 } 86 | Popular Tags |