#include <RT_Protocols_Hooks.h>
Inheritance diagram for TAO_RT_Protocols_Hooks:
|
Constructor.
Definition at line 31 of file RT_Protocols_Hooks.cpp.
|
|
Destructor.
Definition at line 38 of file RT_Protocols_Hooks.cpp.
00039 { 00040 } |
|
Implements TAO_Protocols_Hooks. Definition at line 611 of file RT_Protocols_Hooks.cpp. References RTCORBA::PriorityModelPolicy::_narrow(), ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_THROW, TAO_PriorityModelPolicy::get_priority_model(), TAO_Objref_Var_T< T >::in(), RTCORBA::PriorityModelPolicy_var, TAO_Service_Context::set_context(), and TAO_ENCAP_BYTE_ORDER. Referenced by rt_service_context().
00617 { 00618 00619 RTCORBA::PriorityModelPolicy_var model_policy_ptr = 00620 RTCORBA::PriorityModelPolicy::_narrow (model_policy 00621 ACE_ENV_ARG_PARAMETER); 00622 ACE_CHECK; 00623 00624 TAO_PriorityModelPolicy *priority_model = 00625 static_cast<TAO_PriorityModelPolicy *> (model_policy_ptr.in ()); 00626 00627 if (priority_model->get_priority_model () == RTCORBA::CLIENT_PROPAGATED) 00628 { 00629 // Encapsulate the priority of the current thread into 00630 // a service context. 00631 TAO_OutputCDR cdr; 00632 if ((cdr << ACE_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER) == 0) 00633 || (cdr << client_priority) == 0) 00634 { 00635 ACE_THROW (CORBA::MARSHAL ()); 00636 } 00637 00638 service_context.set_context (IOP::RTCorbaPriority, cdr); 00639 } 00640 } |
|
Definition at line 117 of file RT_Protocols_Hooks.cpp. References RTCORBA::ProtocolProperties::_duplicate(), RTCORBA::ClientProtocolPolicy::_narrow(), ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, RTCORBA::ClientProtocolPolicy_var, TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), TAO::unbounded_value_sequence< Protocol >::length(), and TAO_ClientProtocolPolicy::protocols_rep(). Referenced by client_protocol_properties_at_object_level(), and client_protocol_properties_at_orb_level().
00120 { 00121 if (CORBA::is_nil (policy)) 00122 return 0; 00123 00124 RTCORBA::ClientProtocolPolicy_var client_protocol_policy = 00125 RTCORBA::ClientProtocolPolicy::_narrow (policy 00126 ACE_ENV_ARG_PARAMETER); 00127 ACE_CHECK_RETURN (0); 00128 00129 if (CORBA::is_nil (client_protocol_policy.in ())) 00130 return 0; 00131 00132 TAO_ClientProtocolPolicy *client_protocols = 00133 dynamic_cast<TAO_ClientProtocolPolicy *> (client_protocol_policy.in ()); 00134 00135 if (client_protocols == 0) 00136 return 0; 00137 00138 // TAO_ClientProtocolPolicy 00139 RTCORBA::ProtocolList &protocols = 00140 client_protocols->protocols_rep (); 00141 00142 for (CORBA::ULong j = 0; j < protocols.length (); ++j) 00143 { 00144 if (protocols[j].protocol_type == protocol_tag) 00145 { 00146 return RTCORBA::ProtocolProperties::_duplicate (protocols[j].transport_protocol_properties.in ()); 00147 } 00148 } 00149 00150 return 0; 00151 } |
|
Definition at line 182 of file RT_Protocols_Hooks.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, client_protocol_properties(), and TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL. Referenced by set_client_network_priority().
00185 { 00186 CORBA::Policy_var policy = 00187 stub->get_cached_policy (TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL 00188 ACE_ENV_ARG_PARAMETER); 00189 ACE_CHECK_RETURN (0); 00190 00191 return this->client_protocol_properties (protocol_tag, 00192 policy.in () 00193 ACE_ENV_ARG_PARAMETER); 00194 } |
|
Definition at line 168 of file RT_Protocols_Hooks.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, client_protocol_properties(), TAO_ORB_Core::get_cached_policy(), and TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL.
00170 { 00171 CORBA::Policy_var policy = 00172 this->orb_core_->get_cached_policy (TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL 00173 ACE_ENV_ARG_PARAMETER); 00174 ACE_CHECK_RETURN (0); 00175 00176 return this->client_protocol_properties (protocol_tag, 00177 policy.in () 00178 ACE_ENV_ARG_PARAMETER); 00179 } |
|
Implements TAO_Protocols_Hooks. Definition at line 415 of file RT_Protocols_Hooks.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, client_protocol_properties_at_orb_level(), extract_protocol_properties(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), RTCORBA::ProtocolProperties_var, and TAO_TAG_SCIOP_PROFILE.
00417 { 00418 RTCORBA::ProtocolProperties_var from = 00419 this->client_protocol_properties_at_orb_level (TAO_TAG_SCIOP_PROFILE 00420 ACE_ENV_ARG_PARAMETER); 00421 ACE_CHECK; 00422 00423 if (!CORBA::is_nil (from.in ())) 00424 this->extract_protocol_properties (to, 00425 from.in () 00426 ACE_ENV_ARG_PARAMETER); 00427 } |
|
Implements TAO_Protocols_Hooks. Definition at line 366 of file RT_Protocols_Hooks.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, client_protocol_properties_at_orb_level(), extract_protocol_properties(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), RTCORBA::ProtocolProperties_var, and TAO_TAG_DIOP_PROFILE.
00368 { 00369 RTCORBA::ProtocolProperties_var from = 00370 this->client_protocol_properties_at_orb_level (TAO_TAG_DIOP_PROFILE 00371 ACE_ENV_ARG_PARAMETER); 00372 ACE_CHECK; 00373 00374 if (!CORBA::is_nil (from.in ())) 00375 this->extract_protocol_properties (to, 00376 from.in () 00377 ACE_ENV_ARG_PARAMETER); 00378 } |
|
Implements TAO_Protocols_Hooks. Definition at line 322 of file RT_Protocols_Hooks.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, client_protocol_properties_at_orb_level(), extract_protocol_properties(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), RTCORBA::ProtocolProperties_var, and TAO_TAG_SHMEM_PROFILE.
00324 { 00325 RTCORBA::ProtocolProperties_var from = 00326 this->client_protocol_properties_at_orb_level (TAO_TAG_SHMEM_PROFILE 00327 ACE_ENV_ARG_PARAMETER); 00328 ACE_CHECK; 00329 00330 if (!CORBA::is_nil (from.in ())) 00331 this->extract_protocol_properties (to, 00332 from.in () 00333 ACE_ENV_ARG_PARAMETER); 00334 } |
|
Implements TAO_Protocols_Hooks. Definition at line 276 of file RT_Protocols_Hooks.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, client_protocol_properties_at_orb_level(), extract_protocol_properties(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), RTCORBA::ProtocolProperties_var, and TAO_TAG_UIOP_PROFILE.
00278 { 00279 RTCORBA::ProtocolProperties_var from = 00280 this->client_protocol_properties_at_orb_level (TAO_TAG_UIOP_PROFILE 00281 ACE_ENV_ARG_PARAMETER); 00282 ACE_CHECK; 00283 00284 if (!CORBA::is_nil (from.in ())) 00285 this->extract_protocol_properties (to, 00286 from.in () 00287 ACE_ENV_ARG_PARAMETER); 00288 } |
|
Implements TAO_Protocols_Hooks. Definition at line 231 of file RT_Protocols_Hooks.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, extract_protocol_properties(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), and RTCORBA::ProtocolProperties_var. Referenced by client_protocol_properties_at_orb_level().
00233 { 00234 RTCORBA::ProtocolProperties_var from = 00235 this->client_protocol_properties_at_orb_level (IOP::TAG_INTERNET_IOP 00236 ACE_ENV_ARG_PARAMETER); 00237 ACE_CHECK; 00238 00239 if (!CORBA::is_nil (from.in ())) 00240 this->extract_protocol_properties (to, 00241 from.in () 00242 ACE_ENV_ARG_PARAMETER); 00243 } |
|
|
Definition at line 337 of file RT_Protocols_Hooks.cpp. References RTCORBA::UserDatagramProtocolProperties::_narrow(), ACE_CHECK, ACE_ENV_ARG_PARAMETER, TAO_DIOP_Protocol_Properties::enable_network_priority_, RTCORBA::ProtocolProperties_ptr, and RTCORBA::UserDatagramProtocolProperties_var.
00340 { 00341 RTCORBA::UserDatagramProtocolProperties_var protocol_properties = 00342 RTCORBA::UserDatagramProtocolProperties::_narrow (from 00343 ACE_ENV_ARG_PARAMETER); 00344 ACE_CHECK; 00345 00346 to.enable_network_priority_ = protocol_properties->enable_network_priority (); 00347 } |
|
Definition at line 291 of file RT_Protocols_Hooks.cpp. References RTCORBA::SharedMemoryProtocolProperties::_narrow(), ACE_CHECK, ACE_ENV_ARG_PARAMETER, TAO_SHMIOP_Protocol_Properties::mmap_filename_, TAO_SHMIOP_Protocol_Properties::mmap_lockname_, TAO_SHMIOP_Protocol_Properties::preallocate_buffer_size_, RTCORBA::ProtocolProperties_ptr, and RTCORBA::SharedMemoryProtocolProperties_var.
00294 { 00295 RTCORBA::SharedMemoryProtocolProperties_var protocol_properties = 00296 RTCORBA::SharedMemoryProtocolProperties::_narrow (from 00297 ACE_ENV_ARG_PARAMETER); 00298 ACE_CHECK; 00299 00300 to.preallocate_buffer_size_ = protocol_properties->preallocate_buffer_size (); 00301 to.mmap_filename_ = protocol_properties->mmap_filename (); 00302 to.mmap_lockname_ = protocol_properties->mmap_lockname (); 00303 } |
|
Definition at line 246 of file RT_Protocols_Hooks.cpp. References RTCORBA::UnixDomainProtocolProperties::_narrow(), ACE_CHECK, ACE_ENV_ARG_PARAMETER, RTCORBA::ProtocolProperties_ptr, TAO_UIOP_Protocol_Properties::recv_buffer_size_, TAO_UIOP_Protocol_Properties::send_buffer_size_, and RTCORBA::UnixDomainProtocolProperties_var.
00249 { 00250 RTCORBA::UnixDomainProtocolProperties_var protocol_properties = 00251 RTCORBA::UnixDomainProtocolProperties::_narrow (from 00252 ACE_ENV_ARG_PARAMETER); 00253 ACE_CHECK; 00254 00255 to.send_buffer_size_ = protocol_properties->send_buffer_size (); 00256 to.recv_buffer_size_ = protocol_properties->recv_buffer_size (); 00257 } |
|
|
Implements TAO_Protocols_Hooks. Definition at line 513 of file RT_Protocols_Hooks.cpp. References ACE_ANY_EXCEPTION, ACE_CATCHANY, ACE_CHECK_RETURN, ACE_DEBUG, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_ERROR, ACE_PRINT_EXCEPTION, ACE_TRY, ACE_TRY_CHECK, LM_DEBUG, LM_ERROR, network_mapping_manager_, and TAO_debug_level.
00514 { 00515 if (TAO_debug_level) 00516 ACE_DEBUG ((LM_DEBUG, 00517 "TAO_RT_Protocols_Hooks::get_dscp_codepoint\n")); 00518 00519 CORBA::Long codepoint = 0; 00520 00521 ACE_DECLARE_NEW_CORBA_ENV; 00522 ACE_TRY 00523 { 00524 // Make several invocation, changing the priority of this thread 00525 // for each. 00526 00527 RTCORBA::NetworkPriorityMapping *pm = 00528 this->network_mapping_manager_->mapping (); 00529 00530 const CORBA::Short priority = 00531 this->current_->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER); 00532 ACE_TRY_CHECK; 00533 00534 if (pm->to_network (priority, codepoint) == 0) 00535 { 00536 if (TAO_debug_level > 0) 00537 { 00538 ACE_ERROR ((LM_ERROR, 00539 "Cannot convert corba priority %d " 00540 "to network priority\n", 00541 priority)); 00542 } 00543 00544 return -1; 00545 } 00546 } 00547 ACE_CATCHANY 00548 { 00549 if (TAO_debug_level > 0) 00550 { 00551 ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, 00552 "TAO_RT_Protocols_Hooks::get_dscp_codepoint"); 00553 } 00554 00555 return -1; 00556 } 00557 ACE_ENDTRY; 00558 ACE_CHECK_RETURN (-1); 00559 00560 return codepoint; 00561 } |
|
Implements TAO_Protocols_Hooks. Definition at line 671 of file RT_Protocols_Hooks.cpp. References RTCORBA::PriorityBandedConnectionPolicy::_narrow(), TAO_Objref_Var_T< T >::in(), TAO::unbounded_value_sequence< PriorityBand >::length(), TAO_PriorityBandedConnectionPolicy::priority_bands_rep(), and RTCORBA::PriorityBandedConnectionPolicy_var.
00678 { 00679 RTCORBA::PriorityBandedConnectionPolicy_var bands_policy_ptr = 00680 RTCORBA::PriorityBandedConnectionPolicy::_narrow (bands_policy); 00681 00682 TAO_PriorityBandedConnectionPolicy *priority_bands_policy = 00683 static_cast<TAO_PriorityBandedConnectionPolicy *> (bands_policy_ptr.in ()); 00684 00685 // Find the band with the range covering our target priority. 00686 RTCORBA::PriorityBands &bands = 00687 priority_bands_policy->priority_bands_rep (); 00688 00689 for (CORBA::ULong i = 0; i < bands.length (); ++i) 00690 { 00691 if (bands[i].low <= priority && bands[i].high >= priority) 00692 { 00693 min_priority = bands[i].low; 00694 max_priority = bands[i].high; 00695 00696 in_range = 1; 00697 break; 00698 } 00699 } 00700 } |
|
Implements TAO_Protocols_Hooks. Definition at line 643 of file RT_Protocols_Hooks.cpp. References RTCORBA::PriorityModelPolicy::_narrow(), TAO_PriorityModelPolicy::get_priority_model(), TAO_Objref_Var_T< T >::in(), RTCORBA::PriorityModelPolicy_var, and TAO_PriorityModelPolicy::server_priority().
00648 { 00649 00650 RTCORBA::PriorityModelPolicy_var model_policy_ptr = 00651 RTCORBA::PriorityModelPolicy::_narrow (model_policy); 00652 00653 TAO_PriorityModelPolicy *priority_model_policy = 00654 static_cast<TAO_PriorityModelPolicy *> (model_policy_ptr.in ()); 00655 00656 if (priority_model_policy->get_priority_model () 00657 == RTCORBA::CLIENT_PROPAGATED) 00658 { 00659 is_client_propagated = 1; 00660 } 00661 00662 if (!is_client_propagated) 00663 { 00664 server_priority = priority_model_policy->server_priority (); 00665 } 00666 00667 return; 00668 } |
|
Accessor and modifier to the current thread priority, used to implement the RTCORBA::Current interface, but it is faster for some critical components. Implements TAO_Protocols_Hooks. Definition at line 747 of file RT_Protocols_Hooks.cpp. References ACE_CHECK_RETURN, ACE_DEBUG, ACE_ENV_ARG_PARAMETER, ACE_TEXT, get_thread_native_priority(), TAO_Priority_Mapping_Manager_var::in(), LM_DEBUG, TAO_Priority_Mapping_Manager::mapping(), mapping_manager_, and TAO_Priority_Mapping::to_CORBA(). Referenced by get_thread_CORBA_priority().
00752 { 00753 int result = 00754 this->get_thread_native_priority (native_priority 00755 ACE_ENV_ARG_PARAMETER); 00756 ACE_CHECK_RETURN (-1); 00757 00758 if (result == -1) 00759 { 00760 return result; 00761 } 00762 00763 TAO_Priority_Mapping *priority_mapping = 00764 this->mapping_manager_.in ()->mapping (); 00765 00766 if (priority_mapping->to_CORBA (native_priority, priority) == 0) 00767 { 00768 ACE_DEBUG ((LM_DEBUG, 00769 ACE_TEXT ("TAO (%P|%t) - ") 00770 ACE_TEXT ("RT_Protocols_Hooks::get_thread_priority: ") 00771 ACE_TEXT ("Priority_Mapping::to_CORBA\n"))); 00772 return -1; 00773 } 00774 00775 return 0; 00776 } |
|
Accessor and modifier to the current thread priority, used to implement the RTCORBA::Current interface, but it is faster for some critical components. Implements TAO_Protocols_Hooks. Definition at line 703 of file RT_Protocols_Hooks.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, and get_thread_CORBA_and_native_priority(). Referenced by rt_service_context().
00705 { 00706 CORBA::Short native_priority = 0; 00707 int const result = 00708 this->get_thread_CORBA_and_native_priority (priority, 00709 native_priority 00710 ACE_ENV_ARG_PARAMETER); 00711 ACE_CHECK_RETURN (-1); 00712 00713 if (result == -1) 00714 { 00715 return result; 00716 } 00717 00718 return 0; 00719 } |
|
Accessor and modifier to the current thread priority, used to implement the RTCORBA::Current interface, but it is faster for some critical components. Implements TAO_Protocols_Hooks. Definition at line 722 of file RT_Protocols_Hooks.cpp. References ACE_DEBUG, ACE_hthread_t, ACE_TEXT, ACE_Thread::getprio(), LM_DEBUG, ACE_Thread::self(), and CORBA::Short. Referenced by get_thread_CORBA_and_native_priority().
00726 { 00727 ACE_hthread_t current; 00728 ACE_Thread::self (current); 00729 00730 int priority; 00731 00732 if (ACE_Thread::getprio (current, priority) == -1) 00733 { 00734 ACE_DEBUG ((LM_DEBUG, 00735 ACE_TEXT ("TAO (%P|%t) - ") 00736 ACE_TEXT ("RT_Protocols_Hooks::get_thread_priority: ") 00737 ACE_TEXT (" ACE_Thread::get_prio\n"))); 00738 00739 return -1; 00740 } 00741 00742 native_priority = CORBA::Short (priority); 00743 return 0; 00744 } |
|
Initialize the protocols hooks instance.
Implements TAO_Protocols_Hooks. Definition at line 43 of file RT_Protocols_Hooks.cpp. References RTCORBA::Current::_narrow(), TAO_Network_Priority_Mapping_Manager::_narrow(), TAO_Priority_Mapping_Manager::_narrow(), ACE_CHECK, ACE_ENV_ARG_PARAMETER, mapping_manager_, network_mapping_manager_, TAO_ORB_Core::object_ref_table(), TAO_Object_Ref_Table::resolve_initial_reference(), TAO_OBJID_NETWORKPRIORITYMAPPINGMANAGER, TAO_OBJID_PRIORITYMAPPINGMANAGER, and TAO_OBJID_RTCURRENT.
00045 { 00046 this->orb_core_ = orb_core; 00047 00048 // Save a reference to the priority mapping manager. 00049 CORBA::Object_var obj = 00050 orb_core->object_ref_table ().resolve_initial_reference ( 00051 TAO_OBJID_PRIORITYMAPPINGMANAGER); 00052 00053 this->mapping_manager_ = 00054 TAO_Priority_Mapping_Manager::_narrow (obj.in () 00055 ACE_ENV_ARG_PARAMETER); 00056 ACE_CHECK; 00057 00058 // Save a reference to the priority mapping manager. 00059 CORBA::Object_var object = 00060 orb_core->object_ref_table ().resolve_initial_reference ( 00061 TAO_OBJID_NETWORKPRIORITYMAPPINGMANAGER); 00062 00063 this->network_mapping_manager_ = 00064 TAO_Network_Priority_Mapping_Manager::_narrow (object.in () 00065 ACE_ENV_ARG_PARAMETER); 00066 ACE_CHECK; 00067 00068 object = 00069 this->orb_core_->object_ref_table ().resolve_initial_reference ( 00070 TAO_OBJID_RTCURRENT); 00071 00072 this->current_ = 00073 RTCORBA::Current::_narrow (object.in () 00074 ACE_ENV_ARG_PARAMETER); 00075 ACE_CHECK; 00076 00077 } |
|
Implements TAO_Protocols_Hooks. Definition at line 564 of file RT_Protocols_Hooks.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_THROW, add_rt_service_context_hook(), TAO_RT_Stub::get_cached_policy(), get_thread_CORBA_priority(), CORBA::is_nil(), and TAO_CACHED_POLICY_PRIORITY_MODEL.
00570 { 00571 // If the restart flag is true, then this call for a 00572 // reinvocation. We need not prepare the Service Context List once 00573 // again. We can use the already existing one. 00574 if (!restart) 00575 { 00576 TAO_RT_Stub *rt_stub = 00577 dynamic_cast<TAO_RT_Stub *> (stub); 00578 00579 CORBA::Policy_var priority_model_policy = 00580 rt_stub->get_cached_policy (TAO_CACHED_POLICY_PRIORITY_MODEL 00581 ACE_ENV_ARG_PARAMETER); 00582 ACE_CHECK; 00583 00584 if (!CORBA::is_nil (priority_model_policy.in ())) 00585 { 00586 CORBA::Short client_priority; 00587 00588 int status = 00589 this->get_thread_CORBA_priority (client_priority 00590 ACE_ENV_ARG_PARAMETER); 00591 ACE_CHECK; 00592 00593 if (status == -1) 00594 ACE_THROW (CORBA::DATA_CONVERSION (1, CORBA::COMPLETED_NO)); 00595 00596 this->add_rt_service_context_hook (service_context, 00597 priority_model_policy.in (), 00598 client_priority 00599 ACE_ENV_ARG_PARAMETER); 00600 ACE_CHECK; 00601 } 00602 else 00603 { 00604 // The Object does not contain PriorityModel policy in its IOR. 00605 // We must be talking to a non-RT ORB. Do nothing. 00606 } 00607 } 00608 } |
|
Definition at line 80 of file RT_Protocols_Hooks.cpp. References RTCORBA::ProtocolProperties::_duplicate(), RTCORBA::ServerProtocolPolicy::_narrow(), ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), TAO::unbounded_value_sequence< Protocol >::length(), TAO_ServerProtocolPolicy::protocols_rep(), and RTCORBA::ServerProtocolPolicy_var. Referenced by server_protocol_properties_at_orb_level(), and set_server_network_priority().
00083 { 00084 if (CORBA::is_nil (policy)) 00085 return 0; 00086 00087 RTCORBA::ServerProtocolPolicy_var server_protocol_policy = 00088 RTCORBA::ServerProtocolPolicy::_narrow (policy 00089 ACE_ENV_ARG_PARAMETER); 00090 ACE_CHECK_RETURN (0); 00091 00092 if (CORBA::is_nil (server_protocol_policy.in ())) 00093 return 0; 00094 00095 TAO_ServerProtocolPolicy *server_protocols = 00096 dynamic_cast<TAO_ServerProtocolPolicy *> (server_protocol_policy.in ()); 00097 00098 if (server_protocols == 0) 00099 return 0; 00100 00101 // TAO_ServerProtocolPolicy 00102 RTCORBA::ProtocolList &protocols = 00103 server_protocols->protocols_rep (); 00104 00105 for (CORBA::ULong j = 0; j < protocols.length (); ++j) 00106 { 00107 if (protocols[j].protocol_type == protocol_tag) 00108 { 00109 return RTCORBA::ProtocolProperties::_duplicate (protocols[j].transport_protocol_properties.in ()); 00110 } 00111 } 00112 00113 return 0; 00114 } |
|
Definition at line 154 of file RT_Protocols_Hooks.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, TAO_ORB_Core::get_cached_policy(), server_protocol_properties(), and TAO_CACHED_POLICY_RT_SERVER_PROTOCOL.
00156 { 00157 CORBA::Policy_var policy = 00158 this->orb_core_->get_cached_policy (TAO_CACHED_POLICY_RT_SERVER_PROTOCOL 00159 ACE_ENV_ARG_PARAMETER); 00160 ACE_CHECK_RETURN (0); 00161 00162 return this->server_protocol_properties (protocol_tag, 00163 policy.in () 00164 ACE_ENV_ARG_PARAMETER); 00165 } |
|
Implements TAO_Protocols_Hooks. Definition at line 399 of file RT_Protocols_Hooks.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, extract_protocol_properties(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), RTCORBA::ProtocolProperties_var, server_protocol_properties_at_orb_level(), and TAO_TAG_SCIOP_PROFILE.
00401 { 00402 RTCORBA::ProtocolProperties_var from = 00403 this->server_protocol_properties_at_orb_level (TAO_TAG_SCIOP_PROFILE 00404 ACE_ENV_ARG_PARAMETER); 00405 ACE_CHECK; 00406 00407 if (!CORBA::is_nil (from.in ())) 00408 this->extract_protocol_properties (to, 00409 from.in () 00410 ACE_ENV_ARG_PARAMETER); 00411 ACE_CHECK; 00412 } |
|
Implements TAO_Protocols_Hooks. Definition at line 350 of file RT_Protocols_Hooks.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, extract_protocol_properties(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), RTCORBA::ProtocolProperties_var, server_protocol_properties_at_orb_level(), and TAO_TAG_DIOP_PROFILE.
00352 { 00353 RTCORBA::ProtocolProperties_var from = 00354 this->server_protocol_properties_at_orb_level (TAO_TAG_DIOP_PROFILE 00355 ACE_ENV_ARG_PARAMETER); 00356 ACE_CHECK; 00357 00358 if (!CORBA::is_nil (from.in ())) 00359 this->extract_protocol_properties (to, 00360 from.in () 00361 ACE_ENV_ARG_PARAMETER); 00362 ACE_CHECK; 00363 } |
|
Implements TAO_Protocols_Hooks. Definition at line 306 of file RT_Protocols_Hooks.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, extract_protocol_properties(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), RTCORBA::ProtocolProperties_var, server_protocol_properties_at_orb_level(), and TAO_TAG_SHMEM_PROFILE.
00308 { 00309 RTCORBA::ProtocolProperties_var from = 00310 this->server_protocol_properties_at_orb_level (TAO_TAG_SHMEM_PROFILE 00311 ACE_ENV_ARG_PARAMETER); 00312 ACE_CHECK; 00313 00314 if (!CORBA::is_nil (from.in ())) 00315 this->extract_protocol_properties (to, 00316 from.in () 00317 ACE_ENV_ARG_PARAMETER); 00318 ACE_CHECK; 00319 } |
|
Implements TAO_Protocols_Hooks. Definition at line 260 of file RT_Protocols_Hooks.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, extract_protocol_properties(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), RTCORBA::ProtocolProperties_var, server_protocol_properties_at_orb_level(), and TAO_TAG_UIOP_PROFILE.
00262 { 00263 RTCORBA::ProtocolProperties_var from = 00264 this->server_protocol_properties_at_orb_level (TAO_TAG_UIOP_PROFILE 00265 ACE_ENV_ARG_PARAMETER); 00266 ACE_CHECK; 00267 00268 if (!CORBA::is_nil (from.in ())) 00269 this->extract_protocol_properties (to, 00270 from.in () 00271 ACE_ENV_ARG_PARAMETER); 00272 ACE_CHECK; 00273 } |
|
Implements TAO_Protocols_Hooks. Definition at line 215 of file RT_Protocols_Hooks.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, extract_protocol_properties(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), and RTCORBA::ProtocolProperties_var. Referenced by server_protocol_properties_at_orb_level().
00217 { 00218 RTCORBA::ProtocolProperties_var from = 00219 this->server_protocol_properties_at_orb_level (IOP::TAG_INTERNET_IOP 00220 ACE_ENV_ARG_PARAMETER); 00221 ACE_CHECK; 00222 00223 if (!CORBA::is_nil (from.in ())) 00224 this->extract_protocol_properties (to, 00225 from.in () 00226 ACE_ENV_ARG_PARAMETER); 00227 ACE_CHECK; 00228 } |
|
Implements TAO_Protocols_Hooks. Definition at line 471 of file RT_Protocols_Hooks.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, client_protocol_properties_at_object_level(), TAO_Objref_Var_T< T >::in(), RTCORBA::ProtocolProperties_var, set_network_priority(), TAO_TAG_DIOP_PROFILE, and TAO_TAG_SCIOP_PROFILE.
00474 { 00475 if (protocol_tag != IOP::TAG_INTERNET_IOP && 00476 protocol_tag != TAO_TAG_DIOP_PROFILE && 00477 protocol_tag != TAO_TAG_SCIOP_PROFILE) 00478 return false; 00479 00480 RTCORBA::ProtocolProperties_var protocol_properties = 00481 this->client_protocol_properties_at_object_level (protocol_tag, 00482 stub 00483 ACE_ENV_ARG_PARAMETER); 00484 ACE_CHECK_RETURN (false); 00485 00486 return this->set_network_priority (protocol_tag, 00487 protocol_properties.in () 00488 ACE_ENV_ARG_PARAMETER); 00489 } |
|
Definition at line 430 of file RT_Protocols_Hooks.cpp. References RTCORBA::StreamControlProtocolProperties::_narrow(), RTCORBA::UserDatagramProtocolProperties::_narrow(), RTCORBA::TCPProtocolProperties::_narrow(), ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, CORBA::is_nil(), RTCORBA::ProtocolProperties_ptr, RTCORBA::StreamControlProtocolProperties_var, TAO_TAG_DIOP_PROFILE, TAO_TAG_SCIOP_PROFILE, RTCORBA::TCPProtocolProperties_var, and RTCORBA::UserDatagramProtocolProperties_var. Referenced by set_client_network_priority(), and set_server_network_priority().
00433 { 00434 if (CORBA::is_nil (protocol_properties)) 00435 return false; 00436 00437 if (protocol_tag == IOP::TAG_INTERNET_IOP) 00438 { 00439 RTCORBA::TCPProtocolProperties_var tcp_protocol_properties = 00440 RTCORBA::TCPProtocolProperties::_narrow (protocol_properties 00441 ACE_ENV_ARG_PARAMETER); 00442 ACE_CHECK_RETURN (false); 00443 00444 return tcp_protocol_properties->enable_network_priority (); 00445 } 00446 00447 if (protocol_tag == TAO_TAG_DIOP_PROFILE) 00448 { 00449 RTCORBA::UserDatagramProtocolProperties_var udp_protocol_properties = 00450 RTCORBA::UserDatagramProtocolProperties::_narrow (protocol_properties 00451 ACE_ENV_ARG_PARAMETER); 00452 ACE_CHECK_RETURN (false); 00453 00454 return udp_protocol_properties->enable_network_priority (); 00455 } 00456 00457 if (protocol_tag == TAO_TAG_SCIOP_PROFILE) 00458 { 00459 RTCORBA::StreamControlProtocolProperties_var sctp_protocol_properties = 00460 RTCORBA::StreamControlProtocolProperties::_narrow (protocol_properties 00461 ACE_ENV_ARG_PARAMETER); 00462 ACE_CHECK_RETURN (false); 00463 00464 return sctp_protocol_properties->enable_network_priority (); 00465 } 00466 00467 return false; 00468 } |
|
Implements TAO_Protocols_Hooks. Definition at line 492 of file RT_Protocols_Hooks.cpp. References ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, TAO_Objref_Var_T< T >::in(), RTCORBA::ProtocolProperties_var, server_protocol_properties(), set_network_priority(), TAO_TAG_DIOP_PROFILE, and TAO_TAG_SCIOP_PROFILE.
00495 { 00496 if (protocol_tag != IOP::TAG_INTERNET_IOP && 00497 protocol_tag != TAO_TAG_DIOP_PROFILE && 00498 protocol_tag != TAO_TAG_SCIOP_PROFILE) 00499 return false; 00500 00501 RTCORBA::ProtocolProperties_var protocol_properties = 00502 this->server_protocol_properties (protocol_tag, 00503 policy 00504 ACE_ENV_ARG_PARAMETER); 00505 ACE_CHECK_RETURN (false); 00506 00507 return this->set_network_priority (protocol_tag, 00508 protocol_properties.in () 00509 ACE_ENV_ARG_PARAMETER); 00510 } |
|
Accessor and modifier to the current thread priority, used to implement the RTCORBA::Current interface, but it is faster for some critical components. Implements TAO_Protocols_Hooks. Definition at line 779 of file RT_Protocols_Hooks.cpp. References ACE_ENV_ARG_PARAMETER, TAO_Priority_Mapping_Manager_var::in(), TAO_Priority_Mapping_Manager::mapping(), mapping_manager_, set_thread_native_priority(), and TAO_Priority_Mapping::to_native().
00781 { 00782 TAO_Priority_Mapping *priority_mapping = 00783 this->mapping_manager_.in ()->mapping (); 00784 00785 CORBA::Short native_priority; 00786 00787 if (priority_mapping->to_native (priority, native_priority) == 0) 00788 { 00789 return -1; 00790 } 00791 00792 return this->set_thread_native_priority (native_priority 00793 ACE_ENV_ARG_PARAMETER); 00794 } |
|
Accessor and modifier to the current thread priority, used to implement the RTCORBA::Current interface, but it is faster for some critical components. Implements TAO_Protocols_Hooks. Definition at line 797 of file RT_Protocols_Hooks.cpp. References ACE_ERROR_RETURN, ACE_hthread_t, ACE_TEXT, LM_ERROR, ACE_Thread::self(), and ACE_Thread::setprio(). Referenced by set_thread_CORBA_priority().
00801 { 00802 ACE_hthread_t current; 00803 ACE_Thread::self (current); 00804 00805 if (ACE_Thread::setprio (current, native_priority) == -1) 00806 { 00807 ACE_ERROR_RETURN ((LM_ERROR, 00808 ACE_TEXT ("(%N,%l) Error setting thread ") 00809 ACE_TEXT ("priority to %d, errno %d %m\n"), 00810 native_priority, 00811 errno ), 00812 -1); 00813 } 00814 00815 return 0; 00816 } |
|
Definition at line 186 of file RT_Protocols_Hooks.h. |
|
Definition at line 183 of file RT_Protocols_Hooks.h. Referenced by get_thread_CORBA_and_native_priority(), init_hooks(), and set_thread_CORBA_priority(). |
|
Definition at line 184 of file RT_Protocols_Hooks.h. Referenced by get_dscp_codepoint(), and init_hooks(). |
|
Definition at line 180 of file RT_Protocols_Hooks.h. |