KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > spi > ior > TaggedProfileTemplateBase


1 /*
2  * @(#)TaggedProfileTemplateBase.java 1.4 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.spi.ior;
9
10 import java.util.Iterator JavaDoc ;
11
12 import org.omg.CORBA_2_3.portable.OutputStream JavaDoc ;
13
14 import com.sun.corba.se.spi.orb.ORB ;
15
16 import com.sun.corba.se.impl.ior.EncapsulationUtility ;
17
18 public abstract class TaggedProfileTemplateBase
19     extends IdentifiableContainerBase
20     implements TaggedProfileTemplate
21 {
22     public void write( OutputStream JavaDoc os )
23     {
24     EncapsulationUtility.writeEncapsulation( this, os ) ;
25     }
26
27     public org.omg.IOP.TaggedComponent JavaDoc[] getIOPComponents( ORB orb, int id )
28     {
29     int count = 0 ;
30     Iterator JavaDoc iter = iteratorById( id ) ;
31     while (iter.hasNext()) {
32         iter.next() ;
33         count++ ;
34     }
35
36     org.omg.IOP.TaggedComponent JavaDoc[] result = new
37         org.omg.IOP.TaggedComponent JavaDoc[count] ;
38
39     int index = 0 ;
40     iter = iteratorById( id ) ;
41     while (iter.hasNext()) {
42         TaggedComponent comp = (TaggedComponent)(iter.next()) ;
43         result[index++] = comp.getIOPComponent( orb ) ;
44     }
45
46     return result ;
47     }
48 }
49
Popular Tags