diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-02-02 17:16:51 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-02-02 17:16:51 +0000 |
commit | c4dde6e92dd0faa73c27fe5feb2be97652db1e83 (patch) | |
tree | 5a781d1e7905547ec35d90ab057f236be64064f1 | |
parent | a75f17f63f4e3083c703e51253159d1489f9c2c4 (diff) | |
download | ATCD-c4dde6e92dd0faa73c27fe5feb2be97652db1e83.tar.gz |
adding DS library
-rw-r--r-- | modules/TAO/tao/PortableServer/Network_Priority_Hook.cpp | 44 | ||||
-rw-r--r-- | modules/TAO/tao/PortableServer/Network_Priority_Hook.h | 64 |
2 files changed, 108 insertions, 0 deletions
diff --git a/modules/TAO/tao/PortableServer/Network_Priority_Hook.cpp b/modules/TAO/tao/PortableServer/Network_Priority_Hook.cpp new file mode 100644 index 00000000000..b60ec81d91f --- /dev/null +++ b/modules/TAO/tao/PortableServer/Network_Priority_Hook.cpp @@ -0,0 +1,44 @@ +// @(#) $Id$ + +#include "tao/PortableServer/Network_Priority_Hook.h" +#include "tao/PortableServer/Root_POA.h" +#include "tao/PortableServer/POA_Cached_Policies.h" + +ACE_RCSID(PortableServer, + Network_Priority_Hook, + "$Id$") + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +TAO_Network_Priority_Hook::~TAO_Network_Priority_Hook(void) +{ +} + +void +TAO_Network_Priority_Hook::update_network_priority ( + TAO_Root_POA &poa, TAO_POA_Policy_Set &) +{ + poa.cached_policies ().network_priority_model + (TAO::Portable_Server::Cached_Policies::NO_NETWORK_PRIORITY); + poa.cached_policies ().reply_diffserv_codepoint (0); + poa.cached_policies ().request_diffserv_codepoint (0); +} + + +int +TAO_Network_Priority_Hook::initialize (void) +{ + return ACE_Service_Config::process_directive + (ace_svc_desc_TAO_Network_Priority_Hook); +} + +TAO_END_VERSIONED_NAMESPACE_DECL + +ACE_FACTORY_DEFINE (TAO_PortableServer, TAO_Network_Priority_Hook) +ACE_STATIC_SVC_DEFINE (TAO_Network_Priority_Hook, + ACE_TEXT ("TAO_Network_Priority_Hook"), + ACE_SVC_OBJ_T, + &ACE_SVC_NAME (TAO_Network_Priority_Hook), + ACE_Service_Type::DELETE_THIS + | ACE_Service_Type::DELETE_OBJ, + 0) diff --git a/modules/TAO/tao/PortableServer/Network_Priority_Hook.h b/modules/TAO/tao/PortableServer/Network_Priority_Hook.h new file mode 100644 index 00000000000..6e3db4cf31f --- /dev/null +++ b/modules/TAO/tao/PortableServer/Network_Priority_Hook.h @@ -0,0 +1,64 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file Network_Priority_Hook.h + * + * $Id$ + * + * Provides default network priority hook for use by the POA + * + * @author Jaiganesh Balasubramanian <jai@dre.vanderbilt.edu> + * @author Johnny Willemsen <jwillemsen@remedy.nl> + */ +//============================================================================= + + +#ifndef TAO_NETWORK_PRIORITY_HOOK_H +#define TAO_NETWORK_PRIORITY_HOOK_H + +#include /**/ "ace/pre.h" + +#include "portableserver_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/Versioned_Namespace.h" +#include "tao/orbconf.h" +#include "ace/Service_Object.h" +#include "ace/Service_Config.h" + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +class TAO_POA_Policy_Set; +class TAO_Root_POA; + +class TAO_PortableServer_Export TAO_Network_Priority_Hook + : public ACE_Service_Object +{ +public: + virtual ~TAO_Network_Priority_Hook(void); + + virtual void update_network_priority (TAO_Root_POA& poa, + TAO_POA_Policy_Set& poa_policy_set); + + /// Static initializer ensures the factory is loaded + static int initialize (void); + +}; + + +static int +TAO_Requires_Network_Priority_Hook = +TAO_Network_Priority_Hook::initialize (); + +TAO_END_VERSIONED_NAMESPACE_DECL + +ACE_STATIC_SVC_DECLARE (TAO_Network_Priority_Hook) +ACE_FACTORY_DECLARE (TAO_PortableServer, TAO_Network_Priority_Hook) + +#include /**/ "ace/post.h" + +#endif /* TAO_NETWORK_PRIORITY_HOOK_H */ |