#include <RT_Policy_i.h>
Inheritance diagram for TAO_PriorityBandedConnectionPolicy:
Public Member Functions | |
TAO_PriorityBandedConnectionPolicy (const RTCORBA::PriorityBands &bands) | |
Constructor. | |
TAO_PriorityBandedConnectionPolicy (const TAO_PriorityBandedConnectionPolicy &rhs) | |
Copy constructor. | |
RTCORBA::PriorityBands & | priority_bands_rep (void) |
RTCORBA::PriorityBands * | priority_bands (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 | |
static CORBA::Policy_ptr | create (const CORBA::Any &val) |
Protected Member Functions | |
virtual | ~TAO_PriorityBandedConnectionPolicy (void) |
TAO_PriorityBandedConnectionPolicy (void) | |
Private Attributes | |
RTCORBA::PriorityBands | priority_bands_ |
Attribute. | |
Friends | |
class | TAO_RT_PolicyFactory |
RT CORBA provides facility for a client to communicate with a server via multiple connections, aka bands, with each connection handling invocations that are made at a different CORBA priority. This policy allows the specification of the number of such bands and their priorities.
Definition at line 221 of file RT_Policy_i.h.
TAO_PriorityBandedConnectionPolicy::TAO_PriorityBandedConnectionPolicy | ( | const RTCORBA::PriorityBands & | bands | ) |
Constructor.
Definition at line 297 of file RT_Policy_i.cpp.
00298 : ::CORBA::Object () 00299 , ::CORBA::Policy () 00300 , RTCORBA::PriorityBandedConnectionPolicy () 00301 , ::CORBA::LocalObject () 00302 , priority_bands_ (bands) 00303 { 00304 }
TAO_PriorityBandedConnectionPolicy::TAO_PriorityBandedConnectionPolicy | ( | const TAO_PriorityBandedConnectionPolicy & | rhs | ) |
Copy constructor.
Definition at line 306 of file RT_Policy_i.cpp.
00307 : ::CORBA::Object () 00308 , ::CORBA::Policy () 00309 , RTCORBA::PriorityBandedConnectionPolicy () 00310 , ::CORBA::LocalObject () 00311 , priority_bands_ (rhs.priority_bands_) 00312 { 00313 }
TAO_PriorityBandedConnectionPolicy::~TAO_PriorityBandedConnectionPolicy | ( | void | ) | [protected, virtual] |
Protected destructor to enforce proper memory management of this reference counted object.
Definition at line 319 of file RT_Policy_i.cpp.
TAO_PriorityBandedConnectionPolicy::TAO_PriorityBandedConnectionPolicy | ( | void | ) | [protected] |
TAO_Cached_Policy_Type TAO_PriorityBandedConnectionPolicy::_tao_cached_type | ( | void | ) | const |
Definition at line 387 of file RT_Policy_i.cpp.
References TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION.
00388 { 00389 return TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION; 00390 }
CORBA::Boolean TAO_PriorityBandedConnectionPolicy::_tao_decode | ( | TAO_InputCDR & | in_cdr | ) |
This method reads the object state from a CDR representation.
Definition at line 381 of file RT_Policy_i.cpp.
References priority_bands_.
00382 { 00383 return in_cdr >> priority_bands_; 00384 }
CORBA::Boolean TAO_PriorityBandedConnectionPolicy::_tao_encode | ( | TAO_OutputCDR & | out_cdr | ) |
This method writes a CDR representation of the current object.
Definition at line 375 of file RT_Policy_i.cpp.
References priority_bands_.
00376 { 00377 return out_cdr << priority_bands_; 00378 }
TAO_Policy_Scope TAO_PriorityBandedConnectionPolicy::_tao_scope | ( | void | ) | const |
Definition at line 393 of file RT_Policy_i.cpp.
References TAO_POLICY_CLIENT_EXPOSED, and TAO_POLICY_DEFAULT_SCOPE.
00394 { 00395 return static_cast<TAO_Policy_Scope> (TAO_POLICY_DEFAULT_SCOPE | 00396 TAO_POLICY_CLIENT_EXPOSED); 00397 }
CORBA::Policy_ptr TAO_PriorityBandedConnectionPolicy::copy | ( | void | ) |
Definition at line 358 of file RT_Policy_i.cpp.
References ACE_NEW_THROW_EX, CORBA::COMPLETED_NO, and TAO::VMCID.
00359 { 00360 TAO_PriorityBandedConnectionPolicy *tmp = 0; 00361 ACE_NEW_THROW_EX (tmp, 00362 TAO_PriorityBandedConnectionPolicy (*this), 00363 CORBA::NO_MEMORY (TAO::VMCID, 00364 CORBA::COMPLETED_NO)); 00365 00366 return tmp; 00367 }
CORBA::Policy_ptr TAO_PriorityBandedConnectionPolicy::create | ( | const CORBA::Any & | val | ) | [static] |
Helper method for the implementation of CORBA::ORB::create_policy.
Definition at line 324 of file RT_Policy_i.cpp.
References ACE_NEW_THROW_EX, CORBA::BAD_POLICY_VALUE, CORBA::COMPLETED_NO, and TAO::VMCID.
Referenced by TAO_RT_PolicyFactory::create_policy().
00325 { 00326 RTCORBA::PriorityBands *value = 0; 00327 if ((val >>= value) == 0) 00328 throw ::CORBA::PolicyError (CORBA::BAD_POLICY_VALUE); 00329 00330 TAO_PriorityBandedConnectionPolicy *tmp = 0; 00331 ACE_NEW_THROW_EX (tmp, 00332 TAO_PriorityBandedConnectionPolicy (*value), 00333 CORBA::NO_MEMORY (TAO::VMCID, 00334 CORBA::COMPLETED_NO)); 00335 00336 return tmp; 00337 }
void TAO_PriorityBandedConnectionPolicy::destroy | ( | void | ) |
CORBA::PolicyType TAO_PriorityBandedConnectionPolicy::policy_type | ( | void | ) |
RTCORBA::PriorityBands * TAO_PriorityBandedConnectionPolicy::priority_bands | ( | void | ) |
Definition at line 340 of file RT_Policy_i.cpp.
References ACE_NEW_THROW_EX, CORBA::COMPLETED_NO, and TAO::VMCID.
00341 { 00342 RTCORBA::PriorityBands *tmp; 00343 ACE_NEW_THROW_EX (tmp, 00344 RTCORBA::PriorityBands (this->priority_bands_), 00345 CORBA::NO_MEMORY (TAO::VMCID, 00346 CORBA::COMPLETED_NO)); 00347 00348 return tmp; 00349 }
RTCORBA::PriorityBands & TAO_PriorityBandedConnectionPolicy::priority_bands_rep | ( | void | ) |
Accessor to the underlying priority bands of the policy (does not make a copy like the idl accessor <priority_bands> implementation below.)
Definition at line 400 of file RT_Policy_i.cpp.
References priority_bands_.
Referenced by TAO_RT_Protocols_Hooks::get_selector_bands_policy_hook().
00401 { 00402 return priority_bands_; 00403 }
friend class TAO_RT_PolicyFactory [friend] |
This constructor is used by TAO_RT_PolicyFactory when decoding policies from tagged components in an IOR.
Definition at line 271 of file RT_Policy_i.h.
RTCORBA::PriorityBands TAO_PriorityBandedConnectionPolicy::priority_bands_ [private] |
Attribute.
Definition at line 277 of file RT_Policy_i.h.
Referenced by _tao_decode(), _tao_encode(), and priority_bands_rep().