POA_Cached_Policies.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file POA_Cached_Policies.h
00006  *
00007  *  $Id: POA_Cached_Policies.h 77177 2007-02-16 17:01:50Z jai $
00008  *
00009  *   POA
00010  *
00011  *  @author  Irfan Pyarali
00012  */
00013 //=============================================================================
00014 
00015 #ifndef TAO_POA_CACHED_POLICIES_H
00016 #define TAO_POA_CACHED_POLICIES_H
00017 #include /**/ "ace/pre.h"
00018 
00019 #include "tao/PortableServer/portableserver_export.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #include "tao/PortableServer/ThreadPolicyC.h"
00026 #include "tao/PortableServer/LifespanPolicyC.h"
00027 #include "tao/PortableServer/IdUniquenessPolicyC.h"
00028 #include "tao/PortableServer/IdAssignmentPolicyC.h"
00029 #include "tao/PortableServer/ImplicitActivationPolicyC.h"
00030 #include "tao/PortableServer/ServantRetentionPolicyC.h"
00031 #include "tao/PortableServer/RequestProcessingPolicyC.h"
00032 
00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00034 
00035 // Forward references.
00036 class TAO_POA_Policy_Set;
00037 
00038 namespace TAO
00039 {
00040   namespace Portable_Server
00041   {
00042     class TAO_PortableServer_Export Cached_Policies
00043     {
00044     public:
00045 
00046       enum PriorityModel
00047       {
00048         CLIENT_PROPAGATED,
00049         SERVER_DECLARED,
00050         NOT_SPECIFIED
00051       };
00052 
00053       enum NetworkPriorityModel
00054       {
00055         CLIENT_PROPAGATED_NETWORK_PRIORITY,
00056         SERVER_DECLARED_NETWORK_PRIORITY,
00057         NO_NETWORK_PRIORITY
00058       };
00059 
00060       Cached_Policies ();
00061 
00062       ~Cached_Policies (void);
00063 
00064       /// Update the cached policy values.
00065       void update (TAO_POA_Policy_Set &policy_set
00066                   );
00067 
00068       /**
00069        * @name Accessor methods to cached values.
00070        */
00071       //@{
00072       ::PortableServer::ThreadPolicyValue thread (void) const;
00073       ::PortableServer::LifespanPolicyValue lifespan (void) const;
00074       ::PortableServer::IdUniquenessPolicyValue id_uniqueness (void) const;
00075       ::PortableServer::IdAssignmentPolicyValue id_assignment (void) const;
00076       ::PortableServer::ImplicitActivationPolicyValue implicit_activation (void) const;
00077       ::PortableServer::ServantRetentionPolicyValue servant_retention (void) const;
00078       ::PortableServer::RequestProcessingPolicyValue request_processing (void) const;
00079       PriorityModel priority_model (void) const;
00080       CORBA::Short server_priority (void) const;
00081 
00082       /// Returns the network priority model that was set using a policy
00083       /// by the server application.
00084       ///
00085       NetworkPriorityModel network_priority_model (void) const;
00086 
00087       /// Returns the request DiffServ codepoint that was set using a policy
00088       /// by the server application.
00089       ///
00090       CORBA::Long request_diffserv_codepoint (void) const;
00091 
00092       /// Returns the reply DiffServ codepoint that was set using a policy
00093       /// by the server application.
00094       ///
00095       CORBA::Long reply_diffserv_codepoint (void) const;
00096 
00097       /// Caches the network priority model that was set using a policy
00098       /// by the server application.
00099       ///
00100       void network_priority_model (
00101         NetworkPriorityModel network_priority_model);
00102 
00103       /// Caches the request DiffServ codepoint that was set using a policy
00104       /// by the server application.
00105       ///
00106       void request_diffserv_codepoint (CORBA::Long diffserv_codepoint);
00107 
00108       /// Caches the reply DiffServ codepoint that was set using a policy
00109       /// by the server application.
00110       ///
00111       void reply_diffserv_codepoint (CORBA::Long diffserv_codepoint);
00112 
00113       void priority_model (PriorityModel priority_model);
00114       void server_priority (CORBA::Short priority);
00115       void implicit_activation (::PortableServer::ImplicitActivationPolicyValue value);
00116       //@}
00117 
00118     protected:
00119 
00120       /// Helper method to update a particular policy.
00121       void update_policy (const CORBA::Policy_ptr policy
00122                          );
00123 
00124       ::PortableServer::ThreadPolicyValue thread_;
00125 
00126       ::PortableServer::LifespanPolicyValue lifespan_;
00127 
00128       ::PortableServer::IdUniquenessPolicyValue id_uniqueness_;
00129 
00130       ::PortableServer::IdAssignmentPolicyValue id_assignment_;
00131 
00132       ::PortableServer::ImplicitActivationPolicyValue implicit_activation_;
00133 
00134       ::PortableServer::ServantRetentionPolicyValue servant_retention_;
00135 
00136       ::PortableServer::RequestProcessingPolicyValue request_processing_;
00137 
00138       PriorityModel priority_model_;
00139 
00140       CORBA::Short server_priority_;
00141 
00142       NetworkPriorityModel network_priority_model_;
00143 
00144       CORBA::Long request_diffserv_codepoint_;
00145 
00146       CORBA::Long reply_diffserv_codepoint_;
00147     };
00148   }
00149 }
00150 
00151 TAO_END_VERSIONED_NAMESPACE_DECL
00152 
00153 #if defined (__ACE_INLINE__)
00154 # include "tao/PortableServer/POA_Cached_Policies.inl"
00155 #endif /* __ACE_INLINE__ */
00156 
00157 #include /**/ "ace/post.h"
00158 #endif /* TAO_POA_CACHED_POLICIES_H */

Generated on Tue Feb 2 17:40:54 2010 for TAO_PortableServer by  doxygen 1.4.7