Thu, 31 Aug 2017 18:10:36 +0800
merge
1 /*
2 * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
26 package com.sun.corba.se.spi.ior;
28 import java.util.List ;
29 import java.util.Iterator ;
31 import org.omg.CORBA_2_3.portable.OutputStream ;
33 import com.sun.corba.se.spi.ior.Identifiable ;
34 import com.sun.corba.se.spi.ior.Writeable ;
35 import com.sun.corba.se.spi.ior.ObjectId ;
36 import com.sun.corba.se.spi.ior.WriteContents ;
38 import com.sun.corba.se.spi.orb.ORB ;
40 /** Base template for creating TaggedProfiles. A TaggedProfile will often contain
41 * tagged components. A template that does not contain components acts like
42 * an empty immutable list.
43 *
44 * @author Ken Cavanaugh
45 */
46 public interface TaggedProfileTemplate extends List, Identifiable,
47 WriteContents, MakeImmutable
48 {
49 /** Return an iterator that iterates over tagged components with
50 * identifier id. It is not possible to modify the list through this
51 * iterator.
52 */
53 public Iterator iteratorById( int id ) ;
55 /** Create a TaggedProfile from this template.
56 */
57 TaggedProfile create( ObjectKeyTemplate oktemp, ObjectId id ) ;
59 /** Write the profile create( oktemp, id ) to the OutputStream os.
60 */
61 void write( ObjectKeyTemplate oktemp, ObjectId id, OutputStream os) ;
63 /** Return true if temp is equivalent to this template. Equivalence
64 * means that in some sense an invocation on a profile created by this
65 * template has the same results as an invocation on a profile
66 * created from temp. Equivalence may be weaker than equality.
67 */
68 boolean isEquivalent( TaggedProfileTemplate temp );
70 /** Return the tagged components in this profile (if any)
71 * in the GIOP marshalled form, which is required for Portable
72 * Interceptors. Returns null if either the profile has no
73 * components, or if this type of profile can never contain
74 * components.
75 */
76 org.omg.IOP.TaggedComponent[] getIOPComponents(
77 ORB orb, int id );
78 }