KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > ior > GenericTaggedProfile


1 /*
2  * @(#)GenericTaggedProfile.java 1.9 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.impl.ior;
9
10 import org.omg.CORBA_2_3.portable.InputStream JavaDoc ;
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 /**
25  * @author
26  */

27 public class GenericTaggedProfile extends GenericIdentifiable implements TaggedProfile
28 {
29     private ORB orb ;
30
31     public GenericTaggedProfile( int id, InputStream JavaDoc 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     // NO-OP
71
}
72
73     public boolean isLocal()
74     {
75     return false ;
76     }
77     
78     public org.omg.IOP.TaggedProfile JavaDoc getIOPProfile()
79     {
80     EncapsOutputStream os = new EncapsOutputStream( orb ) ;
81     write( os ) ;
82     InputStream JavaDoc is = (InputStream JavaDoc)(os.create_input_stream()) ;
83     return org.omg.IOP.TaggedProfileHelper.read( is ) ;
84     }
85 }
86
Popular Tags