00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file DiffServ_Network_Priority_Hook.h 00006 * 00007 * $Id: DiffServ_Network_Priority_Hook.h 84281 2009-01-30 15:01:17Z wotte $ 00008 * 00009 * @author Jaiganesh Balasubramanian <jai@dre.vanderbilt.edu> 00010 * Johnny Willemsen <jwillemsen@remedy.nl> 00011 */ 00012 //============================================================================= 00013 00014 #ifndef TAO_DIFFSERV_NETWORK_PRIORITY_HOOK_H 00015 #define TAO_DIFFSERV_NETWORK_PRIORITY_HOOK_H 00016 00017 #include /**/ "ace/pre.h" 00018 #include "ace/Service_Config.h" 00019 00020 #include "tao/DiffServPolicy/DiffServPolicy_Export.h" 00021 00022 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00023 # pragma once 00024 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00025 00026 #include "tao/PortableServer/Network_Priority_Hook.h" 00027 00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00029 00030 class TAO_DiffServPolicy_Export TAO_DiffServ_Network_Priority_Hook 00031 : public TAO_Network_Priority_Hook 00032 { 00033 public: 00034 virtual ~TAO_DiffServ_Network_Priority_Hook(void); 00035 00036 /// This function is a hook, that is called from the Root_POA's 00037 /// constructor. It allows the POA to cache the server side network 00038 /// priority policy, so that it can be used for sending replies with the 00039 /// policy-specified DiffServ codepoint. 00040 /// 00041 void update_network_priority (TAO_Root_POA &poa, 00042 TAO_POA_Policy_Set &poa_policy_set); 00043 00044 /// This function is a hook, that is used by the POA's servant dispatcher 00045 /// when it tries to assign DiffServ codepoints on the replies. 00046 /// 00047 void set_dscp_codepoint (TAO_ServerRequest &req, 00048 TAO_Root_POA &poa); 00049 }; 00050 00051 00052 ACE_STATIC_SVC_DECLARE_EXPORT (TAO_DiffServPolicy, 00053 TAO_DiffServ_Network_Priority_Hook) 00054 ACE_FACTORY_DECLARE (TAO_DiffServPolicy, TAO_DiffServ_Network_Priority_Hook) 00055 00056 TAO_END_VERSIONED_NAMESPACE_DECL 00057 00058 00059 #include /**/ "ace/post.h" 00060 00061 #endif /* TAO_DIFFSERV_NETWORK_PRIORITY_HOOK_H */