00001 // -*- C++ -*- 00002 00003 // =================================================================== 00004 /** 00005 * @file DiffServ_Protocols_Hooks.h 00006 * 00007 * $Id: DiffServ_Protocols_Hooks.h 84860 2009-03-17 10:17:38Z johnnyw $ 00008 * 00009 * @author Jaiganesh Balasubramanian <jai@dre.vanderbilt.edu> 00010 * Johnny Willemsen <jwillemsen@remedy.nl> 00011 */ 00012 // =================================================================== 00013 00014 #ifndef TAO_DIFFSERV_PROTOCOLS_HOOKS_H 00015 #define TAO_DIFFSERVT_PROTOCOLS_HOOKS_H 00016 00017 #include /**/ "ace/pre.h" 00018 00019 #include "tao/orbconf.h" 00020 00021 #include "tao/Network_Priority_Protocols_Hooks.h" 00022 #include "ace/Service_Config.h" 00023 #include "tao/DiffServPolicy/DiffServPolicy_Export.h" 00024 00025 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00026 # pragma once 00027 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00028 00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00030 00031 class TAO_DiffServPolicy_Export TAO_DS_Network_Priority_Protocols_Hooks 00032 : public TAO_Network_Priority_Protocols_Hooks 00033 { 00034 public: 00035 00036 /// Constructor 00037 TAO_DS_Network_Priority_Protocols_Hooks (void); 00038 00039 /// Destructor 00040 virtual ~TAO_DS_Network_Priority_Protocols_Hooks (void); 00041 00042 /// Initialize the network priority protocols hooks instance. 00043 void init_hooks (TAO_ORB_Core *orb_core); 00044 00045 /// This function is used by the client side ORB to figure out 00046 /// the DiffServ codepoint that needs to be added to the request 00047 /// to be sent to the server. 00048 /// 00049 CORBA::Long get_dscp_codepoint (TAO_Stub *stub, CORBA::Object *object); 00050 00051 /// This function is used by the server side to figure out the 00052 /// DiffServ codepoint that is attached and sent as part of the 00053 /// service context of the request from the client side. 00054 /// Specifically, when CLIENT_PROPAGATED networ priority model 00055 /// is followed, the clients sent the DiffServ codepoint, they 00056 /// want the server to use in the reply, as a service context 00057 /// entry in the request. 00058 /// 00059 CORBA::Long get_dscp_codepoint (TAO_Service_Context &sc); 00060 00061 protected: 00062 00063 TAO_ORB_Core *orb_core_; 00064 }; 00065 00066 00067 ACE_STATIC_SVC_DECLARE_EXPORT (TAO_DiffServPolicy, 00068 TAO_DS_Network_Priority_Protocols_Hooks) 00069 ACE_FACTORY_DECLARE (TAO_DiffServPolicy, 00070 TAO_DS_Network_Priority_Protocols_Hooks) 00071 TAO_END_VERSIONED_NAMESPACE_DECL 00072 00073 #include /**/ "ace/post.h" 00074 #endif /* TAO_DIFFSERV_PROTOCOLS_HOOKS_H */