TAO::Portable_Server::Cached_Policies Class Reference

#include <POA_Cached_Policies.h>

List of all members.

Public Types

 CLIENT_PROPAGATED
 SERVER_DECLARED
 NOT_SPECIFIED
 CLIENT_PROPAGATED_NETWORK_PRIORITY
 SERVER_DECLARED_NETWORK_PRIORITY
 NO_NETWORK_PRIORITY
enum  PriorityModel { CLIENT_PROPAGATED, SERVER_DECLARED, NOT_SPECIFIED }
enum  NetworkPriorityModel { CLIENT_PROPAGATED_NETWORK_PRIORITY, SERVER_DECLARED_NETWORK_PRIORITY, NO_NETWORK_PRIORITY }

Public Member Functions

 Cached_Policies ()
 ~Cached_Policies (void)
void update (TAO_POA_Policy_Set &policy_set)
 Update the cached policy values.
Accessor methods to cached values.
::PortableServer::ThreadPolicyValue thread (void) const
::PortableServer::LifespanPolicyValue lifespan (void) const
::PortableServer::IdUniquenessPolicyValue id_uniqueness (void) const
::PortableServer::IdAssignmentPolicyValue id_assignment (void) const
::PortableServer::ImplicitActivationPolicyValue implicit_activation (void) const
::PortableServer::ServantRetentionPolicyValue servant_retention (void) const
::PortableServer::RequestProcessingPolicyValue request_processing (void) const
PriorityModel priority_model (void) const
CORBA::Short server_priority (void) const
NetworkPriorityModel network_priority_model (void) const
CORBA::Long request_diffserv_codepoint (void) const
CORBA::Long reply_diffserv_codepoint (void) const
void network_priority_model (NetworkPriorityModel network_priority_model)
void request_diffserv_codepoint (CORBA::Long diffserv_codepoint)
void reply_diffserv_codepoint (CORBA::Long diffserv_codepoint)
void priority_model (PriorityModel priority_model)
void server_priority (CORBA::Short priority)
void implicit_activation (::PortableServer::ImplicitActivationPolicyValue value)

Protected Member Functions

void update_policy (const CORBA::Policy_ptr policy)
 Helper method to update a particular policy.

Protected Attributes

::PortableServer::ThreadPolicyValue thread_
::PortableServer::LifespanPolicyValue lifespan_
::PortableServer::IdUniquenessPolicyValue id_uniqueness_
::PortableServer::IdAssignmentPolicyValue id_assignment_
::PortableServer::ImplicitActivationPolicyValue implicit_activation_
::PortableServer::ServantRetentionPolicyValue servant_retention_
::PortableServer::RequestProcessingPolicyValue request_processing_
PriorityModel priority_model_
CORBA::Short server_priority_
NetworkPriorityModel network_priority_model_
CORBA::Long request_diffserv_codepoint_
CORBA::Long reply_diffserv_codepoint_


Detailed Description

Definition at line 42 of file POA_Cached_Policies.h.


Member Enumeration Documentation

enum TAO::Portable_Server::Cached_Policies::NetworkPriorityModel

Enumerator:
CLIENT_PROPAGATED_NETWORK_PRIORITY 
SERVER_DECLARED_NETWORK_PRIORITY 
NO_NETWORK_PRIORITY 

Definition at line 53 of file POA_Cached_Policies.h.

enum TAO::Portable_Server::Cached_Policies::PriorityModel

Enumerator:
CLIENT_PROPAGATED 
SERVER_DECLARED 
NOT_SPECIFIED 

Definition at line 46 of file POA_Cached_Policies.h.

00047       {
00048         CLIENT_PROPAGATED,
00049         SERVER_DECLARED,
00050         NOT_SPECIFIED
00051       };


Constructor & Destructor Documentation

TAO::Portable_Server::Cached_Policies::Cached_Policies (  ) 

Definition at line 27 of file POA_Cached_Policies.cpp.

00027                                       :
00028         thread_ (::PortableServer::ORB_CTRL_MODEL),
00029         lifespan_ (::PortableServer::TRANSIENT),
00030         id_uniqueness_ (::PortableServer::UNIQUE_ID),
00031         id_assignment_ (::PortableServer::SYSTEM_ID),
00032         implicit_activation_ (::PortableServer::NO_IMPLICIT_ACTIVATION),
00033         servant_retention_ (::PortableServer::RETAIN),
00034         request_processing_ (::PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY),
00035         priority_model_ (Cached_Policies::NOT_SPECIFIED),
00036         server_priority_ (TAO_INVALID_PRIORITY),
00037         network_priority_model_ (Cached_Policies::NO_NETWORK_PRIORITY),
00038         request_diffserv_codepoint_ (0),
00039         reply_diffserv_codepoint_ (0)
00040     {
00041     }

