#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 (void) |
CORBA::PolicyType | policy_type (void) |
CORBA::Policy_ptr | copy (void) |
void | destroy (void) |
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 349 of file RT_Policy_i.h.
|
Constructor.
Definition at line 517 of file RT_Policy_i.cpp. References RTCORBA::ProtocolList.
00518 : ::CORBA::Object () 00519 , ::CORBA::Policy () 00520 , ::CORBA::LocalObject () 00521 , RTCORBA::ClientProtocolPolicy () 00522 , TAO_Local_RefCounted_Object () 00523 , protocols_ (protocols) 00524 { 00525 } |
|
Copy constructor.
Definition at line 527 of file RT_Policy_i.cpp.
00528 : ::CORBA::Object () 00529 , ::CORBA::Policy () 00530 , ::CORBA::LocalObject () 00531 , RTCORBA::ClientProtocolPolicy () 00532 , TAO_Local_RefCounted_Object () 00533 , protocols_ (rhs.protocols_) 00534 { 00535 } |
|
Protected destructor to enforce proper memory management of this reference counted object. Definition at line 537 of file RT_Policy_i.cpp.
00538 { 00539 } |
|
Definition at line 512 of file RT_Policy_i.cpp.
00513 { 00514 } |
|
Implements CORBA::Policy. Definition at line 594 of file RT_Policy_i.cpp. References TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL.
00595 { 00596 return TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL; 00597 } |
|
This method reads the object state from a CDR representation.
Implements CORBA::Policy. Definition at line 627 of file RT_Policy_i.cpp. References RTCORBA::ProtocolProperties::_tao_decode(), and TAO_InputCDR::orb_core().
00628 { 00629 CORBA::ULong length; 00630 CORBA::Boolean is_read_ok = in_cdr >> length; 00631 00632 this->protocols_.length (length); 00633 00634 for (CORBA::ULong i = 0; (i < length) && is_read_ok; i++) 00635 { 00636 is_read_ok = in_cdr >> this->protocols_[i].protocol_type; 00637 00638 this->protocols_[i].orb_protocol_properties = 00639 TAO_Protocol_Properties_Factory::create_orb_protocol_property 00640 (this->protocols_[i].protocol_type); 00641 00642 this->protocols_[i].transport_protocol_properties = 00643 TAO_Protocol_Properties_Factory::create_transport_protocol_property 00644 (this->protocols_[i].protocol_type, in_cdr.orb_core ()); 00645 00646 if (is_read_ok 00647 && (this->protocols_[i].orb_protocol_properties.ptr () != 0)) 00648 is_read_ok = 00649 this->protocols_[i].orb_protocol_properties->_tao_decode (in_cdr); 00650 00651 if (is_read_ok 00652 && (this->protocols_[i].transport_protocol_properties.ptr () != 0)) 00653 is_read_ok = 00654 this->protocols_[i].transport_protocol_properties->_tao_decode (in_cdr); 00655 00656 } 00657 00658 return is_read_ok; 00659 } |
|
This method writes a CDR representation of the current object.
Implements CORBA::Policy. Definition at line 607 of file RT_Policy_i.cpp.
00608 { 00609 CORBA::Boolean is_write_ok = out_cdr << this->protocols_.length (); 00610 00611 for (CORBA::ULong i = 0; 00612 (i < this->protocols_.length ()) && is_write_ok; 00613 i++) 00614 { 00615 is_write_ok = 00616 (out_cdr << this->protocols_[i].protocol_type) 00617 && 00618 this->protocols_[i].orb_protocol_properties->_tao_encode (out_cdr) 00619 && 00620 this->protocols_[i].transport_protocol_properties->_tao_encode (out_cdr); 00621 } 00622 00623 return is_write_ok; 00624 } |
|
Implements CORBA::Policy. Definition at line 600 of file RT_Policy_i.cpp. References TAO_POLICY_CLIENT_EXPOSED, and TAO_POLICY_DEFAULT_SCOPE.
00601 { 00602 return static_cast<TAO_Policy_Scope> (TAO_POLICY_DEFAULT_SCOPE | 00603 TAO_POLICY_CLIENT_EXPOSED); 00604 } |
|
Implements CORBA::Policy. Definition at line 577 of file RT_Policy_i.cpp. References ACE_NEW_THROW_EX.
00578 { 00579 TAO_ClientProtocolPolicy* tmp = 0; 00580 ACE_NEW_THROW_EX (tmp, 00581 TAO_ClientProtocolPolicy (*this), 00582 CORBA::NO_MEMORY (TAO::VMCID, 00583 CORBA::COMPLETED_NO)); 00584 00585 return tmp; 00586 } |
|
Helper method for the implementation of CORBA::ORB::create_policy. Definition at line 542 of file RT_Policy_i.cpp. References ACE_NEW_THROW_EX, and RTCORBA::ProtocolList. Referenced by TAO_RT_PolicyFactory::create_policy().
00544 { 00545 RTCORBA::ProtocolList *value = 0; 00546 if ((val >>= value) == 0) 00547 throw ::CORBA::PolicyError (CORBA::BAD_POLICY_VALUE); 00548 00549 TAO_ClientProtocolPolicy *tmp = 0; 00550 ACE_NEW_THROW_EX (tmp, 00551 TAO_ClientProtocolPolicy (*value), 00552 CORBA::NO_MEMORY (TAO::VMCID, 00553 CORBA::COMPLETED_NO)); 00554 00555 return tmp; 00556 } |
|
Implements CORBA::Policy. Definition at line 589 of file RT_Policy_i.cpp.
00590 { 00591 } |
|
Implements CORBA::Policy. Definition at line 571 of file RT_Policy_i.cpp.
00572 {
00573 return RTCORBA::CLIENT_PROTOCOL_POLICY_TYPE;
00574 }
|
|
Definition at line 559 of file RT_Policy_i.cpp. References ACE_NEW_THROW_EX, and RTCORBA::ProtocolList.
00560 { 00561 RTCORBA::ProtocolList *tmp = 0; 00562 ACE_NEW_THROW_EX (tmp, 00563 RTCORBA::ProtocolList (this->protocols_), 00564 CORBA::NO_MEMORY (TAO::VMCID, 00565 CORBA::COMPLETED_NO)); 00566 00567 return tmp; 00568 } |
|
Accessor to the underlying protocols list of the policy (does not make a copy like the idl accessor implementation below.) Definition at line 662 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().
00663 { 00664 return protocols_; 00665 } |
|
This constructor is used by TAO_RT_PolicyFactory when decoding policies from tagged components in an IOR. Definition at line 402 of file RT_Policy_i.h. |
|
Attribute.
Definition at line 408 of file RT_Policy_i.h. |