#include <RT_POA.h>
Inheritance diagram for TAO_RT_POA:
Public Member Functions | |
CORBA::Object_ptr | create_reference_with_priority (const char *intf, RTCORBA::Priority priority) |
CORBA::Object_ptr | create_reference_with_id_and_priority (const PortableServer::ObjectId &oid, const char *intf, RTCORBA::Priority priority) |
PortableServer::ObjectId * | activate_object_with_priority (PortableServer::Servant p_servant, RTCORBA::Priority priority) |
void | activate_object_with_id_and_priority (const PortableServer::ObjectId &oid, PortableServer::Servant p_servant, RTCORBA::Priority priority) |
PortableServer::POA_ptr | create_POA (const char *adapter_name, PortableServer::POAManager_ptr poa_manager, const CORBA::PolicyList &policies) |
PortableServer::POA_ptr | find_POA (const char *adapter_name, CORBA::Boolean activate_it) |
void | destroy (CORBA::Boolean etherealize_objects, CORBA::Boolean wait_for_completion) |
PortableServer::ThreadPolicy_ptr | create_thread_policy (PortableServer::ThreadPolicyValue value) |
PortableServer::LifespanPolicy_ptr | create_lifespan_policy (PortableServer::LifespanPolicyValue value) |
PortableServer::IdUniquenessPolicy_ptr | create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value) |
PortableServer::IdAssignmentPolicy_ptr | create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value) |
PortableServer::ImplicitActivationPolicy_ptr | create_implicit_activation_policy (PortableServer::ImplicitActivationPolicyValue value) |
PortableServer::ServantRetentionPolicy_ptr | create_servant_retention_policy (PortableServer::ServantRetentionPolicyValue value) |
PortableServer::RequestProcessingPolicy_ptr | create_request_processing_policy (PortableServer::RequestProcessingPolicyValue value) |
char * | the_name (void) |
PortableServer::POA_ptr | the_parent (void) |
PortableServer::POAList * | the_children (void) |
PortableServer::POAManager_ptr | the_POAManager (void) |
PortableServer::AdapterActivator_ptr | the_activator (void) |
void | the_activator (PortableServer::AdapterActivator_ptr adapter_activator) |
PortableServer::ServantManager_ptr | get_servant_manager (void) |
void | set_servant_manager (PortableServer::ServantManager_ptr imgr) |
PortableServer::Servant | get_servant (void) |
void | set_servant (PortableServer::Servant servant) |
PortableServer::ObjectId * | activate_object (PortableServer::Servant p_servant) |
void | activate_object_with_id (const PortableServer::ObjectId &id, PortableServer::Servant p_servant) |
void | deactivate_object (const PortableServer::ObjectId &oid) |
CORBA::Object_ptr | create_reference (const char *intf) |
CORBA::Object_ptr | create_reference_with_id (const PortableServer::ObjectId &oid, const char *intf) |
PortableServer::ObjectId * | servant_to_id (PortableServer::Servant p_servant) |
CORBA::Object_ptr | servant_to_reference (PortableServer::Servant p_servant) |
PortableServer::Servant | reference_to_servant (CORBA::Object_ptr reference) |
PortableServer::ObjectId * | reference_to_id (CORBA::Object_ptr reference) |
PortableServer::Servant | id_to_servant (const PortableServer::ObjectId &oid) |
CORBA::Object_ptr | id_to_reference (const PortableServer::ObjectId &oid) |
CORBA::OctetSeq * | id (void) |
virtual CORBA::PolicyList * | client_exposed_policies (CORBA::Short object_priority) |
TAO_RT_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) | |
virtual | ~TAO_RT_POA (void) |
void * | thread_pool (void) const |
Protected Member Functions | |
virtual TAO_Root_POA * | 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) |
Template method for creating new POA's of this type. | |
virtual TAO_Stub * | key_to_stub_i (const TAO::ObjectKey &key, const char *type_id, CORBA::Short priority) |
void | validate_priority (RTCORBA::Priority priority) |
void | validate_policies (void) |
void | parse_rt_policies (TAO_POA_Policy_Set &policies) |
size_t | endpoint_count (void) |
TAO_Stub * | create_stub_object (const TAO::ObjectKey &object_key, const char *type_id, CORBA::PolicyList *policy_list, TAO_Acceptor_Filter *filter, TAO_PriorityBandedConnectionPolicy *priority_bands) |
int | lane_required (TAO_Thread_Lane *lane, TAO_PriorityBandedConnectionPolicy *priority_bands) |
Protected Attributes | |
TAO_Thread_Pool * | thread_pool_ |
|
|
|
Definition at line 62 of file RT_POA.cpp.
00063 { 00064 } |
|
Definition at line 642 of file RT_POA.cpp.
00643 {
00644 return this->TAO_Regular_POA::activate_object (p_servant);
00645 }
|
|
Definition at line 649 of file RT_POA.cpp.
00651 {
00652 this->TAO_Regular_POA::activate_object_with_id (id, p_servant);
00653 }
|
|
Definition at line 72 of file RT_POA.inl. References validate_policies(), and validate_priority().
00075 { 00076 // Check that this method can be used based on this POA's policies. 00077 this->validate_policies (); 00078 00079 this->validate_priority (priority); 00080 00081 while (true) 00082 { 00083 bool wait_occurred_restart_call = false; 00084 00085 // Lock access for the duration of this transaction. 00086 TAO_POA_GUARD; 00087 00088 this->activate_object_with_id_i (oid, 00089 servant, 00090 priority, 00091 wait_occurred_restart_call); 00092 00093 // If we ended up waiting on a condition variable, the POA state 00094 // may have changed while we are waiting. Therefore, we need to 00095 // restart this call. 00096 if (wait_occurred_restart_call) 00097 continue; 00098 else 00099 return; 00100 } 00101 } |
|
Definition at line 43 of file RT_POA.inl. References validate_policies(), and validate_priority().
00045 { 00046 // Check that this method can be used based on this POA's policies. 00047 this->validate_policies (); 00048 00049 this->validate_priority (priority); 00050 00051 while (true) 00052 { 00053 bool wait_occurred_restart_call = false; 00054 00055 // Lock access for the duration of this transaction. 00056 TAO_POA_GUARD_RETURN (0); 00057 00058 PortableServer::ObjectId *result = 00059 this->activate_object_i (servant, priority, wait_occurred_restart_call); 00060 00061 // If we ended up waiting on a condition variable, the POA state 00062 // may have changed while we are waiting. Therefore, we need to 00063 // restart this call. 00064 if (wait_occurred_restart_call) 00065 continue; 00066 else 00067 return result; 00068 } 00069 } |
|
Definition at line 442 of file RT_POA.cpp. References ACE_NEW_THROW_EX, client_exposed_policies(), and TAO_INVALID_PRIORITY. Referenced by client_exposed_policies(), and key_to_stub_i().
00443 { 00444 CORBA::PolicyList *client_exposed_policies = 0; 00445 ACE_NEW_THROW_EX (client_exposed_policies, 00446 CORBA::PolicyList (), 00447 CORBA::NO_MEMORY (TAO::VMCID, 00448 CORBA::COMPLETED_NO)); 00449 00450 CORBA::PolicyList_var safe_client_exposed_policies = client_exposed_policies; 00451 00452 // Add in all of the client exposed policies. 00453 this->policies_.add_client_exposed_fixed_policies (client_exposed_policies); 00454 00455 // Check if the priority model policy has been set, and if so, let 00456 // the client know about it. 00457 CORBA::Short poa_priority = 00458 this->cached_policies_.server_priority (); 00459 00460 if (poa_priority != TAO_INVALID_PRIORITY) 00461 { 00462 TAO::Portable_Server::Cached_Policies::PriorityModel priority_model = 00463 this->cached_policies_.priority_model (); 00464 00465 // If the priority model is client propagated, let the client 00466 // about the default server priority (the POA priority). If 00467 // the priority model is server declared, tell the client the 00468 // servant's priority. 00469 CORBA::Short priority; 00470 if (priority_model == TAO::Portable_Server::Cached_Policies::CLIENT_PROPAGATED) 00471 priority = poa_priority; 00472 else 00473 priority = object_priority; 00474 00475 const CORBA::ULong current_length = 00476 client_exposed_policies->length (); 00477 client_exposed_policies->length (current_length + 1); 00478 00479 TAO_PriorityModelPolicy *priority_model_policy; 00480 ACE_NEW_THROW_EX (priority_model_policy, 00481 TAO_PriorityModelPolicy (RTCORBA::PriorityModel (priority_model), 00482 priority), 00483 CORBA::NO_MEMORY (TAO::VMCID, 00484 CORBA::COMPLETED_NO)); 00485 00486 (*client_exposed_policies)[current_length] = priority_model_policy; 00487 } 00488 00489 return safe_client_exposed_policies._retn (); 00490 } |
|
Definition at line 544 of file RT_POA.cpp.
00545 {
00546 return this->TAO_Regular_POA::create_id_assignment_policy (value);
00547 }
|
|
Definition at line 536 of file RT_POA.cpp.
00537 {
00538 return this->TAO_Regular_POA::create_id_uniqueness_policy (value);
00539 }
|
|
Definition at line 553 of file RT_POA.cpp.
00555 {
00556 return this->TAO_Regular_POA::create_implicit_activation_policy (value);
00557 }
|
|
Definition at line 528 of file RT_POA.cpp.
00529 {
00530 return this->TAO_Regular_POA::create_lifespan_policy (value);
00531 }
|
|
Definition at line 495 of file RT_POA.cpp.
00498 {
00499 return this->TAO_Regular_POA::create_POA (adapter_name, poa_manager, policies);
00500 }
|
|
Definition at line 663 of file RT_POA.cpp.
00664 {
00665 return this->TAO_Regular_POA::create_reference (intf);
00666 }
|
|
Definition at line 669 of file RT_POA.cpp.
00671 {
00672 return this->TAO_Regular_POA::create_reference_with_id (oid, intf);
00673 }
|
|
Definition at line 27 of file RT_POA.inl. References validate_policies(), and validate_priority().
00030 { 00031 // Check that this method can be used based on this POA's policies. 00032 this->validate_policies (); 00033 00034 this->validate_priority (priority); 00035 00036 // Lock access for the duration of this transaction. 00037 TAO_POA_GUARD_RETURN (0); 00038 00039 return this->create_reference_with_id_i (oid, intf, priority); 00040 } |
|
Definition at line 12 of file RT_POA.inl. References validate_policies(), and validate_priority().
00014 { 00015 // Check that this method can be used based on this POA's policies. 00016 this->validate_policies (); 00017 00018 this->validate_priority (priority); 00019 00020 // Lock access for the duration of this transaction. 00021 TAO_POA_GUARD_RETURN (0); 00022 00023 return this->create_reference_i (intf, priority); 00024 } |
|
Definition at line 568 of file RT_POA.cpp.
00570 {
00571 return this->TAO_Regular_POA::create_request_processing_policy (value);
00572 }
|
|
Definition at line 560 of file RT_POA.cpp.
00562 {
00563 return this->TAO_Regular_POA::create_servant_retention_policy (value);
00564 }
|
|
Definition at line 325 of file RT_POA.cpp. References TAO_Acceptor_Registry::begin(), TAO_Acceptor_Filter::encode_endpoints(), TAO_Acceptor_Registry::end(), endpoint_count(), TAO_Acceptor_Filter::fill_profile(), lane_required(), TAO_MProfile::profile_count(), TAO_MProfile::set(), TAO_MPROFILE_CREATION_ERROR, and thread_pool_. Referenced by key_to_stub_i().
00330 { 00331 int error = 0; 00332 00333 // Count the number of endpoints. 00334 size_t profile_count = 00335 this->endpoint_count (); 00336 00337 // Create a profile container and have acceptor registries populate 00338 // it with profiles as appropriate. 00339 TAO_MProfile mprofile (0); 00340 00341 // Allocate space for storing the profiles. There can never be more 00342 // profiles than there are endpoints. In some cases, there can be 00343 // less profiles than endpoints. 00344 int result = 00345 mprofile.set (static_cast <CORBA::ULong> (profile_count)); 00346 if (result == -1) 00347 error = 1; 00348 00349 TAO_Thread_Lane **lanes = 00350 this->thread_pool_->lanes (); 00351 00352 // Leave it to the filter to decide which acceptors/in which order 00353 // go into the mprofile. 00354 for (CORBA::ULong i = 0; 00355 i != this->thread_pool_->number_of_lanes () && 00356 !error; 00357 ++i) 00358 { 00359 if (this->lane_required (lanes[i], 00360 priority_bands)) 00361 { 00362 TAO_Acceptor_Registry &acceptor_registry = 00363 lanes[i]->resources ().acceptor_registry (); 00364 00365 result = 00366 filter->fill_profile (object_key, 00367 mprofile, 00368 acceptor_registry.begin (), 00369 acceptor_registry.end (), 00370 lanes[i]->lane_priority ()); 00371 if (result == -1) 00372 error = 1; 00373 } 00374 } 00375 00376 if (!error) 00377 result = filter->encode_endpoints (mprofile); 00378 if (result == -1) 00379 error = 1; 00380 00381 if (error) 00382 throw ::CORBA::INTERNAL ( 00383 CORBA::SystemException::_tao_minor_code ( 00384 TAO_MPROFILE_CREATION_ERROR, 00385 0), 00386 CORBA::COMPLETED_NO); 00387 00388 // Make sure we have at least one profile. <mp> may end up being 00389 // empty if none of the acceptor endpoints have the right priority 00390 // for this object, for example. 00391 if (mprofile.profile_count () == 0) 00392 throw ::CORBA::BAD_PARAM ( 00393 CORBA::SystemException::_tao_minor_code ( 00394 TAO_MPROFILE_CREATION_ERROR, 00395 0), 00396 CORBA::COMPLETED_NO); 00397 00398 return 00399 this->orb_core_.create_stub_object (mprofile, type_id, policy_list); 00400 } |
|
Definition at line 519 of file RT_POA.cpp.
00520 {
00521 return this->TAO_Regular_POA::create_thread_policy (value);
00522 }
|
|
Definition at line 657 of file RT_POA.cpp.
00658 { 00659 this->TAO_Regular_POA::deactivate_object (oid); 00660 } |
|
Definition at line 509 of file RT_POA.cpp.
00511 { 00512 this->TAO_Regular_POA::destroy (etherealize_objects, wait_for_completion); 00513 } |
|
Definition at line 403 of file RT_POA.cpp. References thread_pool_. Referenced by create_stub_object().
00404 { 00405 size_t profile_count = 0; 00406 00407 TAO_Thread_Lane **lanes = 00408 this->thread_pool_->lanes (); 00409 00410 for (CORBA::ULong i = 0; 00411 i != this->thread_pool_->number_of_lanes (); 00412 ++i) 00413 profile_count += 00414 lanes[i]->resources ().acceptor_registry ().endpoint_count (); 00415 00416 return profile_count; 00417 } |
|
Definition at line 503 of file RT_POA.cpp.
00504 {
00505 return this->TAO_Regular_POA::find_POA (adapter_name, activate_it);
00506 }
|
|
Definition at line 628 of file RT_POA.cpp.
00629 {
00630 return this->TAO_Regular_POA::get_servant ();
00631 }
|
|
Definition at line 616 of file RT_POA.cpp.
00617 {
00618 return this->TAO_Regular_POA::get_servant_manager ();
00619 }
|
|
Definition at line 712 of file RT_POA.cpp.
00713 {
00714 return this->TAO_Regular_POA::id ();
00715 }
|
|
Definition at line 706 of file RT_POA.cpp.
00707 {
00708 return this->TAO_Regular_POA::id_to_reference (oid);
00709 }
|
|
Definition at line 700 of file RT_POA.cpp.
00701 {
00702 return this->TAO_Regular_POA::id_to_servant (oid);
00703 }
|
|
Definition at line 222 of file RT_POA.cpp. References TAO_Thread_Lane_Resources::acceptor_registry(), ACE_ASSERT, client_exposed_policies(), create_stub_object(), TAO_Thread_Lane_Resources_Manager::default_lane_resources(), TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION, TAO_CACHED_POLICY_RT_SERVER_PROTOCOL, and thread_pool_.
00225 { 00226 // Client exposed policies. 00227 CORBA::PolicyList_var client_exposed_policies = 00228 this->client_exposed_policies (priority); 00229 00230 // Server protocol policy. 00231 CORBA::Policy_var protocol = 00232 this->policies ().get_cached_policy (TAO_CACHED_POLICY_RT_SERVER_PROTOCOL); 00233 00234 RTCORBA::ServerProtocolPolicy_var server_protocol_policy = 00235 RTCORBA::ServerProtocolPolicy::_narrow (protocol.in ()); 00236 00237 TAO_ServerProtocolPolicy *server_protocol = 00238 dynamic_cast <TAO_ServerProtocolPolicy *> (server_protocol_policy.in ()); 00239 00240 // Filter for server protocol. 00241 TAO_Server_Protocol_Acceptor_Filter filter (server_protocol->protocols_rep ()); 00242 00243 // If this POA is using the default thread pool or a thread pool 00244 // without lanes, create the IOR with the acceptors in the thread 00245 // pool. 00246 if (this->thread_pool_ == 0 || 00247 !this->thread_pool_->with_lanes ()) 00248 { 00249 TAO_Acceptor_Registry *acceptor_registry = 0; 00250 00251 if (this->thread_pool_ == 0) 00252 { 00253 TAO_Thread_Lane_Resources_Manager &thread_lane_resources_manager = 00254 this->orb_core_.thread_lane_resources_manager (); 00255 00256 TAO_Thread_Lane_Resources &resources = 00257 thread_lane_resources_manager.default_lane_resources (); 00258 00259 acceptor_registry = &resources.acceptor_registry (); 00260 } 00261 else 00262 { 00263 TAO_Thread_Lane **lanes = this->thread_pool_->lanes (); 00264 00265 TAO_Thread_Lane_Resources &resources = lanes[0]->resources (); 00266 00267 acceptor_registry = &resources.acceptor_registry (); 00268 } 00269 00270 return 00271 this->TAO_Regular_POA::create_stub_object (object_key, 00272 type_id, 00273 client_exposed_policies._retn (), 00274 &filter, 00275 *acceptor_registry); 00276 } 00277 00278 // If this POA has the SERVER_DECLARED policy, create the IOR with 00279 // the acceptors in the only thread lane that matches the priority 00280 // of the object. 00281 if (this->cached_policies_.priority_model () == 00282 TAO::Portable_Server::Cached_Policies::SERVER_DECLARED) 00283 { 00284 TAO_Thread_Lane **lanes = 00285 this->thread_pool_->lanes (); 00286 00287 for (CORBA::ULong i = 0; 00288 i != this->thread_pool_->number_of_lanes (); 00289 ++i) 00290 { 00291 if (lanes[i]->lane_priority () == priority) 00292 return this->TAO_Regular_POA::create_stub_object (object_key, 00293 type_id, 00294 client_exposed_policies._retn (), 00295 &filter, 00296 lanes[i]->resources ().acceptor_registry () 00297 ); 00298 } 00299 00300 ACE_ASSERT (0); 00301 } 00302 00303 // If this POA has the CLIENT_PROPAGATED policy, create the IOR with 00304 // the acceptors in the thread lanes that matches the bands in this 00305 // POA. If there are no bands, all the thread lanes are used. 00306 CORBA::Policy_var bands = 00307 this->policies ().get_cached_policy ( 00308 TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION 00309 ); 00310 00311 RTCORBA::PriorityBandedConnectionPolicy_var priority_bands 00312 = RTCORBA::PriorityBandedConnectionPolicy::_narrow (bands.in ()); 00313 00314 TAO_PriorityBandedConnectionPolicy *priority_bands_i = 00315 dynamic_cast <TAO_PriorityBandedConnectionPolicy *> (priority_bands.in ()); 00316 00317 return this->create_stub_object (object_key, 00318 type_id, 00319 client_exposed_policies._retn (), 00320 &filter, 00321 priority_bands_i); 00322 } |
|
Definition at line 420 of file RT_POA.cpp. Referenced by create_stub_object().
00422 { 00423 if (priority_bands == 0) 00424 return 1; 00425 00426 RTCORBA::PriorityBands &bands = 00427 priority_bands->priority_bands_rep (); 00428 00429 for (CORBA::ULong i = 0; 00430 i < bands.length (); 00431 ++i) 00432 { 00433 if (bands[i].low <= lane->lane_priority () && 00434 bands[i].high >= lane->lane_priority ()) 00435 return 1; 00436 } 00437 00438 return 0; 00439 } |
|
Template method for creating new POA's of this type.
Definition at line 67 of file RT_POA.cpp. References ACE_NEW_THROW_EX.
00075 { 00076 TAO_RT_POA *poa = 0; 00077 00078 ACE_NEW_THROW_EX (poa, 00079 TAO_RT_POA (name, 00080 poa_manager, 00081 policies, 00082 parent, 00083 lock, 00084 thread_lock, 00085 orb_core, 00086 object_adapter 00087 ), 00088 CORBA::NO_MEMORY ()); 00089 00090 return poa; 00091 } |
|
Parse the policy list for RT policies and update our cached policy instance. Definition at line 94 of file RT_POA.cpp. References TAO_POA_RT_Policy_Validator::extract_thread_pool(), CORBA::is_nil(), TAO_CACHED_POLICY_PRIORITY_MODEL, and thread_pool_.
00095 { 00096 { 00097 CORBA::Policy_var policy = 00098 policies.get_cached_policy (TAO_CACHED_POLICY_PRIORITY_MODEL); 00099 00100 RTCORBA::PriorityModelPolicy_var priority_model = 00101 RTCORBA::PriorityModelPolicy::_narrow (policy.in ()); 00102 00103 if (!CORBA::is_nil (priority_model.in ())) 00104 { 00105 RTCORBA::PriorityModel rt_priority_model = 00106 priority_model->priority_model (); 00107 00108 this->cached_policies_.priority_model ( 00109 TAO::Portable_Server::Cached_Policies::PriorityModel (rt_priority_model)); 00110 00111 RTCORBA::Priority priority = 00112 priority_model->server_priority (); 00113 00114 this->cached_policies_.server_priority (priority); 00115 } 00116 } 00117 00118 this->thread_pool_ = 00119 TAO_POA_RT_Policy_Validator::extract_thread_pool (this->orb_core_, 00120 policies.policies ()); 00121 } |
|
Definition at line 694 of file RT_POA.cpp.
00695 {
00696 return this->TAO_Regular_POA::reference_to_id (reference);
00697 }
|
|
Definition at line 688 of file RT_POA.cpp.
00689 {
00690 return this->TAO_Regular_POA::reference_to_servant (reference);
00691 }
|
|
Definition at line 676 of file RT_POA.cpp.
00677 {
00678 return this->TAO_Regular_POA::servant_to_id (p_servant);
00679 }
|
|
Definition at line 682 of file RT_POA.cpp.
00683 {
00684 return this->TAO_Regular_POA::servant_to_reference (p_servant);
00685 }
|
|
Definition at line 634 of file RT_POA.cpp.
00635 { 00636 this->TAO_Regular_POA::set_servant (servant); 00637 } |
|
Definition at line 622 of file RT_POA.cpp.
00623 { 00624 this->TAO_Regular_POA::set_servant_manager (imgr); 00625 } |
|
Definition at line 610 of file RT_POA.cpp.
00611 { 00612 this->TAO_Regular_POA::the_activator (adapter_activator); 00613 } |
|
Definition at line 604 of file RT_POA.cpp.
00605 {
00606 return this->TAO_Regular_POA::the_activator ();;
00607 }
|
|
Definition at line 589 of file RT_POA.cpp.
00590 {
00591 return this->TAO_Regular_POA::the_children ();
00592 }
|
|
Definition at line 577 of file RT_POA.cpp.
00578 {
00579 return this->TAO_Regular_POA::the_name ();
00580 }
|
|
Definition at line 583 of file RT_POA.cpp.
00584 {
00585 return this->TAO_Regular_POA::the_parent ();
00586 }
|
|
Definition at line 595 of file RT_POA.cpp.
00596 {
00597 return this->TAO_Regular_POA::the_POAManager ();
00598 }
|
|
Definition at line 104 of file RT_POA.inl. References thread_pool_.
00105 { 00106 return this->thread_pool_; 00107 } |
|
Definition at line 192 of file RT_POA.cpp. Referenced by activate_object_with_id_and_priority(), activate_object_with_priority(), create_reference_with_id_and_priority(), and create_reference_with_priority().
00193 { 00194 // For each of the above operations, if the POA supports the 00195 // IMPLICIT_ACTIVATION option for the ImplicitActivationPolicy then 00196 // the ORB shall raise a WrongPolicy user exception. This relieves 00197 // an ORB implementation of the need to retrieve the target object's 00198 // priority from "somewhere" when a request arrives for an inactive 00199 // object. 00200 if (this->cached_policies_.implicit_activation () == 00201 PortableServer::IMPLICIT_ACTIVATION) 00202 { 00203 throw PortableServer::POA::WrongPolicy (); 00204 } 00205 00206 // For each of the above operations, if the POA does not support the 00207 // SERVER_DECLARED option for the PriorityModelPolicy then the ORB 00208 // shall raise a WrongPolicy user exception. 00209 if (this->cached_policies_.priority_model () != 00210 TAO::Portable_Server::Cached_Policies::SERVER_DECLARED) 00211 { 00212 throw PortableServer::POA::WrongPolicy (); 00213 } 00214 00215 // In all other respects the semantics of the corresponding 00216 // (i.e. without the name extensions "_with_priority" and 00217 // "_and_priority") PortableServer::POA operations shall be 00218 // observed. 00219 } |
|
Definition at line 124 of file RT_POA.cpp. References TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION, and thread_pool_. Referenced by activate_object_with_id_and_priority(), activate_object_with_priority(), create_reference_with_id_and_priority(), and create_reference_with_priority().
00125 { 00126 if (priority < RTCORBA::minPriority 00127 // The line below will always be false unless the value of 00128 // RTCORBA::maxPriority, which is now assigned the value of 00129 // 32767, is changed in RTCORBA.pidl. 00130 // || priority > RTCORBA::maxPriority 00131 ) 00132 { 00133 throw ::CORBA::BAD_PARAM (); 00134 } 00135 00136 // If this POA is using a thread pool with lanes, make sure the 00137 // priority matches one of the thread lanes. Note that in this 00138 // case, bands do not matter since matching the lanes priority is a 00139 // stricter condition than meeting the band ranges. In addition, 00140 // when the POA was created, the bands had to match the lanes. 00141 if (this->thread_pool_ != 0 && this->thread_pool_->with_lanes ()) 00142 { 00143 TAO_Thread_Lane **lanes = this->thread_pool_->lanes (); 00144 00145 for (CORBA::ULong i = 0; 00146 i != this->thread_pool_->number_of_lanes (); 00147 ++i) 00148 { 00149 if (lanes[i]->lane_priority () == priority) 00150 return; 00151 } 00152 00153 throw ::CORBA::BAD_PARAM (); 00154 } 00155 else 00156 // Else we are dealing with a thread pool without lanes. 00157 { 00158 // Check if we have bands. 00159 CORBA::Policy_var bands = 00160 this->policies ().get_cached_policy ( 00161 TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION); 00162 00163 RTCORBA::PriorityBandedConnectionPolicy_var priority_bands 00164 = RTCORBA::PriorityBandedConnectionPolicy::_narrow (bands.in ()); 00165 00166 TAO_PriorityBandedConnectionPolicy *priority_bands_i = 00167 dynamic_cast <TAO_PriorityBandedConnectionPolicy *> 00168 (priority_bands.in ()); 00169 00170 if (priority_bands_i) 00171 { 00172 // If we do have bands, make sure that the priority is 00173 // matching one of the bands. 00174 RTCORBA::PriorityBands &bands = 00175 priority_bands_i->priority_bands_rep (); 00176 00177 for (CORBA::ULong i = 0; 00178 i < bands.length (); 00179 ++i) 00180 { 00181 if (bands[i].low <= priority && 00182 bands[i].high >= priority) 00183 return; 00184 } 00185 00186 throw ::CORBA::BAD_PARAM (); 00187 } 00188 } 00189 } |
|
Definition at line 223 of file RT_POA.h. Referenced by create_stub_object(), endpoint_count(), key_to_stub_i(), parse_rt_policies(), thread_pool(), and validate_priority(). |