TAO::Portable_Server::Cached_Policies::~Cached_Policies ( void   ) 

Definition at line 44 of file POA_Cached_Policies.cpp.

00045     {
00046     }


Member Function Documentation

ACE_INLINE::PortableServer::IdAssignmentPolicyValue TAO::Portable_Server::Cached_Policies::id_assignment ( void   )  const

Definition at line 30 of file POA_Cached_Policies.inl.

References id_assignment_.

Referenced by update_policy().

00031     {
00032       return this->id_assignment_;
00033     }

ACE_INLINE::PortableServer::IdUniquenessPolicyValue TAO::Portable_Server::Cached_Policies::id_uniqueness ( void   )  const

Definition at line 24 of file POA_Cached_Policies.inl.

References id_uniqueness_.

Referenced by update_policy().

00025     {
00026       return this->id_uniqueness_;
00027     }

void TAO::Portable_Server::Cached_Policies::implicit_activation ( ::PortableServer::ImplicitActivationPolicyValue  value  ) 

ACE_INLINE::PortableServer::ImplicitActivationPolicyValue TAO::Portable_Server::Cached_Policies::implicit_activation ( void   )  const

Definition at line 36 of file POA_Cached_Policies.inl.

References implicit_activation_.

Referenced by TAO_Root_POA::TAO_Root_POA(), and update_policy().

00037     {
00038       return this->implicit_activation_;
00039     }

ACE_INLINE::PortableServer::LifespanPolicyValue TAO::Portable_Server::Cached_Policies::lifespan ( void   )  const

Definition at line 18 of file POA_Cached_Policies.inl.

References lifespan_.

Referenced by update_policy().

00019     {
00020       return this->lifespan_;
00021     }

ACE_INLINE void TAO::Portable_Server::Cached_Policies::network_priority_model ( NetworkPriorityModel  network_priority_model  ) 

Caches the network priority model that was set using a policy by the server application.

Definition at line 96 of file POA_Cached_Policies.inl.

References network_priority_model_.

00098     {
00099       this->network_priority_model_ = network_priority_model;
00100     }

ACE_INLINE Cached_Policies::NetworkPriorityModel TAO::Portable_Server::Cached_Policies::network_priority_model ( void   )  const

Returns the network priority model that was set using a policy by the server application.

Definition at line 78 of file POA_Cached_Policies.inl.

References network_priority_model_.

Referenced by TAO_Network_Priority_Hook::update_network_priority().

00079     {
00080       return this->network_priority_model_;
00081     }

ACE_INLINE void TAO::Portable_Server::Cached_Policies::priority_model ( PriorityModel  priority_model  ) 

Definition at line 66 of file POA_Cached_Policies.inl.

References priority_model_.

00067     {
00068       this->priority_model_ = priority_model;
00069     }

ACE_INLINE Cached_Policies::PriorityModel TAO::Portable_Server::Cached_Policies::priority_model ( void   )  const

Definition at line 54 of file POA_Cached_Policies.inl.

References priority_model_.

Referenced by TAO_Root_POA::priority_model().

00055     {
00056       return this->priority_model_;
00057     }

ACE_INLINE void TAO::Portable_Server::Cached_Policies::reply_diffserv_codepoint ( CORBA::Long  diffserv_codepoint  ) 

Caches the reply DiffServ codepoint that was set using a policy by the server application.

Definition at line 110 of file POA_Cached_Policies.inl.

References reply_diffserv_codepoint_.

00111     {
00112       this->reply_diffserv_codepoint_ = diffserv_codepoint;
00113     }

ACE_INLINE CORBA::Long TAO::Portable_Server::Cached_Policies::reply_diffserv_codepoint ( void   )  const

Returns the reply DiffServ codepoint that was set using a policy by the server application.

Definition at line 90 of file POA_Cached_Policies.inl.

References reply_diffserv_codepoint_.

Referenced by TAO_Network_Priority_Hook::update_network_priority().

00091     {
00092       return this->reply_diffserv_codepoint_;
00093     }

ACE_INLINE void TAO::Portable_Server::Cached_Policies::request_diffserv_codepoint ( CORBA::Long  diffserv_codepoint  ) 

Caches the request DiffServ codepoint that was set using a policy by the server application.

Definition at line 103 of file POA_Cached_Policies.inl.

References request_diffserv_codepoint_.

