#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) throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
CORBA::Object_ptr | create_reference_with_id_and_priority (const PortableServer::ObjectId &oid, const char *intf, RTCORBA::Priority priority) throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
PortableServer::ObjectId * | activate_object_with_priority (PortableServer::Servant p_servant, RTCORBA::Priority priority) throw (CORBA::SystemException, PortableServer::POA::ServantAlreadyActive, PortableServer::POA::WrongPolicy) |
void | activate_object_with_id_and_priority (const PortableServer::ObjectId &oid, PortableServer::Servant p_servant, RTCORBA::Priority priority) throw (CORBA::SystemException, PortableServer::POA::ServantAlreadyActive, PortableServer::POA::ObjectAlreadyActive, PortableServer::POA::WrongPolicy) |
PortableServer::POA_ptr | create_POA (const char *adapter_name, PortableServer::POAManager_ptr poa_manager, const CORBA::PolicyList &policies) throw (CORBA::SystemException, PortableServer::POA::AdapterAlreadyExists, PortableServer::POA::InvalidPolicy) |
PortableServer::POA_ptr | find_POA (const char *adapter_name, CORBA::Boolean activate_it) throw (CORBA::SystemException, PortableServer::POA::AdapterNonExistent) |
void | destroy (CORBA::Boolean etherealize_objects, CORBA::Boolean wait_for_completion) throw (CORBA::SystemException) |
PortableServer::ThreadPolicy_ptr | create_thread_policy (PortableServer::ThreadPolicyValue value) throw (CORBA::SystemException) |
PortableServer::LifespanPolicy_ptr | create_lifespan_policy (PortableServer::LifespanPolicyValue value) throw (CORBA::SystemException) |
PortableServer::IdUniquenessPolicy_ptr | create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value) throw (CORBA::SystemException) |
PortableServer::IdAssignmentPolicy_ptr | create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value) throw (CORBA::SystemException) |
PortableServer::ImplicitActivationPolicy_ptr | create_implicit_activation_policy (PortableServer::ImplicitActivationPolicyValue value) throw (CORBA::SystemException) |
PortableServer::ServantRetentionPolicy_ptr | create_servant_retention_policy (PortableServer::ServantRetentionPolicyValue value) throw (CORBA::SystemException) |
PortableServer::RequestProcessingPolicy_ptr | create_request_processing_policy (PortableServer::RequestProcessingPolicyValue value) throw (CORBA::SystemException) |
char * | the_name () throw (CORBA::SystemException) |
PortableServer::POA_ptr | the_parent () throw (CORBA::SystemException) |
PortableServer::POAList * | the_children () throw (CORBA::SystemException) |
PortableServer::POAManager_ptr | the_POAManager () throw (CORBA::SystemException) |
PortableServer::AdapterActivator_ptr | the_activator () throw (CORBA::SystemException) |
void | the_activator (PortableServer::AdapterActivator_ptr adapter_activator) throw (CORBA::SystemException) |
PortableServer::ServantManager_ptr | get_servant_manager () throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
void | set_servant_manager (PortableServer::ServantManager_ptr imgr) throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
PortableServer::Servant | get_servant () throw (CORBA::SystemException, PortableServer::POA::NoServant, PortableServer::POA::WrongPolicy) |
void | set_servant (PortableServer::Servant servant) throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
PortableServer::ObjectId * | activate_object (PortableServer::Servant p_servant) throw (CORBA::SystemException, PortableServer::POA::ServantAlreadyActive, PortableServer::POA::WrongPolicy) |
void | activate_object_with_id (const PortableServer::ObjectId &id, PortableServer::Servant p_servant) throw (CORBA::SystemException, PortableServer::POA::ServantAlreadyActive, PortableServer::POA::ObjectAlreadyActive, PortableServer::POA::WrongPolicy) |
void | deactivate_object (const PortableServer::ObjectId &oid) throw (CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy) |
CORBA::Object_ptr | create_reference (const char *intf) throw (CORBA::SystemException, PortableServer::POA::WrongPolicy) |
CORBA::Object_ptr | create_reference_with_id (const PortableServer::ObjectId &oid, const char *intf) throw (CORBA::SystemException) |
PortableServer::ObjectId * | servant_to_id (PortableServer::Servant p_servant) throw (CORBA::SystemException, PortableServer::POA::ServantNotActive, PortableServer::POA::WrongPolicy) |
CORBA::Object_ptr | servant_to_reference (PortableServer::Servant p_servant) throw (CORBA::SystemException, PortableServer::POA::ServantNotActive, PortableServer::POA::WrongPolicy) |
PortableServer::Servant | reference_to_servant (CORBA::Object_ptr reference) throw (CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongAdapter, PortableServer::POA::WrongPolicy) |
PortableServer::ObjectId * | reference_to_id (CORBA::Object_ptr reference) throw (CORBA::SystemException, PortableServer::POA::WrongAdapter, PortableServer::POA::WrongPolicy) |
PortableServer::Servant | id_to_servant (const PortableServer::ObjectId &oid) throw (CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy) |
CORBA::Object_ptr | id_to_reference (const PortableServer::ObjectId &oid) throw (CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy) |
CORBA::OctetSeq * | id () throw (CORBA::SystemException) |
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 | 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 68 of file RT_POA.cpp.
00069 { 00070 } |
|
Definition at line 796 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00801 { 00802 PortableServer::ObjectId *object_id = 00803 this->TAO_Regular_POA::activate_object (p_servant 00804 ACE_ENV_ARG_PARAMETER); 00805 ACE_CHECK_RETURN (object_id); 00806 return object_id; 00807 } |
|
Definition at line 810 of file RT_POA.cpp. References ACE_CHECK, and ACE_ENV_ARG_PARAMETER.
00817 { 00818 this->TAO_Regular_POA::activate_object_with_id (id, 00819 p_servant 00820 ACE_ENV_ARG_PARAMETER); 00821 ACE_CHECK; 00822 } |
|
Definition at line 98 of file RT_POA.i. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, and ACE_ENV_SINGLE_ARG_PARAMETER.
00106 { 00107 // Check that this method can be used based on this POA's policies. 00108 this->validate_policies (ACE_ENV_SINGLE_ARG_PARAMETER); 00109 ACE_CHECK; 00110 00111 this->validate_priority (priority ACE_ENV_ARG_PARAMETER); 00112 ACE_CHECK; 00113 00114 while (1) 00115 { 00116 int wait_occurred_restart_call = 0; 00117 00118 // Lock access for the duration of this transaction. 00119 TAO_POA_GUARD; 00120 00121 this->activate_object_with_id_i (oid, 00122 servant, 00123 priority, 00124 wait_occurred_restart_call 00125 ACE_ENV_ARG_PARAMETER); 00126 ACE_CHECK; 00127 00128 // If we ended up waiting on a condition variable, the POA state 00129 // may have changed while we are waiting. Therefore, we need to 00130 // restart this call. 00131 if (wait_occurred_restart_call) 00132 continue; 00133 else 00134 return; 00135 } 00136 } |
|
Definition at line 59 of file RT_POA.i. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, and ACE_ENV_SINGLE_ARG_PARAMETER.
00065 { 00066 // Check that this method can be used based on this POA's policies. 00067 this->validate_policies (ACE_ENV_SINGLE_ARG_PARAMETER); 00068 ACE_CHECK_RETURN (0); 00069 00070 this->validate_priority (priority ACE_ENV_ARG_PARAMETER); 00071 ACE_CHECK_RETURN (0); 00072 00073 while (1) 00074 { 00075 int wait_occurred_restart_call = 0; 00076 00077 // Lock access for the duration of this transaction. 00078 TAO_POA_GUARD_RETURN (0); 00079 00080 PortableServer::ObjectId *result = 00081 this->activate_object_i (servant, 00082 priority, 00083 wait_occurred_restart_call 00084 ACE_ENV_ARG_PARAMETER); 00085 ACE_CHECK_RETURN (0); 00086 00087 // If we ended up waiting on a condition variable, the POA state 00088 // may have changed while we are waiting. Therefore, we need to 00089 // restart this call. 00090 if (wait_occurred_restart_call) 00091 continue; 00092 else 00093 return result; 00094 } 00095 } |
|
Definition at line 488 of file RT_POA.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_NEW_THROW_EX, client_exposed_policies(), and TAO_INVALID_PRIORITY. Referenced by client_exposed_policies(), and key_to_stub_i().
00490 { 00491 CORBA::PolicyList *client_exposed_policies = 0; 00492 ACE_NEW_THROW_EX (client_exposed_policies, 00493 CORBA::PolicyList (), 00494 CORBA::NO_MEMORY (TAO::VMCID, 00495 CORBA::COMPLETED_NO)); 00496 ACE_CHECK_RETURN (0); 00497 00498 CORBA::PolicyList_var safe_client_exposed_policies = client_exposed_policies; 00499 00500 // Add in all of the client exposed policies. 00501 this->policies_.add_client_exposed_fixed_policies (client_exposed_policies 00502 ACE_ENV_ARG_PARAMETER); 00503 ACE_CHECK_RETURN (0); 00504 00505 // Check if the priority model policy has been set, and if so, let 00506 // the client know about it. 00507 CORBA::Short poa_priority = 00508 this->cached_policies_.server_priority (); 00509 00510 if (poa_priority != TAO_INVALID_PRIORITY) 00511 { 00512 TAO::Portable_Server::Cached_Policies::PriorityModel priority_model = 00513 this->cached_policies_.priority_model (); 00514 00515 // If the priority model is client propagated, let the client 00516 // about the default server priority (the POA priority). If 00517 // the priority model is server declared, tell the client the 00518 // servant's priority. 00519 CORBA::Short priority; 00520 if (priority_model == TAO::Portable_Server::Cached_Policies::CLIENT_PROPAGATED) 00521 priority = poa_priority; 00522 else 00523 priority = object_priority; 00524 00525 const CORBA::ULong current_length = 00526 client_exposed_policies->length (); 00527 client_exposed_policies->length (current_length + 1); 00528 00529 TAO_PriorityModelPolicy *priority_model_policy; 00530 ACE_NEW_THROW_EX (priority_model_policy, 00531 TAO_PriorityModelPolicy (RTCORBA::PriorityModel (priority_model), 00532 priority), 00533 CORBA::NO_MEMORY (TAO::VMCID, 00534 CORBA::COMPLETED_NO)); 00535 ACE_CHECK_RETURN (0); 00536 00537 (*client_exposed_policies)[current_length] = priority_model_policy; 00538 } 00539 00540 return safe_client_exposed_policies._retn (); 00541 } |
|
Definition at line 631 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00634 { 00635 PortableServer::IdAssignmentPolicy_ptr policy = 00636 this->TAO_Regular_POA::create_id_assignment_policy (value 00637 ACE_ENV_ARG_PARAMETER); 00638 ACE_CHECK_RETURN (policy); 00639 return policy; 00640 } |
|
Definition at line 618 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00621 { 00622 PortableServer::IdUniquenessPolicy_ptr policy = 00623 this->TAO_Regular_POA::create_id_uniqueness_policy (value 00624 ACE_ENV_ARG_PARAMETER); 00625 ACE_CHECK_RETURN (policy); 00626 return policy; 00627 } |
|
Definition at line 646 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00649 { 00650 PortableServer::ImplicitActivationPolicy_ptr policy = 00651 this->TAO_Regular_POA::create_implicit_activation_policy (value 00652 ACE_ENV_ARG_PARAMETER); 00653 ACE_CHECK_RETURN (policy); 00654 return policy; 00655 } |
|
Definition at line 606 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00609 { 00610 PortableServer::LifespanPolicy_ptr policy = 00611 this->TAO_Regular_POA::create_lifespan_policy (value 00612 ACE_ENV_ARG_PARAMETER); 00613 ACE_CHECK_RETURN (policy); 00614 return policy; 00615 } |
|
Definition at line 546 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00553 { 00554 PortableServer::POA_ptr poa = this->TAO_Regular_POA::create_POA (adapter_name, 00555 poa_manager, 00556 policies 00557 ACE_ENV_ARG_PARAMETER); 00558 ACE_CHECK_RETURN (poa); 00559 return poa; 00560 } |
|
Definition at line 837 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00841 { 00842 CORBA::Object_ptr obj = 00843 this->TAO_Regular_POA::create_reference (intf 00844 ACE_ENV_ARG_PARAMETER); 00845 ACE_CHECK_RETURN (obj); 00846 return obj; 00847 } |
|
Definition at line 850 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00854 { 00855 CORBA::Object_ptr obj = 00856 this->TAO_Regular_POA::create_reference_with_id (oid, 00857 intf 00858 ACE_ENV_ARG_PARAMETER); 00859 ACE_CHECK_RETURN (obj); 00860 return obj; 00861 } |
|
Definition at line 35 of file RT_POA.i. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, and ACE_ENV_SINGLE_ARG_PARAMETER.
00041 { 00042 // Check that this method can be used based on this POA's policies. 00043 this->validate_policies (ACE_ENV_SINGLE_ARG_PARAMETER); 00044 ACE_CHECK_RETURN (CORBA::Object::_nil ()); 00045 00046 this->validate_priority (priority ACE_ENV_ARG_PARAMETER); 00047 ACE_CHECK_RETURN (CORBA::Object::_nil ()); 00048 00049 // Lock access for the duration of this transaction. 00050 TAO_POA_GUARD_RETURN (0); 00051 00052 return this->create_reference_with_id_i (oid, 00053 intf, 00054 priority 00055 ACE_ENV_ARG_PARAMETER); 00056 } |
|
Definition at line 13 of file RT_POA.i. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, and ACE_ENV_SINGLE_ARG_PARAMETER.
00018 { 00019 // Check that this method can be used based on this POA's policies. 00020 this->validate_policies (ACE_ENV_SINGLE_ARG_PARAMETER); 00021 ACE_CHECK_RETURN (CORBA::Object::_nil ()); 00022 00023 this->validate_priority (priority ACE_ENV_ARG_PARAMETER); 00024 ACE_CHECK_RETURN (CORBA::Object::_nil ()); 00025 00026 // Lock access for the duration of this transaction. 00027 TAO_POA_GUARD_RETURN (0); 00028 00029 return this->create_reference_i (intf, 00030 priority 00031 ACE_ENV_ARG_PARAMETER); 00032 } |
|
Definition at line 671 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00674 { 00675 PortableServer::RequestProcessingPolicy_ptr policy = 00676 this->TAO_Regular_POA::create_request_processing_policy (value 00677 ACE_ENV_ARG_PARAMETER); 00678 ACE_CHECK_RETURN (policy); 00679 return policy; 00680 } |
|
Definition at line 658 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00661 { 00662 PortableServer::ServantRetentionPolicy_ptr policy = 00663 this->TAO_Regular_POA::create_servant_retention_policy (value 00664 ACE_ENV_ARG_PARAMETER); 00665 ACE_CHECK_RETURN (policy); 00666 return policy; 00667 } |
|
Definition at line 365 of file RT_POA.cpp. References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, 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().
00371 { 00372 int error = 0; 00373 00374 // Count the number of endpoints. 00375 size_t profile_count = 00376 this->endpoint_count (); 00377 00378 // Create a profile container and have acceptor registries populate 00379 // it with profiles as appropriate. 00380 TAO_MProfile mprofile (0); 00381 00382 // Allocate space for storing the profiles. There can never be more 00383 // profiles than there are endpoints. In some cases, there can be 00384 // less profiles than endpoints. 00385 int result = 00386 mprofile.set (static_cast <CORBA::ULong> (profile_count)); 00387 if (result == -1) 00388 error = 1; 00389 00390 TAO_Thread_Lane **lanes = 00391 this->thread_pool_->lanes (); 00392 00393 // Leave it to the filter to decide which acceptors/in which order 00394 // go into the mprofile. 00395 for (CORBA::ULong i = 0; 00396 i != this->thread_pool_->number_of_lanes () && 00397 !error; 00398 ++i) 00399 { 00400 if (this->lane_required (lanes[i], 00401 priority_bands)) 00402 { 00403 TAO_Acceptor_Registry &acceptor_registry = 00404 lanes[i]->resources ().acceptor_registry (); 00405 00406 result = 00407 filter->fill_profile (object_key, 00408 mprofile, 00409 acceptor_registry.begin (), 00410 acceptor_registry.end (), 00411 lanes[i]->lane_priority ()); 00412 if (result == -1) 00413 error = 1; 00414 } 00415 } 00416 00417 if (!error) 00418 result = filter->encode_endpoints (mprofile); 00419 if (result == -1) 00420 error = 1; 00421 00422 if (error) 00423 ACE_THROW_RETURN (CORBA::INTERNAL ( 00424 CORBA::SystemException::_tao_minor_code ( 00425 TAO_MPROFILE_CREATION_ERROR, 00426 0), 00427 CORBA::COMPLETED_NO), 00428 0); 00429 00430 // Make sure we have at least one profile. <mp> may end up being 00431 // empty if none of the acceptor endpoints have the right priority 00432 // for this object, for example. 00433 if (mprofile.profile_count () == 0) 00434 ACE_THROW_RETURN (CORBA::BAD_PARAM ( 00435 CORBA::SystemException::_tao_minor_code ( 00436 TAO_MPROFILE_CREATION_ERROR, 00437 0), 00438 CORBA::COMPLETED_NO), 00439 0); 00440 00441 return 00442 this->orb_core_.create_stub_object (mprofile, 00443 type_id, 00444 policy_list 00445 ACE_ENV_ARG_PARAMETER); 00446 } |
|
Definition at line 592 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00595 { 00596 PortableServer::ThreadPolicy_ptr policy = 00597 this->TAO_Regular_POA::create_thread_policy (value 00598 ACE_ENV_ARG_PARAMETER); 00599 ACE_CHECK_RETURN (policy); 00600 return policy; 00601 } |
|
Definition at line 825 of file RT_POA.cpp. References ACE_CHECK, and ACE_ENV_ARG_PARAMETER.
00830 { 00831 this->TAO_Regular_POA::deactivate_object (oid 00832 ACE_ENV_ARG_PARAMETER); 00833 ACE_CHECK; 00834 } |
|
Definition at line 577 of file RT_POA.cpp. References ACE_CHECK, and ACE_ENV_ARG_PARAMETER.
00581 { 00582 this->TAO_Regular_POA::destroy (etherealize_objects, 00583 wait_for_completion 00584 ACE_ENV_ARG_PARAMETER); 00585 ACE_CHECK; 00586 } |
|
Definition at line 449 of file RT_POA.cpp. References thread_pool_. Referenced by create_stub_object().
00450 { 00451 size_t profile_count = 0; 00452 00453 TAO_Thread_Lane **lanes = 00454 this->thread_pool_->lanes (); 00455 00456 for (CORBA::ULong i = 0; 00457 i != this->thread_pool_->number_of_lanes (); 00458 ++i) 00459 profile_count += 00460 lanes[i]->resources ().acceptor_registry ().endpoint_count (); 00461 00462 return profile_count; 00463 } |
|
Definition at line 563 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00568 { 00569 PortableServer::POA_ptr poa = this->TAO_Regular_POA::find_POA (adapter_name, 00570 activate_it 00571 ACE_ENV_ARG_PARAMETER); 00572 ACE_CHECK_RETURN (poa); 00573 return poa; 00574 } |
|
Definition at line 771 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_SINGLE_ARG_PARAMETER.
00775 { 00776 PortableServer::Servant servant = 00777 this->TAO_Regular_POA::get_servant (ACE_ENV_SINGLE_ARG_PARAMETER); 00778 ACE_CHECK_RETURN (servant); 00779 return servant; 00780 } |
|
Definition at line 749 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_SINGLE_ARG_PARAMETER.
00752 { 00753 PortableServer::ServantManager_ptr servant_manager = 00754 this->TAO_Regular_POA::get_servant_manager (ACE_ENV_SINGLE_ARG_PARAMETER); 00755 ACE_CHECK_RETURN (servant_manager); 00756 return servant_manager; 00757 } |
|
Definition at line 950 of file RT_POA.cpp. References ACE_ENV_SINGLE_ARG_PARAMETER.
00952 {
00953 return this->TAO_Regular_POA::id (ACE_ENV_SINGLE_ARG_PARAMETER);
00954 }
|
|
Definition at line 936 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00941 { 00942 CORBA::Object_ptr obj = 00943 this->TAO_Regular_POA::id_to_reference (oid 00944 ACE_ENV_ARG_PARAMETER); 00945 ACE_CHECK_RETURN (obj); 00946 return obj; 00947 } |
|
Definition at line 922 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00927 { 00928 PortableServer::Servant servant = 00929 this->TAO_Regular_POA::id_to_servant (oid 00930 ACE_ENV_ARG_PARAMETER); 00931 ACE_CHECK_RETURN (servant); 00932 return servant; 00933 } |
|
Definition at line 246 of file RT_POA.cpp. References TAO_Thread_Lane_Resources::acceptor_registry(), ACE_ASSERT, ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, 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_.
00250 { 00251 // Client exposed policies. 00252 CORBA::PolicyList_var client_exposed_policies = 00253 this->client_exposed_policies (priority 00254 ACE_ENV_ARG_PARAMETER); 00255 ACE_CHECK_RETURN (0); 00256 00257 // Server protocol policy. 00258 CORBA::Policy_var protocol = 00259 this->policies ().get_cached_policy (TAO_CACHED_POLICY_RT_SERVER_PROTOCOL 00260 ACE_ENV_ARG_PARAMETER); 00261 ACE_CHECK_RETURN (0); 00262 00263 RTCORBA::ServerProtocolPolicy_var server_protocol_policy = 00264 RTCORBA::ServerProtocolPolicy::_narrow (protocol.in () 00265 ACE_ENV_ARG_PARAMETER); 00266 ACE_CHECK_RETURN (0); 00267 00268 TAO_ServerProtocolPolicy *server_protocol = 00269 dynamic_cast <TAO_ServerProtocolPolicy *> (server_protocol_policy.in ()); 00270 00271 // Filter for server protocol. 00272 TAO_Server_Protocol_Acceptor_Filter filter (server_protocol->protocols_rep ()); 00273 00274 // If this POA is using the default thread pool or a thread pool 00275 // without lanes, create the IOR with the acceptors in the thread 00276 // pool. 00277 if (this->thread_pool_ == 0 || 00278 !this->thread_pool_->with_lanes ()) 00279 { 00280 TAO_Acceptor_Registry *acceptor_registry = 0; 00281 00282 if (this->thread_pool_ == 0) 00283 { 00284 TAO_Thread_Lane_Resources_Manager &thread_lane_resources_manager = 00285 this->orb_core_.thread_lane_resources_manager (); 00286 00287 TAO_Thread_Lane_Resources &resources = 00288 thread_lane_resources_manager.default_lane_resources (); 00289 00290 acceptor_registry = 00291 &resources.acceptor_registry (); 00292 } 00293 else 00294 { 00295 TAO_Thread_Lane **lanes = 00296 this->thread_pool_->lanes (); 00297 00298 TAO_Thread_Lane_Resources &resources = 00299 lanes[0]->resources (); 00300 00301 acceptor_registry = 00302 &resources.acceptor_registry (); 00303 } 00304 00305 return 00306 this->TAO_Regular_POA::create_stub_object (object_key, 00307 type_id, 00308 client_exposed_policies._retn (), 00309 &filter, 00310 *acceptor_registry 00311 ACE_ENV_ARG_PARAMETER); 00312 } 00313 00314 // If this POA has the SERVER_DECLARED policy, create the IOR with 00315 // the acceptors in the only thread lane that matches the priority 00316 // of the object. 00317 if (this->cached_policies_.priority_model () == 00318 TAO::Portable_Server::Cached_Policies::SERVER_DECLARED) 00319 { 00320 TAO_Thread_Lane **lanes = 00321 this->thread_pool_->lanes (); 00322 00323 for (CORBA::ULong i = 0; 00324 i != this->thread_pool_->number_of_lanes (); 00325 ++i) 00326 { 00327 if (lanes[i]->lane_priority () == priority) 00328 return this->TAO_Regular_POA::create_stub_object (object_key, 00329 type_id, 00330 client_exposed_policies._retn (), 00331 &filter, 00332 lanes[i]->resources ().acceptor_registry () 00333 ACE_ENV_ARG_PARAMETER); 00334 } 00335 00336 ACE_ASSERT (0); 00337 } 00338 00339 // If this POA has the CLIENT_PROPAGATED policy, create the IOR with 00340 // the acceptors in the thread lanes that matches the bands in this 00341 // POA. If there are no bands, all the thread lanes are used. 00342 CORBA::Policy_var bands = 00343 this->policies ().get_cached_policy ( 00344 TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION 00345 ACE_ENV_ARG_PARAMETER); 00346 ACE_CHECK_RETURN (0); 00347 00348 RTCORBA::PriorityBandedConnectionPolicy_var priority_bands 00349 = RTCORBA::PriorityBandedConnectionPolicy::_narrow (bands.in () 00350 ACE_ENV_ARG_PARAMETER); 00351 ACE_CHECK_RETURN (0); 00352 00353 TAO_PriorityBandedConnectionPolicy *priority_bands_i = 00354 dynamic_cast <TAO_PriorityBandedConnectionPolicy *> (priority_bands.in ()); 00355 00356 return this->create_stub_object (object_key, 00357 type_id, 00358 client_exposed_policies._retn (), 00359 &filter, 00360 priority_bands_i 00361 ACE_ENV_ARG_PARAMETER); 00362 } |
|
Definition at line 466 of file RT_POA.cpp. Referenced by create_stub_object().
00468 { 00469 if (priority_bands == 0) 00470 return 1; 00471 00472 RTCORBA::PriorityBands &bands = 00473 priority_bands->priority_bands_rep (); 00474 00475 for (CORBA::ULong i = 0; 00476 i < bands.length (); 00477 ++i) 00478 { 00479 if (bands[i].low <= lane->lane_priority () && 00480 bands[i].high >= lane->lane_priority ()) 00481 return 1; 00482 } 00483 00484 return 0; 00485 } |
|
Template method for creating new POA's of this type.
Definition at line 73 of file RT_POA.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, and ACE_NEW_THROW_EX.
00082 { 00083 TAO_RT_POA *poa = 0; 00084 00085 ACE_NEW_THROW_EX (poa, 00086 TAO_RT_POA (name, 00087 poa_manager, 00088 policies, 00089 parent, 00090 lock, 00091 thread_lock, 00092 orb_core, 00093 object_adapter 00094 ACE_ENV_ARG_PARAMETER), 00095 CORBA::NO_MEMORY ()); 00096 ACE_CHECK_RETURN (0); 00097 00098 return poa; 00099 } |
|
Parse the policy list for RT policies and update our cached policy instance. Definition at line 102 of file RT_POA.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, TAO_POA_RT_Policy_Validator::extract_thread_pool(), CORBA::is_nil(), TAO_CACHED_POLICY_PRIORITY_MODEL, and thread_pool_.
00104 { 00105 { 00106 CORBA::Policy_var policy = 00107 policies.get_cached_policy (TAO_CACHED_POLICY_PRIORITY_MODEL 00108 ACE_ENV_ARG_PARAMETER); 00109 ACE_CHECK; 00110 00111 RTCORBA::PriorityModelPolicy_var priority_model = 00112 RTCORBA::PriorityModelPolicy::_narrow (policy.in () 00113 ACE_ENV_ARG_PARAMETER); 00114 ACE_CHECK; 00115 00116 if (!CORBA::is_nil (priority_model.in ())) 00117 { 00118 RTCORBA::PriorityModel rt_priority_model = 00119 priority_model->priority_model (ACE_ENV_SINGLE_ARG_PARAMETER); 00120 ACE_CHECK; 00121 00122 this->cached_policies_.priority_model ( 00123 TAO::Portable_Server::Cached_Policies::PriorityModel (rt_priority_model)); 00124 00125 RTCORBA::Priority priority = 00126 priority_model->server_priority (ACE_ENV_SINGLE_ARG_PARAMETER); 00127 ACE_CHECK; 00128 00129 this->cached_policies_.server_priority (priority); 00130 } 00131 } 00132 00133 this->thread_pool_ = 00134 TAO_POA_RT_Policy_Validator::extract_thread_pool (this->orb_core_, 00135 policies.policies () 00136 ACE_ENV_ARG_PARAMETER); 00137 ACE_CHECK; 00138 } |
|
Definition at line 908 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00913 { 00914 PortableServer::ObjectId *object_id = 00915 this->TAO_Regular_POA::reference_to_id (reference 00916 ACE_ENV_ARG_PARAMETER); 00917 ACE_CHECK_RETURN (object_id); 00918 return object_id; 00919 } |
|
Definition at line 893 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00899 { 00900 PortableServer::Servant servant = 00901 this->TAO_Regular_POA::reference_to_servant (reference 00902 ACE_ENV_ARG_PARAMETER); 00903 ACE_CHECK_RETURN (servant); 00904 return servant; 00905 } |
|
Definition at line 864 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00869 { 00870 PortableServer::ObjectId *object_id = 00871 this->TAO_Regular_POA::servant_to_id (p_servant 00872 ACE_ENV_ARG_PARAMETER); 00873 ACE_CHECK_RETURN (object_id); 00874 return object_id; 00875 } |
|
Definition at line 878 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_ARG_PARAMETER.
00883 { 00884 CORBA::Object_ptr obj = 00885 this->TAO_Regular_POA::servant_to_reference (p_servant 00886 ACE_ENV_ARG_PARAMETER); 00887 ACE_CHECK_RETURN (obj); 00888 return obj; 00889 } |
|
Definition at line 783 of file RT_POA.cpp. References ACE_CHECK, and ACE_ENV_ARG_PARAMETER.
00787 { 00788 this->TAO_Regular_POA::set_servant (servant 00789 ACE_ENV_ARG_PARAMETER); 00790 ACE_CHECK; 00791 } |
|
Definition at line 760 of file RT_POA.cpp. References ACE_CHECK, and ACE_ENV_ARG_PARAMETER.
00764 { 00765 this->TAO_Regular_POA::set_servant_manager (imgr 00766 ACE_ENV_ARG_PARAMETER); 00767 ACE_CHECK; 00768 } |
|
Definition at line 739 of file RT_POA.cpp. References ACE_CHECK, and ACE_ENV_ARG_PARAMETER.
00742 { 00743 this->TAO_Regular_POA::the_activator (adapter_activator 00744 ACE_ENV_ARG_PARAMETER); 00745 ACE_CHECK; 00746 } |
|
Definition at line 729 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_SINGLE_ARG_PARAMETER.
00731 { 00732 PortableServer::AdapterActivator_ptr activator = 00733 this->TAO_Regular_POA::the_activator (ACE_ENV_SINGLE_ARG_PARAMETER); 00734 ACE_CHECK_RETURN (activator); 00735 return activator; 00736 } |
|
Definition at line 706 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_SINGLE_ARG_PARAMETER.
00708 { 00709 PortableServer::POAList *children = 00710 this->TAO_Regular_POA::the_children (ACE_ENV_SINGLE_ARG_PARAMETER); 00711 ACE_CHECK_RETURN (children); 00712 return children; 00713 } |
|
Definition at line 686 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_SINGLE_ARG_PARAMETER.
00688 { 00689 char * name = 00690 this->TAO_Regular_POA::the_name (ACE_ENV_SINGLE_ARG_PARAMETER); 00691 ACE_CHECK_RETURN (name); 00692 return name; 00693 } |
|
Definition at line 696 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_SINGLE_ARG_PARAMETER.
00698 { 00699 PortableServer::POA_ptr parent = 00700 this->TAO_Regular_POA::the_parent (ACE_ENV_SINGLE_ARG_PARAMETER); 00701 ACE_CHECK_RETURN (parent); 00702 return parent; 00703 } |
|
Definition at line 716 of file RT_POA.cpp. References ACE_CHECK_RETURN, and ACE_ENV_SINGLE_ARG_PARAMETER.
00718 { 00719 PortableServer::POAManager_ptr poa_manager = 00720 this->TAO_Regular_POA::the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); 00721 ACE_CHECK_RETURN (poa_manager); 00722 return poa_manager; 00723 } |
|
Definition at line 139 of file RT_POA.i. References thread_pool_.
00140 { 00141 return this->thread_pool_; 00142 } |
|
Definition at line 216 of file RT_POA.cpp. References ACE_THROW.
00217 { 00218 // For each of the above operations, if the POA supports the 00219 // IMPLICIT_ACTIVATION option for the ImplicitActivationPolicy then 00220 // the ORB shall raise a WrongPolicy user exception. This relieves 00221 // an ORB implementation of the need to retrieve the target object's 00222 // priority from "somewhere" when a request arrives for an inactive 00223 // object. 00224 if (this->cached_policies_.implicit_activation () == 00225 PortableServer::IMPLICIT_ACTIVATION) 00226 { 00227 ACE_THROW (PortableServer::POA::WrongPolicy ()); 00228 } 00229 00230 // For each of the above operations, if the POA does not support the 00231 // SERVER_DECLARED option for the PriorityModelPolicy then the ORB 00232 // shall raise a WrongPolicy user exception. 00233 if (this->cached_policies_.priority_model () != 00234 TAO::Portable_Server::Cached_Policies::SERVER_DECLARED) 00235 { 00236 ACE_THROW (PortableServer::POA::WrongPolicy ()); 00237 } 00238 00239 // In all other respects the semantics of the corresponding 00240 // (i.e. without the name extensions "_with_priority" and 00241 // "_and_priority") PortableServer::POA operations shall be 00242 // observed. 00243 } |
|
Definition at line 141 of file RT_POA.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_THROW, TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION, and thread_pool_.
00143 { 00144 if (priority < RTCORBA::minPriority 00145 // The line below will always be false unless the value of 00146 // RTCORBA::maxPriority, which is now assigned the value of 00147 // 32767, is changed in RTCORBA.pidl. 00148 // || priority > RTCORBA::maxPriority 00149 ) 00150 { 00151 ACE_THROW (CORBA::BAD_PARAM ()); 00152 } 00153 00154 // If this POA is using a thread pool with lanes, make sure the 00155 // priority matches one of the thread lanes. Note that in this 00156 // case, bands do not matter since matching the lanes priority is a 00157 // stricter condition than meeting the band ranges. In addition, 00158 // when the POA was created, the bands had to match the lanes. 00159 if (this->thread_pool_ != 0 && 00160 this->thread_pool_->with_lanes ()) 00161 { 00162 TAO_Thread_Lane **lanes = 00163 this->thread_pool_->lanes (); 00164 00165 for (CORBA::ULong i = 0; 00166 i != this->thread_pool_->number_of_lanes (); 00167 ++i) 00168 { 00169 if (lanes[i]->lane_priority () == priority) 00170 return; 00171 } 00172 00173 ACE_THROW (CORBA::BAD_PARAM ()); 00174 } 00175 else 00176 // Else we are dealing with a thread pool without lanes. 00177 { 00178 // Check if we have bands. 00179 CORBA::Policy_var bands = 00180 this->policies ().get_cached_policy ( 00181 TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION 00182 ACE_ENV_ARG_PARAMETER); 00183 ACE_CHECK; 00184 00185 RTCORBA::PriorityBandedConnectionPolicy_var priority_bands 00186 = RTCORBA::PriorityBandedConnectionPolicy::_narrow (bands.in () 00187 ACE_ENV_ARG_PARAMETER); 00188 ACE_CHECK; 00189 00190 TAO_PriorityBandedConnectionPolicy *priority_bands_i = 00191 dynamic_cast <TAO_PriorityBandedConnectionPolicy *> 00192 (priority_bands.in ()); 00193 00194 if (priority_bands_i) 00195 { 00196 // If we do have bands, make sure that the priority is 00197 // matching one of the bands. 00198 RTCORBA::PriorityBands &bands = 00199 priority_bands_i->priority_bands_rep (); 00200 00201 for (CORBA::ULong i = 0; 00202 i < bands.length (); 00203 ++i) 00204 { 00205 if (bands[i].low <= priority && 00206 bands[i].high >= priority) 00207 return; 00208 } 00209 00210 ACE_THROW (CORBA::BAD_PARAM ()); 00211 } 00212 } 00213 } |
|
Definition at line 312 of file RT_POA.h. Referenced by create_stub_object(), endpoint_count(), key_to_stub_i(), parse_rt_policies(), thread_pool(), and validate_priority(). |