01: /*
02: * JacORB - a free Java ORB
03: *
04: * Copyright (C) 1999-2004 Gerald Brose
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Library General Public
08: * License as published by the Free Software Foundation; either
09: * version 2 of the License, or (at your option) any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Library General Public License for more details.
15: *
16: * You should have received a copy of the GNU Library General Public
17: * License along with this library; if not, write to the Free
18: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19: *
20: */
21:
22: package org.jacorb.orb.portableInterceptor;
23:
24: import org.omg.PortableInterceptor.IORInfo;
25:
26: /**
27: * This class extends the standard defined interface of the IORInfo
28: * object given to each IORInterceptor during creation of new IORs.
29: * It provides convenience methods to modify the newly created IOR.
30:
31: * @author Marc Heide
32: * @version $Id: IORInfoExt.java,v 1.4 2006/07/07 10:55:57 alphonse.bendt Exp $
33: */
34:
35: public interface IORInfoExt extends IORInfo {
36: /**
37: * This method adds a further profile to an IOR.
38: * By using this method it is possible to append e.g. further IIOP
39: * profiles. The added profile is marshalled after all profiles
40: * already existing in profile list.
41: * @param profile the profile to add
42: */
43: void add_profile(org.omg.ETF.Profile profile);
44:
45: /**
46: * This method returns the number of profiles of the given type.
47: * The returned value can be used to iterate over the existing
48: * profiles of given type (get_profile()).
49: * @param tag profile tag, e.g. TAG_INTERNET_IOP.value
50: * @return number of profiles of given tag
51: */
52: int get_number_of_profiles(int tag);
53:
54: /**
55: * Returns the profile with the given tag at the given position.
56: * Following rule must apply to parameter position:<p>
57: * <code> 0 <= position < get_number_of_profiles(tag) </code><p>
58: * @param tag tag of profile, e.g. TAG_INTERNET_IOP.value
59: * @param position position in IOR
60: * @return profile
61: * @exception ArrayIndexOutOfBoundsException if position is
62: * out of range
63: */
64: org.omg.ETF.Profile get_profile(int tag, int position);
65:
66: /**
67: * Returns the first profile with the given tag (position == 0).
68: * If no profile with given tag exists, null is returned.
69: * @param tag tag of profile, e.g. TAG_INTERNET_IOP.value
70: * @return first profile or null if no profile with given
71: * tag exists
72: */
73: org.omg.ETF.Profile get_profile(int tag);
74: }
|