00105     {
00106       this->request_diffserv_codepoint_ = diffserv_codepoint;
00107     }

ACE_INLINE CORBA::Long TAO::Portable_Server::Cached_Policies::request_diffserv_codepoint ( void   )  const

Returns the request DiffServ codepoint that was set using a policy by the server application.

Definition at line 84 of file POA_Cached_Policies.inl.

References request_diffserv_codepoint_.

Referenced by TAO_Network_Priority_Hook::update_network_priority().

00085     {
00086       return this->request_diffserv_codepoint_;
00087     }

ACE_INLINE::PortableServer::RequestProcessingPolicyValue TAO::Portable_Server::Cached_Policies::request_processing ( void   )  const

Definition at line 48 of file POA_Cached_Policies.inl.

References request_processing_.

Referenced by update_policy().

00049     {
00050       return this->request_processing_;
00051     }

ACE_INLINE::PortableServer::ServantRetentionPolicyValue TAO::Portable_Server::Cached_Policies::servant_retention ( void   )  const

Definition at line 42 of file POA_Cached_Policies.inl.

References servant_retention_.

Referenced by update_policy().

00043     {
00044       return this->servant_retention_;
00045     }

ACE_INLINE void TAO::Portable_Server::Cached_Policies::server_priority ( CORBA::Short  priority  ) 

Definition at line 72 of file POA_Cached_Policies.inl.

References server_priority_.

00073     {
00074       this->server_priority_ = priority;
00075     }

ACE_INLINE CORBA::Short TAO::Portable_Server::Cached_Policies::server_priority ( void   )  const

Definition at line 60 of file POA_Cached_Policies.inl.

References server_priority_.

Referenced by TAO_Root_POA::server_priority().

00061     {
00062       return this->server_priority_;
00063     }

ACE_INLINE::PortableServer::ThreadPolicyValue TAO::Portable_Server::Cached_Policies::thread ( void   )  const

Definition at line 12 of file POA_Cached_Policies.inl.

References thread_.

Referenced by update_policy().

00013     {
00014       return this->thread_;
00015     }

void TAO::Portable_Server::Cached_Policies::update ( TAO_POA_Policy_Set policy_set  ) 

Update the cached policy values.

Definition at line 49 of file POA_Cached_Policies.cpp.

References TAO_POA_Policy_Set::get_policy_by_index(), TAO_POA_Policy_Set::num_policies(), and update_policy().

Referenced by TAO_Root_POA::TAO_Root_POA().

00051     {
00052       for (CORBA::ULong i = 0; i < policy_set.num_policies (); i++)
00053         {
00054           CORBA::Policy_var policy = policy_set.get_policy_by_index (i);
00055 
00056           this->update_policy (policy.in ()
00057                               );
00058         }
00059     }

void TAO::Portable_Server::Cached_Policies::update_policy ( const CORBA::Policy_ptr  policy  )  [protected]

Helper method to update a particular policy.

Definition at line 62 of file POA_Cached_Policies.cpp.

References id_assignment(), id_assignment_, id_uniqueness(), id_uniqueness_, implicit_activation(), implicit_activation_, CORBA::is_nil(), lifespan(), lifespan_, request_processing(), request_processing_, servant_retention(), servant_retention_, thread(), and thread_.

Referenced by update().

