1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
/**
* @file IOR.pidl
*
* @brief Pre-compiled IDL source for the TAO_IOP namespace.
*/
#ifndef TAO_IOR_PIDL
#define TAO_IOR_PIDL
module TAO_IOP
{
/**
* @exception EmptyProfileList
*
* @brief @@ Bala, please describe this exception
*/
exception EmptyProfileList {};
/**
* @exception NotFound
*
* @brief @@ Bala, please describe this exception
*/
exception NotFound {};
/**
* @exception Duplicate
*
* @brief @@ Bala, please describe this exception
*/
exception Duplicate {};
/**
* @exception Invalid_IOR
*
* @brief @@ Bala, please describe this exception
*/
exception Invalid_IOR {};
/**
* @exception MultiProfileList
*
* @brief @@ Bala, please describe this exception
*/
exception MultiProfileList {};
/**
* @interface TAO_IOR_Property
*
* Allows setting properties by the different services in the
* IOR. The implementations of this interface would reside in the
* services. This interface essentially performs a role of a
* callback object.
*
* @todo This interface seems redundant in the face of the
* PortableInterceptor::IORInterceptor and the
* ObjectReferenceTemplate. If that is the case we should deprecate
* it and remove it.
*/
local interface TAO_IOR_Property
{
/// Operation that would set the required properties in the @a ior
/// as needed by the service.
boolean set_property (inout Object ior)
raises (Invalid_IOR);
/// Sets the profile ior1, in the profile ior2 to be a
/// primary.
boolean set_primary (inout Object ior1,
in Object ior2)
raises (Duplicate, NotFound);
/// Returns the ior of the primary from @a ior if it has been
/// set. Else returns a NotFound exception
Object get_primary (in Object ior)
raises (NotFound);
/// Returns a true or false depending on whether a primary member
/// has been set in @a ior
boolean is_primary_set (in Object ior);
/// If any of the IOR's within the IOGR has a primary tag, just
/// remove it. Returns zero if no primary was found.
boolean remove_primary_tag (inout Object iogr)
raises (NotFound);
};
/**
* @interface TAO_IOR_Manipulation
*
* @brief Allows applications to manipulate object references.
*
* Manipulating Object References. While this interface does not
* assume the use of CORBA complaint IOPs, the IOP terminology is
* used throughout.
* Object references (Object) are used since they encapsulate the
* notion of object references and IORs.
* Note, an IOR contains one or more profiles and a profile can be
* considered to represent the location or route to a specific instance
* of an object.
* A profile may also contain supplementary information useful for
* different services such as security.
* All Object references may have multiple profiles
*/
local interface TAO_IOR_Manipulation
{
typedef sequence <Object> IORList;
/// Create a new object reference by merging the profiles lists in the
/// supplied list of one or more object references.
Object merge_iors (in IORList iors)
raises (EmptyProfileList,Duplicate,Invalid_IOR);
/// copy the profile list from "ior2" to "ior1".
/// Note on ordering, while the current implementation will place
/// the profiles from ior2 (which are not already in ior1) on the
/// end of the profile list in ior1, there is no guarantee this ordering
/// will be maintained. For example, string_to_object or object_to_string
/// may reorder the profile lists. So, if it is important to use one
/// profile before another then policies should be used along with tagged
/// components/tagged profiles.
Object add_profiles (in Object ior1,
in Object ior2)
raises (EmptyProfileList, Duplicate, Invalid_IOR);
// Any profile in @a ior1 which matches at least one profile in @a ior2
// will be removed. Returns a new object reference
Object remove_profiles (in Object ior1,
in Object ior2)
raises (Invalid_IOR, EmptyProfileList, NotFound);
/// Allows setting of properties as defined by the @a prop object
/// in the @a ior list
boolean set_property (in TAO_IOR_Property prop,
in Object ior)
raises (Invalid_IOR, Duplicate);
// @@ Primary is specific to FT.. But let us have these
// @@ operations around. Further, as we pass the property object
// @@ around the implementation will not be tied with the FT
// @@ service. Any service can use their own ways of defining a
// @@ primary. For example FT service uses IOP::TAG_FT_PRIMARY
// @@ to identify a primary and some other service could use
// @@ something else. But the actual implementation of the
// @@ property object would take care of that.
// Sets the profile ior1, in the profile ior2 to be a
// primary. If ior1 is a multi-profile IOR then the operation
// raises the MultiProfileList exception. If ior1 is not found
// in ior2, it raises an Invalid_IOR exception. If ior2 has a
// primary already defined then it raises a Duplicate
// exception.
boolean set_primary (in TAO_IOR_Property prop,
in Object ior1,
in Object ior2)
raises (Invalid_IOR, Duplicate, MultiProfileList, NotFound);
/// If any of the IOR's within the IOGR has a primary tag, just remove
/// it. Return zero if no primary found.
boolean remove_primary_tag (in TAO_IOR_Property prop,
in Object ior);
/// Returns the ior of the primary from @a ior if it has been
/// set. Else returns a NotFound exception
Object get_primary (in TAO_IOR_Property prop,
in Object ior)
raises (NotFound);
/// Returns a true or false depending on whether a primary member
/// has been set in @a ior
boolean is_primary_set (in TAO_IOR_Property prop,
in Object ior);
/// Returns number of profiles which are in both @a ior1 and @a ior2.
unsigned long is_in_ior(in Object ior1, in Object ior2)
raises (NotFound);
/// This will return the number of profiles contained in the
/// corresponding object reference for this object.
unsigned long get_profile_count (in Object ior)
raises (EmptyProfileList);
};
};
#endif /* TAO_IOR_PIDL */
|