TAO_ThreadpoolPolicy Class Reference

RTCORBA::ThreadpoolPolicy implementation. More...

#include <RT_Policy_i.h>

Inheritance diagram for TAO_ThreadpoolPolicy:

Inheritance graph
[legend]
Collaboration diagram for TAO_ThreadpoolPolicy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_ThreadpoolPolicy (RTCORBA::ThreadpoolId id)
 Constructor.

 TAO_ThreadpoolPolicy (const TAO_ThreadpoolPolicy &rhs)
 Copy constructor.

RTCORBA::ThreadpoolId threadpool () throw (CORBA::SystemException)
CORBA::PolicyType policy_type () throw (CORBA::SystemException)
CORBA::Policy_ptr copy () throw (CORBA::SystemException)
void destroy () throw (CORBA::SystemException)
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_ThreadpoolPolicy (void)

Private Attributes

RTCORBA::ThreadpoolId id_
 Attribute.


Detailed Description

RTCORBA::ThreadpoolPolicy implementation.

This policy controls which threadpool is associated with a POA.

Definition at line 130 of file RT_Policy_i.h.


Constructor & Destructor Documentation

TAO_ThreadpoolPolicy::TAO_ThreadpoolPolicy RTCORBA::ThreadpoolId  id  ) 
 

Constructor.

Definition at line 153 of file RT_Policy_i.cpp.

References RTCORBA::ThreadpoolId.

00154   : ::CORBA::Object ()
00155   , ::CORBA::Policy ()
00156   , ::CORBA::LocalObject ()
00157   , RTCORBA::ThreadpoolPolicy ()
00158   , TAO_Local_RefCounted_Object ()
00159   , id_ (id)
00160 {
00161 }

TAO_ThreadpoolPolicy::TAO_ThreadpoolPolicy const TAO_ThreadpoolPolicy rhs  ) 
 

Copy constructor.

Definition at line 163 of file RT_Policy_i.cpp.

00164   : ::CORBA::Object ()
00165   , ::CORBA::Policy ()
00166   , ::CORBA::LocalObject ()
00167   , RTCORBA::ThreadpoolPolicy ()
00168   , TAO_Local_RefCounted_Object ()
00169   , id_ (rhs.id_)
00170 {
00171 }

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

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

Definition at line 173 of file RT_Policy_i.cpp.

00174 {
00175 }


Member Function Documentation

TAO_Cached_Policy_Type TAO_ThreadpoolPolicy::_tao_cached_type void   )  const [virtual]
 

Implements CORBA::Policy.

Definition at line 231 of file RT_Policy_i.cpp.

References TAO_CACHED_POLICY_THREADPOOL.

00232 {
00233   return TAO_CACHED_POLICY_THREADPOOL;
00234 }

TAO_Policy_Scope TAO_ThreadpoolPolicy::_tao_scope void   )  const [virtual]
 

Implements CORBA::Policy.

Definition at line 237 of file RT_Policy_i.cpp.

References TAO_POLICY_ORB_SCOPE, and TAO_POLICY_POA_SCOPE.

00238 {
00239   return static_cast<TAO_Policy_Scope> (TAO_POLICY_ORB_SCOPE |
00240                           TAO_POLICY_POA_SCOPE);
00241 }

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

Implements RTCORBA::ThreadpoolPolicy.

Definition at line 211 of file RT_Policy_i.cpp.

References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.

00213 {
00214   TAO_ThreadpoolPolicy* tmp = 0;
00215   ACE_NEW_THROW_EX (tmp,
00216                     TAO_ThreadpoolPolicy (*this),
00217                     CORBA::NO_MEMORY (TAO::VMCID,
00218                                       CORBA::COMPLETED_NO));
00219   ACE_CHECK_RETURN (CORBA::Policy::_nil ());
00220 
00221   return tmp;
00222 }

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

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

Definition at line 178 of file RT_Policy_i.cpp.

References ACE_CHECK_RETURN, ACE_NEW_THROW_EX, ACE_THROW_RETURN, and RTCORBA::ThreadpoolId.

Referenced by TAO_RT_PolicyFactory::create_policy().

00180 {
00181   RTCORBA::ThreadpoolId value;
00182   if ((val >>= value) == 0)
00183     ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_VALUE),
00184                       CORBA::Policy::_nil ());
00185 
00186   TAO_ThreadpoolPolicy *tmp = 0;
00187   ACE_NEW_THROW_EX (tmp,
00188                     TAO_ThreadpoolPolicy (value),
00189                     CORBA::NO_MEMORY (TAO::VMCID,
00190                                       CORBA::COMPLETED_NO));
00191   ACE_CHECK_RETURN (CORBA::Policy::_nil ());
00192 
00193   return tmp;
00194 }

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

Implements RTCORBA::ThreadpoolPolicy.

Definition at line 225 of file RT_Policy_i.cpp.

00227 {
00228 }

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

Implements CORBA::Policy.

Definition at line 204 of file RT_Policy_i.cpp.

00206 {
00207   return RTCORBA::THREADPOOL_POLICY_TYPE;
00208 }

RTCORBA::ThreadpoolId TAO_ThreadpoolPolicy::threadpool  )  throw (CORBA::SystemException) [virtual]
 

Implements RTCORBA::ThreadpoolPolicy.

Definition at line 197 of file RT_Policy_i.cpp.

00199 {
00200   return this->id_;
00201 }


Member Data Documentation

RTCORBA::ThreadpoolId TAO_ThreadpoolPolicy::id_ [private]
 

Attribute.

Definition at line 173 of file RT_Policy_i.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:00:14 2006 for TAO_RTCORBA by doxygen 1.3.6