00064     {
00065 
00066     #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00067       ::PortableServer::ThreadPolicy_var thread
00068         = ::PortableServer::ThreadPolicy::_narrow (policy
00069                                                   );
00070 
00071       if (!CORBA::is_nil (thread.in ()))
00072         {
00073           this->thread_ = thread->value ();
00074 
00075           return;
00076         }
00077     #endif /* TAO_HAS_MINIMUM_POA == 0 */
00078 
00079     #if !defined (CORBA_E_MICRO)
00080       ::PortableServer::LifespanPolicy_var lifespan
00081         = ::PortableServer::LifespanPolicy::_narrow (policy
00082                                                     );
00083 
00084       if (!CORBA::is_nil (lifespan.in ()))
00085         {
00086           this->lifespan_ = lifespan->value ();
00087 
00088           return;
00089         }
00090     #endif
00091 
00092     #if !defined (CORBA_E_MICRO)
00093       ::PortableServer::IdUniquenessPolicy_var id_uniqueness
00094         = ::PortableServer::IdUniquenessPolicy::_narrow (policy
00095                                                         );
00096 
00097       if (!CORBA::is_nil (id_uniqueness.in ()))
00098         {
00099           this->id_uniqueness_ = id_uniqueness->value ();
00100 
00101           return;
00102         }
00103     #endif
00104 
00105     #if !defined (CORBA_E_MICRO)
00106       ::PortableServer::IdAssignmentPolicy_var id_assignment
00107         = ::PortableServer::IdAssignmentPolicy::_narrow (policy
00108                                                         );
00109 
00110       if (!CORBA::is_nil (id_assignment.in ()))
00111         {
00112           this->id_assignment_ = id_assignment->value ();
00113 
00114           return;
00115         }
00116     #endif
00117 
00118     #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00119 
00120       ::PortableServer::ImplicitActivationPolicy_var implicit_activation
00121         = ::PortableServer::ImplicitActivationPolicy::_narrow (policy
00122                                                               );
00123 
00124       if (!CORBA::is_nil (implicit_activation.in ()))
00125         {
00126           this->implicit_activation_ = implicit_activation->value ();
00127 
00128           return;
00129         }
00130 
00131       ::PortableServer::ServantRetentionPolicy_var servant_retention
00132         = ::PortableServer::ServantRetentionPolicy::_narrow (policy
00133                                                             );
00134 
00135       if (!CORBA::is_nil (servant_retention.in ()))
00136         {
00137           this->servant_retention_ = servant_retention->value ();
00138 
00139           return;
00140         }
00141 
00142       ::PortableServer::RequestProcessingPolicy_var request_processing
00143         = ::PortableServer::RequestProcessingPolicy::_narrow (policy
00144                                                              );
00145 
00146       if (!CORBA::is_nil (request_processing.in ()))
00147         {
00148           this->request_processing_ = request_processing->value ();
00149 
00150           return;
00151         }
00152 
00153     #endif /* TAO_HAS_MINIMUM_POA == 0 */
00154 
00155     #if defined (CORBA_E_MICRO)
00156       ACE_UNUSED_ARG (policy);
00157     #endif
00158     }


Member Data Documentation

::PortableServer::IdAssignmentPolicyValue TAO::Portable_Server::Cached_Policies::id_assignment_ [protected]

Definition at line 130 of file POA_Cached_Policies.h.

Referenced by id_assignment(), and update_policy().

::PortableServer::IdUniquenessPolicyValue TAO::Portable_Server::Cached_Policies::id_uniqueness_ [protected]

Definition at line 128 of file POA_Cached_Policies.h.

Referenced by id_uniqueness(), and update_policy().

::PortableServer::ImplicitActivationPolicyValue TAO::Portable_Server::Cached_Policies::implicit_activation_ [protected]

Definition at line 132 of file POA_Cached_Policies.h.

Referenced by implicit_activation(), and update_policy().

::PortableServer::LifespanPolicyValue TAO::Portable_Server::Cached_Policies::lifespan_ [protected]

Definition at line 126 of file POA_Cached_Policies.h.

Referenced by lifespan(), and update_policy().

NetworkPriorityModel TAO::Portable_Server::Cached_Policies::network_priority_model_ [protected]

Definition at line 142 of file POA_Cached_Policies.h.

Referenced by network_priority_model().

PriorityModel TAO::Portable_Server::Cached_Policies::priority_model_ [protected]

Definition at line 138 of file POA_Cached_Policies.h.

Referenced by priority_model().

CORBA::Long TAO::Portable_Server::Cached_Policies::reply_diffserv_codepoint_ [protected]

Definition at line 146 of file POA_Cached_Policies.h.

Referenced by reply_diffserv_codepoint().

CORBA::Long TAO::Portable_Server::Cached_Policies::request_diffserv_codepoint_ [protected]

Definition at line 144 of file POA_Cached_Policies.h.

Referenced by request_diffserv_codepoint().

::PortableServer::RequestProcessingPolicyValue TAO::Portable_Server::Cached_Policies::request_processing_ [protected]

Definition at line 136 of file POA_Cached_Policies.h.

Referenced by request_processing(), and update_policy().

::PortableServer::ServantRetentionPolicyValue TAO::Portable_Server::Cached_Policies::servant_retention_ [protected]

Definition at line 134 of file POA_Cached_Policies.h.

Referenced by servant_retention(), and update_policy().

CORBA::Short TAO::Portable_Server::Cached_Policies::server_priority_ [protected]

Definition at line 140 of file POA_Cached_Policies.h.

Referenced by server_priority().

::PortableServer::ThreadPolicyValue TAO::Portable_Server::Cached_Policies::thread_ [protected]

Definition at line 124 of file POA_Cached_Policies.h.

Referenced by thread(), and update_policy().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:41:45 2010 for TAO_PortableServer by  doxygen 1.4.7