TAO_PriorityBandedConnectionPolicy Class Reference

RTCORBA::PriorityBandedConnectionPolicy implementation. More...

#include <RT_Policy_i.h>

Inheritance diagram for TAO_PriorityBandedConnectionPolicy:

Inheritance graph
[legend]
Collaboration diagram for TAO_PriorityBandedConnectionPolicy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_PriorityBandedConnectionPolicy (const RTCORBA::PriorityBands &bands)
 Constructor.

 TAO_PriorityBandedConnectionPolicy (const TAO_PriorityBandedConnectionPolicy &rhs)
 Copy constructor.

RTCORBA::PriorityBandspriority_bands_rep (void)
RTCORBA::PriorityBandspriority_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

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

Detailed Description

RTCORBA::PriorityBandedConnectionPolicy implementation.

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.


Constructor & Destructor Documentation

TAO_PriorityBandedConnectionPolicy::TAO_PriorityBandedConnectionPolicy const RTCORBA::PriorityBands bands  ) 
 

Constructor.

Definition at line 304 of file RT_Policy_i.cpp.

References RTCORBA::PriorityBands.

00305   : ::CORBA::Object ()
00306   , ::CORBA::Policy ()
00307   , ::CORBA::LocalObject ()
00308   , RTCORBA::PriorityBandedConnectionPolicy ()
00309   , TAO_Local_RefCounted_Object ()
00310   , priority_bands_ (bands)
00311 {
00312 }

TAO_PriorityBandedConnectionPolicy::TAO_PriorityBandedConnectionPolicy const TAO_PriorityBandedConnectionPolicy rhs  ) 
 

Copy constructor.

Definition at line 314 of file RT_Policy_i.cpp.

00315   : ::CORBA::Object ()
00316   , ::CORBA::Policy ()
00317   , ::CORBA::LocalObject ()
00318   , RTCORBA::PriorityBandedConnectionPolicy ()
00319   , TAO_Local_RefCounted_Object ()
00320   , priority_bands_ (rhs.priority_bands_)
00321 {
00322 }

TAO_PriorityBandedConnectionPolicy::~TAO_PriorityBandedConnectionPolicy void   )  [protected, virtual]
 

Protected destructor to enforce proper memory management of this reference counted object.

Definition at line 328 of file RT_Policy_i.cpp.

00329 {
00330 }

TAO_PriorityBandedConnectionPolicy::TAO_PriorityBandedConnectionPolicy void   )  [protected]
 

Definition at line 324 of file RT_Policy_i.cpp.

00325 {
00326 }


Member Function Documentation

TAO_Cached_Policy_Type TAO_PriorityBandedConnectionPolicy::_tao_cached_type void   )  const [virtual]
 

Implements CORBA::Policy.

Definition at line 396 of file RT_Policy_i.cpp.

References TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION.

CORBA::Boolean TAO_PriorityBandedConnectionPolicy::_tao_decode TAO_InputCDR in_cdr  )  [virtual]
 

This method reads the object state from a CDR representation.

Implements CORBA::Policy.

Definition at line 390 of file RT_Policy_i.cpp.

References priority_bands_.

00391 {
00392   return in_cdr >> priority_bands_;
00393 }

CORBA::Boolean TAO_PriorityBandedConnectionPolicy::_tao_encode TAO_OutputCDR out_cdr  )  [virtual]
 

This method writes a CDR representation of the current object.

Implements CORBA::Policy.

Definition at line 384 of file RT_Policy_i.cpp.

References priority_bands_.

00385 {
00386   return out_cdr << priority_bands_;
00387 }

TAO_Policy_Scope TAO_PriorityBandedConnectionPolicy::_tao_scope void   )  const [virtual]
 

Implements CORBA::Policy.

Definition at line 402 of file RT_Policy_i.cpp.

References TAO_POLICY_CLIENT_EXPOSED, and TAO_POLICY_DEFAULT_SCOPE.

00403 {
00404   return static_cast<TAO_Policy_Scope> (TAO_POLICY_DEFAULT_SCOPE |
00405                           TAO_POLICY_CLIENT_EXPOSED);
00406 }

CORBA::Policy_ptr TAO_PriorityBandedConnectionPolicy::copy void   ) 
 

Implements CORBA::Policy.

Definition at line 367 of file RT_Policy_i.cpp.

References ACE_NEW_THROW_EX.

00368 {
00369   TAO_PriorityBandedConnectionPolicy *tmp = 0;
00370   ACE_NEW_THROW_EX (tmp,
00371                     TAO_PriorityBandedConnectionPolicy (*this),
00372                     CORBA::NO_MEMORY (TAO::VMCID,
00373                                       CORBA::COMPLETED_NO));
00374 
00375   return tmp;
00376 }

CORBA::Policy_ptr TAO_PriorityBandedConnectionPolicy::create const CORBA::Any &  val  )  [static]
 

Helper method for the implementation of CORBA::ORB::create_policy.

Definition at line 333 of file RT_Policy_i.cpp.

References ACE_NEW_THROW_EX, and RTCORBA::PriorityBands.

Referenced by TAO_RT_PolicyFactory::create_policy().

00334 {
00335   RTCORBA::PriorityBands *value = 0;
00336   if ((val >>= value) == 0)
00337     throw ::CORBA::PolicyError (CORBA::BAD_POLICY_VALUE);
00338 
00339   TAO_PriorityBandedConnectionPolicy *tmp = 0;
00340   ACE_NEW_THROW_EX (tmp,
00341                     TAO_PriorityBandedConnectionPolicy (*value),
00342                     CORBA::NO_MEMORY (TAO::VMCID,
00343                                       CORBA::COMPLETED_NO));
00344 
00345   return tmp;
00346 }

void TAO_PriorityBandedConnectionPolicy::destroy void   ) 
 

Implements CORBA::Policy.

Definition at line 379 of file RT_Policy_i.cpp.

00380 {
00381 }

CORBA::PolicyType TAO_PriorityBandedConnectionPolicy::policy_type void   )  [virtual]
 

Implements CORBA::Policy.

Definition at line 361 of file RT_Policy_i.cpp.

00362 {
00363   return RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE;
00364 }

RTCORBA::PriorityBands * TAO_PriorityBandedConnectionPolicy::priority_bands void   ) 
 

Definition at line 349 of file RT_Policy_i.cpp.

References ACE_NEW_THROW_EX, and RTCORBA::PriorityBands.

00350 {
00351   RTCORBA::PriorityBands *tmp;
00352   ACE_NEW_THROW_EX (tmp,
00353                     RTCORBA::PriorityBands (this->priority_bands_),
00354                     CORBA::NO_MEMORY (TAO::VMCID,
00355                                       CORBA::COMPLETED_NO));
00356 
00357   return tmp;
00358 }

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 implementation below.)

Definition at line 409 of file RT_Policy_i.cpp.

References priority_bands_.

Referenced by TAO_RT_Stub::effective_priority_banded_connection(), and TAO_RT_Protocols_Hooks::get_selector_bands_policy_hook().

00410 {
00411   return priority_bands_;
00412 }


Friends And Related Function Documentation

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.


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 13:34:32 2008 for TAO_RTCORBA by doxygen 1.3.6