IOR.java revision 608:7e06bf1dcb09
1/*
2 * Copyright (c) 2002, 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 */
25
26package com.sun.corba.se.spi.ior;
27
28import java.util.List ;
29import java.util.Iterator ;
30
31import com.sun.corba.se.spi.orb.ORBVersion ;
32
33import com.sun.corba.se.spi.ior.iiop.GIOPVersion ;
34import com.sun.corba.se.spi.ior.iiop.IIOPProfile ;
35
36import com.sun.corba.se.spi.orb.ORB ;
37
38/** An IOR is represented as a list of profiles.
39* Only instances of TaggedProfile are contained in the list.
40*/
41public interface IOR extends List, Writeable, MakeImmutable
42{
43    ORB getORB() ;
44
45    /** Return the type id string from the IOR.
46    */
47    String getTypeId() ;
48
49    /** Return an iterator that iterates over tagged profiles with
50    * identifier id.  It is not possible to modify the list through this
51    * iterator.
52    */
53    Iterator iteratorById( int id ) ;
54
55    /** Return a representation of this IOR in the standard GIOP stringified
56     * format that begins with "IOR:".
57     */
58    String stringify() ;
59
60    /** Return a representation of this IOR in the standard GIOP marshalled
61     * form.
62     */
63    org.omg.IOP.IOR getIOPIOR() ;
64
65    /** Return true if this IOR has no profiles.
66     */
67    boolean isNil() ;
68
69    /** Return true if this IOR is equivalent to ior.  Here equivalent means
70     * that the typeids are the same, they have the same number of profiles,
71     * and each profile is equivalent to the corresponding profile.
72     */
73    boolean isEquivalent(IOR ior) ;
74
75    /** Return the IORTemplate for this IOR.  This is simply a list
76     * of all TaggedProfileTemplates derived from the TaggedProfiles
77     * of the IOR.
78     */
79    IORTemplateList getIORTemplates() ;
80
81    /** Return the first IIOPProfile in this IOR.
82     * XXX THIS IS TEMPORARY FOR BACKWARDS COMPATIBILITY AND WILL BE REMOVED
83     * SOON!
84     */
85    IIOPProfile getProfile() ;
86}
87