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 () 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_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 239 of file RT_Policy_i.h.


Constructor & Destructor Documentation

TAO_PriorityBandedConnectionPolicy::TAO_PriorityBandedConnectionPolicy const RTCORBA::PriorityBands bands  ) 
 

Constructor.

Definition at line 324 of file RT_Policy_i.cpp.

00325   : ::CORBA::Object ()
00326   , ::CORBA::Policy ()
00327   , ::CORBA::LocalObject ()
00328   , RTCORBA::PriorityBandedConnectionPolicy ()
00329   , TAO_Local_RefCounted_Object ()
00330   , priority_bands_ (bands)
00331 {
00332 }

TAO_PriorityBandedConnectionPolicy::TAO_PriorityBandedConnectionPolicy const TAO_PriorityBandedConnectionPolicy rhs  ) 
 

Copy constructor.

Definition at line 334 of file RT_Policy_i.cpp.

00335   : ::CORBA::Object ()
00336   , ::CORBA::Policy ()
00337   , ::CORBA::LocalObject ()
00338   , RTCORBA::PriorityBandedConnectionPolicy ()
00339   , TAO_Local_RefCounted_Object ()
00340   , priority_bands_ (rhs.priority_bands_)
00341 {
00342 }

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

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

Definition at line 348 of file RT_Policy_i.cpp.

00349 {
00350 }

TAO_PriorityBandedConnectionPolicy::TAO_PriorityBandedConnectionPolicy void   )  [protected]
 

Definition at line 344 of file RT_Policy_i.cpp.

00345 {
00346 }


Member Function Documentation

TAO_Cached_Policy_Type TAO_PriorityBandedConnectionPolicy::_tao_cached_type void   )  const [virtual]
 

Implements CORBA::Policy.

Definition at line 425 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 419 of file RT_Policy_i.cpp.

References priority_bands_.

00420 {
00421   return in_cdr >> priority_bands_;
00422 }

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 413 of file RT_Policy_i.cpp.

References priority_bands_.

00414 {
00415   return out_cdr << priority_bands_;
00416 }

TAO_Policy_Scope TAO_PriorityBandedConnectionPolicy::_tao_scope void   )  const [virtual]
 

Implements CORBA::Policy.

Definition at line 431 of file RT_Policy_i.cpp.

References TAO_POLICY_CLIENT_EXPOSED, and TAO_POLICY_DEFAULT_SCOPE.

00432 {
00433   return static_cast<TAO_Policy_Scope> (TAO_POLICY_DEFAULT_SCOPE |
00434                           TAO_POLICY_CLIENT_EXPOSED);
00435 }

CORBA::Policy_ptr TAO_PriorityBandedConnectionPolicy::copy  )  throw (CORBA::SystemException) [virtual]
 

Implements RTCORBA::PriorityBandedConnectionPolicy.

Definition at line 393 of file RT_Policy_i.cpp.

References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.

00395 {
00396   TAO_PriorityBandedConnectionPolicy *tmp = 0;
00397   ACE_NEW_THROW_EX (tmp,
00398                     TAO_PriorityBandedConnectionPolicy (*this),
00399                     CORBA::NO_MEMORY (TAO::VMCID,
00400                                       CORBA::COMPLETED_NO));
00401   ACE_CHECK_RETURN (CORBA::Policy::_nil ());
00402 
00403   return tmp;
00404 }

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

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

Definition at line 353 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().

00355 {
00356   RTCORBA::PriorityBands *value = 0;
00357   if ((val >>= value) == 0)
00358     ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_VALUE),
00359                       CORBA::Policy::_nil ());
00360 
00361   TAO_PriorityBandedConnectionPolicy *tmp = 0;
00362   ACE_NEW_THROW_EX (tmp,
00363                     TAO_PriorityBandedConnectionPolicy (*value),
00364                     CORBA::NO_MEMORY (TAO::VMCID,
00365                                       CORBA::COMPLETED_NO));
00366   ACE_CHECK_RETURN (CORBA::Policy::_nil ());
00367 
00368   return tmp;
00369 }

void TAO_PriorityBandedConnectionPolicy::destroy  )  throw (CORBA::SystemException) [virtual]
 

Implements RTCORBA::PriorityBandedConnectionPolicy.

Definition at line 407 of file RT_Policy_i.cpp.

00409 {
00410 }

CORBA::PolicyType TAO_PriorityBandedConnectionPolicy::policy_type  )  throw (CORBA::SystemException) [virtual]
 

Implements CORBA::Policy.

Definition at line 386 of file RT_Policy_i.cpp.

00388 {
00389   return RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE;
00390 }

RTCORBA::PriorityBands * TAO_PriorityBandedConnectionPolicy::priority_bands  )  throw (CORBA::SystemException) [virtual]
 

Implements RTCORBA::PriorityBandedConnectionPolicy.

Definition at line 372 of file RT_Policy_i.cpp.

References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.

00374 {
00375   RTCORBA::PriorityBands *tmp;
00376   ACE_NEW_THROW_EX (tmp,
00377                     RTCORBA::PriorityBands (this->priority_bands_),
00378                     CORBA::NO_MEMORY (TAO::VMCID,
00379                                       CORBA::COMPLETED_NO));
00380   ACE_CHECK_RETURN (0);
00381 
00382   return tmp;
00383 }

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

00439 {
00440   return priority_bands_;
00441 }


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 294 of file RT_Policy_i.h.


Member Data Documentation

RTCORBA::PriorityBands TAO_PriorityBandedConnectionPolicy::priority_bands_ [private]
 

Attribute.

Definition at line 300 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 Thu Nov 9 12:59:23 2006 for TAO_RTCORBA by doxygen 1.3.6