00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _PORTABLEGROUP_IDL_
00012 #define _PORTABLEGROUP_IDL_
00013
00014 #include "tao/PortableServer/PortableServer_include.pidl"
00015 #include "CosNaming.idl"
00016 #include "tao/IOP.pidl"
00017 #include "tao/GIOP.pidl"
00018 #include <orb.idl>
00019 #include "PortableGroup_Simple_DS.idl"
00020
00021 module PortableGroup
00022 {
00023 typeprefix PortableGroup "omg.org";
00024
00025
00026 const string PG_MEMBERSHIP_STYLE =
00027 "org.omg.PortableGroup.MembershipStyle";
00028
00029
00030 const string PG_INITIAL_NUMBER_MEMBERS =
00031 "org.omg.PortableGroup.InitialNumberMembers";
00032
00033
00034 const string PG_MINIMUM_NUMBER_MEMBERS =
00035 "org.omg.PortableGroup.MinimumNumberMembers";
00036
00037
00038 const string PG_FACTORIES = "org.omg.PortableGroup.Factories";
00039
00040 typedef sequence <octet> GroupIIOPProfile;
00041
00042
00043 interface GenericFactory;
00044
00045 typedef CORBA::RepositoryId _TypeId;
00046 typedef Object ObjectGroup;
00047 typedef sequence<ObjectGroup> ObjectGroups;
00048 typedef CosNaming::Name Name;
00049 typedef any Value;
00050
00051 struct Property {
00052 Name nam;
00053 Value val;
00054 };
00055
00056 typedef sequence<Property> Properties;
00057 typedef Name Location;
00058 typedef sequence<Location> Locations;
00059 typedef Properties Criteria;
00060
00061 struct FactoryInfo {
00062 GenericFactory the_factory;
00063 Location the_location;
00064 Criteria the_criteria;
00065 };
00066 typedef sequence<FactoryInfo> FactoryInfos;
00067
00068 typedef long MembershipStyleValue;
00069 const MembershipStyleValue MEMB_APP_CTRL = 0;
00070 const MembershipStyleValue MEMB_INF_CTRL = 1;
00071
00072 typedef FactoryInfos FactoriesValue;
00073 typedef unsigned short InitialNumberMembersValue;
00074 typedef unsigned short MinimumNumberMembersValue;
00075
00076 exception InterfaceNotFound {};
00077 exception ObjectGroupNotFound {};
00078 exception MemberNotFound {};
00079 exception ObjectNotFound {};
00080 exception MemberAlreadyPresent {};
00081 exception ObjectNotCreated {};
00082 exception ObjectNotAdded {};
00083
00084 exception TypeConflict {};
00085 exception UnsupportedProperty {
00086 Name nam;
00087 Value val;
00088 };
00089
00090 exception InvalidProperty {
00091 Name nam;
00092 Value val;
00093 };
00094
00095 exception NoFactory {
00096 Location the_location;
00097 _TypeId type_id;
00098 };
00099
00100 exception InvalidCriteria {
00101 Criteria invalid_criteria;
00102 };
00103
00104 exception CannotMeetCriteria {
00105 Criteria unmet_criteria;
00106 };
00107
00108
00109 interface PropertyManager {
00110
00111 void set_default_properties (in Properties props)
00112 raises (InvalidProperty, UnsupportedProperty);
00113
00114 Properties get_default_properties();
00115
00116 void remove_default_properties (in Properties props)
00117 raises (InvalidProperty, UnsupportedProperty);
00118
00119 void set_type_properties (in _TypeId type_id, in Properties overrides)
00120 raises (InvalidProperty, UnsupportedProperty);
00121
00122 Properties get_type_properties(in _TypeId type_id);
00123
00124 void remove_type_properties (in _TypeId type_id, in Properties props)
00125 raises (InvalidProperty, UnsupportedProperty);
00126
00127 void set_properties_dynamically
00128 (in ObjectGroup object_group, in Properties overrides)
00129 raises (ObjectGroupNotFound,
00130 InvalidProperty,
00131 UnsupportedProperty);
00132
00133 Properties get_properties (in ObjectGroup object_group)
00134 raises (ObjectGroupNotFound);
00135 };
00136
00137
00138
00139 interface ObjectGroupManager {
00140 ObjectGroup create_member (in ObjectGroup object_group,
00141 in Location the_location,
00142 in _TypeId type_id,
00143 in Criteria the_criteria)
00144 raises (ObjectGroupNotFound,
00145 MemberAlreadyPresent,
00146 NoFactory,
00147 ObjectNotCreated,
00148 InvalidCriteria,
00149 CannotMeetCriteria);
00150
00151 ObjectGroup add_member (in ObjectGroup object_group,
00152 in Location the_location,
00153 in Object member)
00154 raises (ObjectGroupNotFound,
00155 MemberAlreadyPresent,
00156 ObjectNotAdded);
00157
00158 ObjectGroup remove_member (in ObjectGroup object_group,
00159 in Location the_location)
00160 raises (ObjectGroupNotFound, MemberNotFound);
00161
00162 Locations locations_of_members (in ObjectGroup object_group)
00163 raises (ObjectGroupNotFound);
00164
00165 ObjectGroups groups_at_location (in Location the_location);
00166
00167 ObjectGroupId get_object_group_id (in ObjectGroup object_group)
00168 raises (ObjectGroupNotFound);
00169
00170 ObjectGroup get_object_group_ref (in ObjectGroup object_group)
00171 raises (ObjectGroupNotFound);
00172
00173 Object get_member_ref (in ObjectGroup object_group,
00174 in Location loc)
00175 raises (ObjectGroupNotFound, MemberNotFound);
00176
00177
00178 ObjectGroup get_object_group_ref_from_id (
00179 in ObjectGroupId group_id)
00180 raises (ObjectGroupNotFound);
00181
00182 };
00183
00184
00185
00186 interface GenericFactory {
00187 typedef any FactoryCreationId;
00188
00189 Object create_object (in _TypeId type_id,
00190 in Criteria the_criteria,
00191 out FactoryCreationId factory_creation_id)
00192 raises (NoFactory,
00193 ObjectNotCreated,
00194 InvalidCriteria,
00195 InvalidProperty,
00196 CannotMeetCriteria);
00197
00198 void delete_object (in FactoryCreationId factory_creation_id)
00199 raises (ObjectNotFound);
00200
00201 };
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213 typedef CORBA::Identifier RoleName;
00214
00215
00216
00217
00218 const string role_criterion = "org.omg.portablegroup.Role";
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229 interface FactoryRegistry
00230 {
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243 void register_factory(in RoleName role, in _TypeId type_id, in FactoryInfo factory_info)
00244 raises (MemberAlreadyPresent, TypeConflict);
00245
00246
00247
00248
00249
00250
00251
00252 void unregister_factory(in RoleName role, in Location the_location)
00253 raises (MemberNotFound);
00254
00255
00256
00257
00258
00259
00260
00261 void unregister_factory_by_role(in RoleName role);
00262
00263
00264
00265
00266
00267
00268
00269 void unregister_factory_by_location(in Location the_location);
00270
00271
00272
00273
00274
00275
00276
00277 FactoryInfos list_factories_by_role(in RoleName role, out _TypeId type_id);
00278
00279
00280
00281
00282
00283
00284
00285 FactoryInfos list_factories_by_location(in Location the_location);
00286
00287 };
00288
00289
00290 const string TAO_UPDATE_OBJECT_GROUP_METHOD_NAME = "tao_update_object_group";
00291
00292 interface TAO_UpdateObjectGroup {
00293
00294
00295
00296
00297 void tao_update_object_group (
00298 in string iogr,
00299 in PortableGroup::ObjectGroupRefVersion version,
00300 in boolean is_primary);
00301 };
00302
00303 exception NotAGroupObject {};
00304 typedef sequence <PortableServer::ObjectId> IDs;
00305
00306 local interface GOA : PortableServer::POA {
00307 PortableServer::ObjectId create_id_for_reference(in Object the_ref)
00308 raises (NotAGroupObject);
00309
00310 IDs reference_to_ids(in Object the_ref)
00311 raises (NotAGroupObject);
00312
00313 void associate_reference_with_id (in Object ref,
00314 in PortableServer::ObjectId oid)
00315 raises (NotAGroupObject);
00316
00317 void disassociate_reference_with_id (in Object ref,
00318 in PortableServer::ObjectId oid)
00319 raises (NotAGroupObject);
00320 };
00321 };
00322
00323 #endif