#include <RT_Policy_i.h>
Inheritance diagram for TAO_ClientProtocolPolicy:
Public Member Functions | |
TAO_ClientProtocolPolicy (const RTCORBA::ProtocolList &protocols) | |
Constructor. | |
TAO_ClientProtocolPolicy (const TAO_ClientProtocolPolicy &rhs) | |
Copy constructor. | |
RTCORBA::ProtocolList & | protocols_rep (void) |
RTCORBA::ProtocolList * | protocols () throw (CORBA::SystemException) |
CORBA::PolicyType | policy_type () throw (CORBA::SystemException) |
CORBA::Policy_ptr | copy () throw (CORBA::SystemException) |
void | destroy () throw (CORBA::SystemException) |
CORBA::Boolean | _tao_encode (TAO_OutputCDR &out_cdr) |
This method writes a CDR representation of the current object. | |
CORBA::Boolean | _tao_decode (TAO_InputCDR &in_cdr) |
This method reads the object state from a CDR representation. | |
TAO_Cached_Policy_Type | _tao_cached_type (void) const |
TAO_Policy_Scope | _tao_scope (void) const |
Static Public Member Functions | |
CORBA::Policy_ptr | create (const CORBA::Any &val) |
Protected Member Functions | |
virtual | ~TAO_ClientProtocolPolicy (void) |
TAO_ClientProtocolPolicy (void) | |
Private Attributes | |
RTCORBA::ProtocolList | protocols_ |
Attribute. | |
Friends | |
class | TAO_RT_PolicyFactory |
This policy controls selection and configuration of communication protocols on the client-side of the RT ORB.
Definition at line 377 of file RT_Policy_i.h.
|
Constructor.
Definition at line 555 of file RT_Policy_i.cpp.
00556 : ::CORBA::Object () 00557 , ::CORBA::Policy () 00558 , ::CORBA::LocalObject () 00559 , RTCORBA::ClientProtocolPolicy () 00560 , TAO_Local_RefCounted_Object () 00561 , protocols_ (protocols) 00562 { 00563 } |
|
Copy constructor.
Definition at line 565 of file RT_Policy_i.cpp.
00566 : ::CORBA::Object () 00567 , ::CORBA::Policy () 00568 , ::CORBA::LocalObject () 00569 , RTCORBA::ClientProtocolPolicy () 00570 , TAO_Local_RefCounted_Object () 00571 , protocols_ (rhs.protocols_) 00572 { 00573 } |
|
Protected destructor to enforce proper memory management of this reference counted object. Definition at line 575 of file RT_Policy_i.cpp.
00576 { 00577 } |
|
Definition at line 550 of file RT_Policy_i.cpp.
00551 { 00552 } |
|
Implements CORBA::Policy. Definition at line 640 of file RT_Policy_i.cpp. References TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL.
00641 { 00642 return TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL; 00643 } |
|
This method reads the object state from a CDR representation.
Implements CORBA::Policy. Definition at line 673 of file RT_Policy_i.cpp. References RTCORBA::ProtocolProperties::_tao_decode(), TAO::unbounded_value_sequence< Protocol >::length(), and TAO_InputCDR::orb_core().
00674 { 00675 CORBA::ULong length; 00676 CORBA::Boolean is_read_ok = in_cdr >> length; 00677 00678 this->protocols_.length (length); 00679 00680 for (CORBA::ULong i = 0; (i < length) && is_read_ok; i++) 00681 { 00682 is_read_ok = in_cdr >> this->protocols_[i].protocol_type; 00683 00684 this->protocols_[i].orb_protocol_properties = 00685 TAO_Protocol_Properties_Factory::create_orb_protocol_property 00686 (this->protocols_[i].protocol_type); 00687 00688 this->protocols_[i].transport_protocol_properties = 00689 TAO_Protocol_Properties_Factory::create_transport_protocol_property 00690 (this->protocols_[i].protocol_type, in_cdr.orb_core ()); 00691 00692 if (is_read_ok 00693 && (this->protocols_[i].orb_protocol_properties.ptr () != 0)) 00694 is_read_ok = 00695 this->protocols_[i].orb_protocol_properties->_tao_decode (in_cdr); 00696 00697 if (is_read_ok 00698 && (this->protocols_[i].transport_protocol_properties.ptr () != 0)) 00699 is_read_ok = 00700 this->protocols_[i].transport_protocol_properties->_tao_decode (in_cdr); 00701 00702 } 00703 00704 return is_read_ok; 00705 } |
|
This method writes a CDR representation of the current object.
Implements CORBA::Policy. Definition at line 653 of file RT_Policy_i.cpp. References TAO::unbounded_value_sequence< Protocol >::length().
00654 { 00655 CORBA::Boolean is_write_ok = out_cdr << this->protocols_.length (); 00656 00657 for (CORBA::ULong i = 0; 00658 (i < this->protocols_.length ()) && is_write_ok; 00659 i++) 00660 { 00661 is_write_ok = 00662 (out_cdr << this->protocols_[i].protocol_type) 00663 && 00664 this->protocols_[i].orb_protocol_properties->_tao_encode (out_cdr) 00665 && 00666 this->protocols_[i].transport_protocol_properties->_tao_encode (out_cdr); 00667 } 00668 00669 return is_write_ok; 00670 } |
|
Implements CORBA::Policy. Definition at line 646 of file RT_Policy_i.cpp. References TAO_POLICY_CLIENT_EXPOSED, and TAO_POLICY_DEFAULT_SCOPE.
00647 { 00648 return static_cast<TAO_Policy_Scope> (TAO_POLICY_DEFAULT_SCOPE | 00649 TAO_POLICY_CLIENT_EXPOSED); 00650 } |
|
Implements RTCORBA::ClientProtocolPolicy. Definition at line 620 of file RT_Policy_i.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00622 { 00623 TAO_ClientProtocolPolicy* tmp = 0; 00624 ACE_NEW_THROW_EX (tmp, 00625 TAO_ClientProtocolPolicy (*this), 00626 CORBA::NO_MEMORY (TAO::VMCID, 00627 CORBA::COMPLETED_NO)); 00628 ACE_CHECK_RETURN (CORBA::Policy::_nil ()); 00629 00630 return tmp; 00631 } |
|
Helper method for the implementation of CORBA::ORB::create_policy. Definition at line 580 of file RT_Policy_i.cpp. References ACE_CHECK_RETURN, ACE_NEW_THROW_EX, and ACE_THROW_RETURN. Referenced by TAO_RT_PolicyFactory::create_policy().
00582 { 00583 RTCORBA::ProtocolList *value = 0; 00584 if ((val >>= value) == 0) 00585 ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_VALUE), 00586 CORBA::Policy::_nil ()); 00587 00588 TAO_ClientProtocolPolicy *tmp = 0; 00589 ACE_NEW_THROW_EX (tmp, 00590 TAO_ClientProtocolPolicy (*value), 00591 CORBA::NO_MEMORY (TAO::VMCID, 00592 CORBA::COMPLETED_NO)); 00593 ACE_CHECK_RETURN (CORBA::Policy::_nil ()); 00594 00595 return tmp; 00596 } |
|
Implements RTCORBA::ClientProtocolPolicy. Definition at line 634 of file RT_Policy_i.cpp.
00636 { 00637 } |
|
Implements CORBA::Policy. Definition at line 613 of file RT_Policy_i.cpp.
00615 {
00616 return RTCORBA::CLIENT_PROTOCOL_POLICY_TYPE;
00617 }
|
|
Implements RTCORBA::ClientProtocolPolicy. Definition at line 599 of file RT_Policy_i.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00601 { 00602 RTCORBA::ProtocolList *tmp = 0; 00603 ACE_NEW_THROW_EX (tmp, 00604 RTCORBA::ProtocolList (this->protocols_), 00605 CORBA::NO_MEMORY (TAO::VMCID, 00606 CORBA::COMPLETED_NO)); 00607 ACE_CHECK_RETURN (0); 00608 00609 return tmp; 00610 } |
|
Accessor to the underlying protocols list of the policy (does not make a copy like the idl accessor implementation below.) Definition at line 708 of file RT_Policy_i.cpp. Referenced by TAO_RT_Protocols_Hooks::client_protocol_properties(), TAO_RT_Stub::effective_client_protocol(), and TAO_RT_Invocation_Endpoint_Selector::select_endpoint().
00709 { 00710 return protocols_; 00711 } |
|
This constructor is used by TAO_RT_PolicyFactory when decoding policies from tagged components in an IOR. Definition at line 435 of file RT_Policy_i.h. |
|
Attribute.
Definition at line 441 of file RT_Policy_i.h. |