#include <GOA.h>
Inheritance diagram for TAO_GOA:
Implementation of the PortableGroup::GOA interface.
Definition at line 48 of file GOA.h.
TAO_GOA::TAO_GOA | ( | const String & | name, | |
PortableServer::POAManager_ptr | poa_manager, | |||
const TAO_POA_Policy_Set & | policies, | |||
TAO_Root_POA * | parent, | |||
ACE_Lock & | lock, | |||
TAO_SYNCH_MUTEX & | thread_lock, | |||
TAO_ORB_Core & | orb_core, | |||
TAO_Object_Adapter * | object_adapter | |||
) |
PortableServer::ObjectId * TAO_GOA::activate_object | ( | PortableServer::Servant | p_servant | ) |
Reimplemented from TAO_Root_POA.
Definition at line 298 of file GOA.cpp.
References TAO_Root_POA::activate_object().
00299 { 00300 PortableServer::ObjectId *object_id = 00301 this->TAO_Regular_POA::activate_object (p_servant); 00302 return object_id; 00303 }
void TAO_GOA::activate_object_with_id | ( | const PortableServer::ObjectId & | id, | |
PortableServer::Servant | p_servant | |||
) |
Reimplemented from TAO_Root_POA.
Definition at line 306 of file GOA.cpp.
References TAO_Root_POA::activate_object_with_id().
00308 { 00309 this->TAO_Regular_POA::activate_object_with_id (id, p_servant); 00310 }
void TAO_GOA::associate_group_with_ref | ( | CORBA::Object_ptr | group_ref, | |
CORBA::Object_ptr | obj_ref | |||
) | [protected] |
Helper function to associate group references with object references.
Definition at line 478 of file GOA.cpp.
References CORBA::Object::_stubobj(), CORBA::SystemException::_tao_minor_code(), PortableGroup_Request_Dispatcher::acceptor_registry_, ACE_NEW_THROW_EX, TAO_Portable_Group_Map::add_groupid_objectkey_pair(), CORBA::COMPLETED_NO, create_group_acceptors(), PortableGroup_Request_Dispatcher::group_map_, TAO_Profile::object_key(), TAO_Root_POA::orb_core_, TAO_Stub::profile_in_use(), TAO_ORB_Core::request_dispatcher(), and TAO::VMCID.
Referenced by associate_reference_with_id(), and create_id_for_reference().
00481 { 00482 // Find the Group Component so that we can extract the Group ID. 00483 PortableGroup::TagGroupTaggedComponent *tmp_group_id; 00484 ACE_NEW_THROW_EX (tmp_group_id, 00485 PortableGroup::TagGroupTaggedComponent, 00486 CORBA::NO_MEMORY ( 00487 CORBA::SystemException::_tao_minor_code ( 00488 TAO::VMCID, 00489 ENOMEM), 00490 CORBA::COMPLETED_NO)); 00491 00492 PortableGroup::TagGroupTaggedComponent_var group_id = tmp_group_id; 00493 00494 if (this->find_group_component (group_ref, group_id.inout ()) != 0) 00495 { 00496 // Group component wasn't found. The group reference 00497 // that was passed in must be bogus. 00498 throw PortableGroup::NotAGroupObject (); 00499 } 00500 00501 PortableGroup_Request_Dispatcher *rd = 00502 dynamic_cast <PortableGroup_Request_Dispatcher*>( 00503 this->orb_core_.request_dispatcher()); 00504 00505 // Create the acceptors necessary to receive requests for the 00506 // specified group reference. 00507 this->create_group_acceptors (group_ref, 00508 rd->acceptor_registry_, 00509 this->orb_core_); 00510 00511 // Add a mapping from GroupId to Object key in the PortableGroup 00512 const TAO::ObjectKey &key = 00513 obj_ref->_stubobj ()->profile_in_use ()->object_key (); 00514 rd->group_map_.add_groupid_objectkey_pair (group_id._retn (), key); 00515 }
void TAO_GOA::associate_reference_with_id | ( | CORBA::Object_ptr | ref, | |
const PortableServer::ObjectId & | oid | |||
) | [virtual] |
Definition at line 49 of file GOA.cpp.
References associate_group_with_ref(), id_to_reference(), and TAO_Pseudo_Var_T< T >::in().
00051 { 00052 // Create a reference for the specified ObjectId, since 00053 // it is much easier to extract the object key from the 00054 // reference. 00055 CORBA::Object_var obj_ref = this->id_to_reference (oid); 00056 00057 // Associate the object reference with the group reference. 00058 this->associate_group_with_ref (ref, 00059 obj_ref.in ()); 00060 }
int TAO_GOA::create_group_acceptors | ( | CORBA::Object_ptr | the_ref, | |
TAO_PortableGroup_Acceptor_Registry & | acceptor_registry, | |||
TAO_ORB_Core & | orb_core | |||
) | [protected] |
Definition at line 449 of file GOA.cpp.
References CORBA::Object::_stubobj(), TAO_Stub::base_profiles(), TAO_MProfile::get_profile(), TAO_PortableGroup_Acceptor_Registry::open(), TAO_Root_POA::orb_core(), and TAO_Profile::supports_multicast().
Referenced by associate_group_with_ref().
00452 { 00453 const TAO_MProfile& profiles = the_ref->_stubobj ()->base_profiles (); 00454 const TAO_Profile* profile; 00455 CORBA::ULong slot; 00456 int num = 0; 00457 00458 // Iterate through the tagged profiles, and 00459 // create acceptors for the multicast ones. 00460 slot = 0; 00461 while (0 != (profile = profiles.get_profile (slot))) 00462 { 00463 if (profile->supports_multicast ()) 00464 { 00465 acceptor_registry.open (profile, 00466 orb_core); 00467 ++num; 00468 } 00469 00470 ++slot; 00471 } 00472 00473 // Return the number of acceptors registered. 00474 return num; 00475 }
PortableServer::IdAssignmentPolicy_ptr TAO_GOA::create_id_assignment_policy | ( | PortableServer::IdAssignmentPolicyValue | value | ) |
Reimplemented from TAO_Root_POA.
Definition at line 180 of file GOA.cpp.
References TAO_Root_POA::create_id_assignment_policy().
00181 { 00182 PortableServer::IdAssignmentPolicy_ptr policy = 00183 this->TAO_Regular_POA::create_id_assignment_policy (value); 00184 return policy; 00185 }
TAO_BEGIN_VERSIONED_NAMESPACE_DECL PortableServer::ObjectId * TAO_GOA::create_id_for_reference | ( | CORBA::Object_ptr | the_ref | ) | [virtual] |
Definition at line 22 of file GOA.cpp.
References CORBA::Object::_stubobj(), associate_group_with_ref(), create_reference(), TAO_Pseudo_Var_T< T >::in(), reference_to_id(), and TAO_Stub::type_id.
00023 { 00024 // Get the RepositoryId from the Group reference so 00025 // we know what kind of reference to make. 00026 const char* repository_id = the_ref->_stubobj ()->type_id.in (); 00027 00028 // Create a temporary object reference and then get the 00029 // ObjectId out of it. 00030 CORBA::Object_var obj_ref = this->create_reference (repository_id); 00031 00032 PortableServer::ObjectId_var obj_id = 00033 this->reference_to_id (obj_ref.in ()); 00034 00035 // Associate the object reference with the group reference. 00036 this->associate_group_with_ref (the_ref, 00037 obj_ref.in ()); 00038 00039 return obj_id._retn (); 00040 }
PortableServer::IdUniquenessPolicy_ptr TAO_GOA::create_id_uniqueness_policy | ( | PortableServer::IdUniquenessPolicyValue | value | ) |
Reimplemented from TAO_Root_POA.
Definition at line 171 of file GOA.cpp.
References TAO_Root_POA::create_id_uniqueness_policy().
00172 { 00173 PortableServer::IdUniquenessPolicy_ptr policy = 00174 this->TAO_Regular_POA::create_id_uniqueness_policy (value); 00175 return policy; 00176 }
PortableServer::ImplicitActivationPolicy_ptr TAO_GOA::create_implicit_activation_policy | ( | PortableServer::ImplicitActivationPolicyValue | value | ) |
Reimplemented from TAO_Root_POA.
Definition at line 191 of file GOA.cpp.
References TAO_Root_POA::create_implicit_activation_policy().
00192 { 00193 PortableServer::ImplicitActivationPolicy_ptr policy = 00194 this->TAO_Regular_POA::create_implicit_activation_policy (value); 00195 return policy; 00196 }
PortableServer::LifespanPolicy_ptr TAO_GOA::create_lifespan_policy | ( | PortableServer::LifespanPolicyValue | value | ) |
Reimplemented from TAO_Root_POA.
Definition at line 163 of file GOA.cpp.
References TAO_Root_POA::create_lifespan_policy().
00164 { 00165 PortableServer::LifespanPolicy_ptr policy = 00166 this->TAO_Regular_POA::create_lifespan_policy (value); 00167 return policy; 00168 }
PortableServer::POA_ptr TAO_GOA::create_POA | ( | const char * | adapter_name, | |
PortableServer::POAManager_ptr | poa_manager, | |||
const CORBA::PolicyList & | policies | |||
) |
Reimplemented from TAO_Root_POA.
Definition at line 122 of file GOA.cpp.
References TAO_Root_POA::create_POA().
00125 { 00126 PortableServer::POA_ptr poa = this->TAO_Regular_POA::create_POA (adapter_name, 00127 poa_manager, 00128 policies); 00129 return poa; 00130 }
CORBA::Object_ptr TAO_GOA::create_reference | ( | const char * | intf | ) |
Reimplemented from TAO_Root_POA.
Definition at line 319 of file GOA.cpp.
References TAO_Root_POA::create_reference().
Referenced by create_id_for_reference().
00320 { 00321 CORBA::Object_ptr obj = 00322 this->TAO_Regular_POA::create_reference (intf); 00323 return obj; 00324 }
CORBA::Object_ptr TAO_GOA::create_reference_with_id | ( | const PortableServer::ObjectId & | oid, | |
const char * | intf | |||
) |
Reimplemented from TAO_Root_POA.
Definition at line 327 of file GOA.cpp.
References TAO_Root_POA::create_reference_with_id().
00329 { 00330 CORBA::Object_ptr obj = 00331 this->TAO_Regular_POA::create_reference_with_id (oid, 00332 intf); 00333 return obj; 00334 }
PortableServer::RequestProcessingPolicy_ptr TAO_GOA::create_request_processing_policy | ( | PortableServer::RequestProcessingPolicyValue | value | ) |
Reimplemented from TAO_Root_POA.
Definition at line 208 of file GOA.cpp.
References TAO_Root_POA::create_request_processing_policy().
00209 { 00210 PortableServer::RequestProcessingPolicy_ptr policy = 00211 this->TAO_Regular_POA::create_request_processing_policy (value); 00212 return policy; 00213 }
PortableServer::ServantRetentionPolicy_ptr TAO_GOA::create_servant_retention_policy | ( | PortableServer::ServantRetentionPolicyValue | value | ) |
Reimplemented from TAO_Root_POA.
Definition at line 199 of file GOA.cpp.
References TAO_Root_POA::create_servant_retention_policy().
00200 { 00201 PortableServer::ServantRetentionPolicy_ptr policy = 00202 this->TAO_Regular_POA::create_servant_retention_policy (value); 00203 return policy; 00204 }
PortableServer::ThreadPolicy_ptr TAO_GOA::create_thread_policy | ( | PortableServer::ThreadPolicyValue | value | ) |
Reimplemented from TAO_Root_POA.
Definition at line 153 of file GOA.cpp.
References TAO_Root_POA::create_thread_policy().
00154 { 00155 PortableServer::ThreadPolicy_ptr policy = 00156 this->TAO_Regular_POA::create_thread_policy (value); 00157 return policy; 00158 }
void TAO_GOA::deactivate_object | ( | const PortableServer::ObjectId & | oid | ) |
Reimplemented from TAO_Root_POA.
Definition at line 313 of file GOA.cpp.
References TAO_Root_POA::deactivate_object().
00314 { 00315 this->TAO_Regular_POA::deactivate_object (oid); 00316 }
void TAO_GOA::destroy | ( | CORBA::Boolean | etherealize_objects, | |
CORBA::Boolean | wait_for_completion | |||
) |
Reimplemented from TAO_Root_POA.
Definition at line 142 of file GOA.cpp.
References TAO_Root_POA::destroy().
00144 { 00145 this->TAO_Regular_POA::destroy (etherealize_objects, 00146 wait_for_completion); 00147 }
void TAO_GOA::disassociate_reference_with_id | ( | CORBA::Object_ptr | ref, | |
const PortableServer::ObjectId & | oid | |||
) | [virtual] |
int TAO_GOA::find_group_component | ( | const CORBA::Object_ptr | the_ref, | |
PortableGroup::TagGroupTaggedComponent & | group | |||
) | [protected] |
Definition at line 392 of file GOA.cpp.
References CORBA::Object::_stubobj(), TAO_Stub::base_profiles(), and TAO_MProfile::get_profile().
00394 { 00395 const TAO_MProfile& profiles = the_ref->_stubobj ()->base_profiles (); 00396 const TAO_Profile* profile; 00397 CORBA::ULong slot; 00398 00399 // Iterate through the tagged profiles, and 00400 // create acceptors for the multicast ones. 00401 slot = 0; 00402 while (0 != (profile = profiles.get_profile (slot))) 00403 { 00404 if (this->find_group_component_in_profile (profile, group) == 0) 00405 return 0; 00406 00407 ++slot; 00408 } 00409 00410 // Not found. 00411 return -1; 00412 }
int TAO_GOA::find_group_component_in_profile | ( | const TAO_Profile * | profile, | |
PortableGroup::TagGroupTaggedComponent & | group | |||
) | [protected] |
Definition at line 415 of file GOA.cpp.
References TAO_Tagged_Components::get_component(), and TAO_Profile::tagged_components().
00417 { 00418 // Iterate through the tagged components looking for 00419 // group tag. 00420 const TAO_Tagged_Components& components = profile->tagged_components (); 00421 00422 IOP::TaggedComponent tagged_component; 00423 tagged_component.tag = IOP::TAG_GROUP; 00424 00425 // Try to find it. 00426 if (components.get_component (tagged_component) == 0) 00427 return -1; 00428 00429 // Found it. 00430 const CORBA::Octet *buf = 00431 tagged_component.component_data.get_buffer (); 00432 00433 TAO_InputCDR in_cdr (reinterpret_cast <const char*> (buf), 00434 tagged_component.component_data.length ()); 00435 00436 // Extract the Byte Order. 00437 CORBA::Boolean byte_order; 00438 if ((in_cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0) 00439 return -1; 00440 in_cdr.reset_byte_order (static_cast <int> (byte_order)); 00441 00442 if ((in_cdr >> group) == 0) 00443 return -1; 00444 00445 return 0; 00446 }
PortableServer::POA_ptr TAO_GOA::find_POA | ( | const char * | adapter_name, | |
CORBA::Boolean | activate_it | |||
) |
Reimplemented from TAO_Root_POA.
Definition at line 133 of file GOA.cpp.
References TAO_Root_POA::find_POA().
00135 { 00136 PortableServer::POA_ptr poa = this->TAO_Regular_POA::find_POA (adapter_name, 00137 activate_it); 00138 return poa; 00139 }
PortableServer::Servant TAO_GOA::get_servant | ( | void | ) |
Reimplemented from TAO_Root_POA.
Definition at line 282 of file GOA.cpp.
References TAO_Root_POA::get_servant().
00283 { 00284 PortableServer::Servant servant = 00285 this->TAO_Regular_POA::get_servant (); 00286 return servant; 00287 }
PortableServer::ServantManager_ptr TAO_GOA::get_servant_manager | ( | void | ) |
Reimplemented from TAO_Root_POA.
Definition at line 268 of file GOA.cpp.
References TAO_Root_POA::get_servant_manager().
00269 { 00270 PortableServer::ServantManager_ptr servant_manager = 00271 this->TAO_Regular_POA::get_servant_manager (); 00272 return servant_manager; 00273 }
CORBA::OctetSeq * TAO_GOA::id | ( | void | ) |
Reimplemented from TAO_Root_POA.
Definition at line 386 of file GOA.cpp.
References TAO_Root_POA::id().
00387 { 00388 return this->TAO_Regular_POA::id (); 00389 }
CORBA::Object_ptr TAO_GOA::id_to_reference | ( | const PortableServer::ObjectId & | oid | ) |
Reimplemented from TAO_Root_POA.
Definition at line 378 of file GOA.cpp.
References TAO_Root_POA::id_to_reference().
Referenced by associate_reference_with_id().
00379 { 00380 CORBA::Object_ptr obj = 00381 this->TAO_Regular_POA::id_to_reference (oid); 00382 return obj; 00383 }
PortableServer::Servant TAO_GOA::id_to_servant | ( | const PortableServer::ObjectId & | oid | ) |
Reimplemented from TAO_Root_POA.
Definition at line 370 of file GOA.cpp.
References TAO_Root_POA::id_to_servant().
00371 { 00372 PortableServer::Servant servant = 00373 this->TAO_Regular_POA::id_to_servant (oid); 00374 return servant; 00375 }
static int TAO_GOA::Initializer | ( | void | ) | [static] |
TAO_Root_POA * TAO_GOA::new_POA | ( | const String & | name, | |
PortableServer::POAManager_ptr | poa_manager, | |||
const TAO_POA_Policy_Set & | policies, | |||
TAO_Root_POA * | parent, | |||
ACE_Lock & | lock, | |||
TAO_SYNCH_MUTEX & | thread_lock, | |||
TAO_ORB_Core & | orb_core, | |||
TAO_Object_Adapter * | object_adapter | |||
) | [protected, virtual] |
Template method for creating new POA's of this type.
Definition at line 95 of file GOA.cpp.
References ACE_NEW_THROW_EX, TAO_Root_POA::lock(), TAO_Root_POA::object_adapter(), TAO_Root_POA::orb_core(), and TAO_Root_POA::policies().
00103 { 00104 TAO_GOA *poa = 0; 00105 00106 ACE_NEW_THROW_EX (poa, 00107 TAO_GOA (name, 00108 poa_manager, 00109 policies, 00110 parent, 00111 lock, 00112 thread_lock, 00113 orb_core, 00114 object_adapter), 00115 CORBA::NO_MEMORY ()); 00116 00117 return poa; 00118 }
PortableServer::ObjectId * TAO_GOA::reference_to_id | ( | CORBA::Object_ptr | reference | ) |
Reimplemented from TAO_Root_POA.
Definition at line 362 of file GOA.cpp.
References TAO_Root_POA::reference_to_id().
Referenced by create_id_for_reference().
00363 { 00364 PortableServer::ObjectId *object_id = 00365 this->TAO_Regular_POA::reference_to_id (reference); 00366 return object_id; 00367 }
PortableGroup::IDs * TAO_GOA::reference_to_ids | ( | CORBA::Object_ptr | the_ref | ) | [virtual] |
PortableServer::Servant TAO_GOA::reference_to_servant | ( | CORBA::Object_ptr | reference | ) |
Reimplemented from TAO_Root_POA.
Definition at line 354 of file GOA.cpp.
References TAO_Root_POA::reference_to_servant().
00355 { 00356 PortableServer::Servant servant = 00357 this->TAO_Regular_POA::reference_to_servant (reference); 00358 return servant; 00359 }
PortableServer::ObjectId * TAO_GOA::servant_to_id | ( | PortableServer::Servant | p_servant | ) |
Reimplemented from TAO_Root_POA.
Definition at line 337 of file GOA.cpp.
References TAO_Root_POA::servant_to_id().
00338 { 00339 PortableServer::ObjectId *object_id = 00340 this->TAO_Regular_POA::servant_to_id (p_servant); 00341 return object_id; 00342 }
CORBA::Object_ptr TAO_GOA::servant_to_reference | ( | PortableServer::Servant | p_servant | ) |
Reimplemented from TAO_Root_POA.
Definition at line 345 of file GOA.cpp.
References TAO_Root_POA::servant_to_reference().
00346 { 00347 CORBA::Object_ptr obj = 00348 this->TAO_Regular_POA::servant_to_reference (p_servant); 00349 return obj; 00350 }
void TAO_GOA::set_servant | ( | PortableServer::Servant | servant | ) |
Reimplemented from TAO_Root_POA.
Definition at line 290 of file GOA.cpp.
References TAO_Root_POA::set_servant().
00291 { 00292 this->TAO_Regular_POA::set_servant (servant); 00293 }
void TAO_GOA::set_servant_manager | ( | PortableServer::ServantManager_ptr | imgr | ) |
Reimplemented from TAO_Root_POA.
Definition at line 276 of file GOA.cpp.
References TAO_Root_POA::set_servant_manager().
00277 { 00278 this->TAO_Regular_POA::set_servant_manager (imgr); 00279 }
void TAO_GOA::the_activator | ( | PortableServer::AdapterActivator_ptr | adapter_activator | ) |
Reimplemented from TAO_Root_POA.
Definition at line 262 of file GOA.cpp.
References TAO_Root_POA::the_activator().
00263 { 00264 this->TAO_Regular_POA::the_activator (adapter_activator); 00265 }
PortableServer::AdapterActivator_ptr TAO_GOA::the_activator | ( | void | ) |
Reimplemented from TAO_Root_POA.
Definition at line 254 of file GOA.cpp.
References TAO_Root_POA::the_activator().
00255 { 00256 PortableServer::AdapterActivator_ptr activator = 00257 this->TAO_Regular_POA::the_activator (); 00258 return activator; 00259 }
PortableServer::POAList * TAO_GOA::the_children | ( | void | ) |
Reimplemented from TAO_Root_POA.
Definition at line 235 of file GOA.cpp.
References TAO_Root_POA::the_children().
00236 { 00237 PortableServer::POAList *children = 00238 this->TAO_Regular_POA::the_children (); 00239 return children; 00240 }
char * TAO_GOA::the_name | ( | void | ) |
Reimplemented from TAO_Root_POA.
Definition at line 219 of file GOA.cpp.
References TAO_Root_POA::name(), and TAO_Root_POA::the_name().
00220 { 00221 char * name = 00222 this->TAO_Regular_POA::the_name (); 00223 return name; 00224 }
PortableServer::POA_ptr TAO_GOA::the_parent | ( | void | ) |
Reimplemented from TAO_Regular_POA.
Definition at line 227 of file GOA.cpp.
References TAO_Regular_POA::the_parent().
00228 { 00229 PortableServer::POA_ptr parent = 00230 this->TAO_Regular_POA::the_parent (); 00231 return parent; 00232 }
PortableServer::POAManager_ptr TAO_GOA::the_POAManager | ( | void | ) |
Reimplemented from TAO_Root_POA.
Definition at line 243 of file GOA.cpp.
References TAO_Root_POA::the_POAManager().
00244 { 00245 PortableServer::POAManager_ptr poa_manager = 00246 this->TAO_Regular_POA::the_POAManager (); 00247 return poa_manager; 00248 }