diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-02-08 20:34:56 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-02-08 20:34:56 +0000 |
commit | c9fd43208f616606a90e17cc99b7b18a8cdad389 (patch) | |
tree | daf0d13062a592baf485752183f5911bed5bd377 | |
parent | ef6a55b8ab1fa7aa080336de70891b0e52def75d (diff) | |
download | ATCD-c9fd43208f616606a90e17cc99b7b18a8cdad389.tar.gz |
adding DS library
3 files changed, 31 insertions, 14 deletions
diff --git a/modules/TAO/tao/DiffServPolicy/DiffServ_Network_Priority_Hook.h b/modules/TAO/tao/DiffServPolicy/DiffServ_Network_Priority_Hook.h index 3989f5297f7..ad8e7c765b0 100644 --- a/modules/TAO/tao/DiffServPolicy/DiffServ_Network_Priority_Hook.h +++ b/modules/TAO/tao/DiffServPolicy/DiffServ_Network_Priority_Hook.h @@ -33,10 +33,18 @@ class TAO_DiffServPolicy_Export TAO_DiffServ_Network_Priority_Hook public: virtual ~TAO_DiffServ_Network_Priority_Hook(void); + /// This function is a hook, that is called from the Root_POA's + /// constructor. It allows the POA to cache the server side network + /// priority policy, so that it can be used for sending replies with the + /// policy-specified DiffServ codepoint. + /// void update_network_priority (TAO_Root_POA &poa, TAO_POA_Policy_Set &poa_policy_set); - void get_dscp_codepoint (TAO_ServerRequest &req, + /// This function is a hook, that is used by the POA's servant dispatcher + /// when it tries to assign DiffServ codepoints on the replies. + /// + void set_dscp_codepoint (TAO_ServerRequest &req, TAO_Root_POA &poa); }; diff --git a/modules/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.cpp b/modules/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.cpp index 5f16249942c..690db81764b 100644 --- a/modules/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.cpp +++ b/modules/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.cpp @@ -16,7 +16,6 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_DS_Network_Priority_Protocols_Hooks:: TAO_DS_Network_Priority_Protocols_Hooks (void) : orb_core_ (0) - , dscp_codepoint_ () { } @@ -77,13 +76,6 @@ TAO_DS_Network_Priority_Protocols_Hooks::add_rep_np_service_context_hook ( service_context.set_context (IOP::REP_NWPRIORITY, cdr); } -void -TAO_DS_Network_Priority_Protocols_Hooks::set_dscp_codepoint ( - CORBA::Long dscp_codepoint) -{ - this->dscp_codepoint_ = dscp_codepoint; -} - const CORBA::Long TAO_DS_Network_Priority_Protocols_Hooks::get_dscp_codepoint ( TAO_Service_Context &sc) diff --git a/modules/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.h b/modules/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.h index b0282048bc8..20471e00304 100644 --- a/modules/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.h +++ b/modules/TAO/tao/DiffServPolicy/DiffServ_Protocols_Hooks.h @@ -39,19 +39,38 @@ public: /// Destructor virtual ~TAO_DS_Network_Priority_Protocols_Hooks (void); - /// Initialize the protocols hooks instance. + /// Initialize the network priority protocols hooks instance. void init_hooks (TAO_ORB_Core *orb_core); + /// This function is used by the client side ORB to figure out + /// the DiffServ codepoint that needs to be added to the request + /// to be sent to the server. + /// const CORBA::Long get_dscp_codepoint (TAO_Stub *stub, CORBA::Object *object); + /// This function is used by the server side to figure out the + /// DiffServ codepoint that is attached and sent as part of the + /// service context of the request from the client side. + /// Specifically, when CLIENT_PROPAGATED networ priority model + /// is followed, the clients sent the DiffServ codepoint, they + /// want the server to use in the reply, as a service context + /// entry in the request. + /// const CORBA::Long get_dscp_codepoint (TAO_Service_Context &sc); - void set_dscp_codepoint (CORBA::Long dscp_codepoint); - + /// This function is called from the ORB_Core to add + /// network priority policy specific information on the request + /// service context. Specifically, when CLIENT_PROPAGATED network + /// priority model is used, the DiffServ codepoint that needs to be used + /// by the server side in the reply, is specified as a service context + /// entry, just like how RT-CORBA's CLIENT_PROPAGATED priority model works. + /// void np_service_context (TAO_Stub *stub, TAO_Service_Context &service_context, CORBA::Boolean restart); + /// Helper function that is used by the np_service_context () method. + /// void add_rep_np_service_context_hook ( TAO_Service_Context &service_context, CORBA::Long &dscp_codepoint); @@ -59,8 +78,6 @@ public: protected: TAO_ORB_Core *orb_core_; - - CORBA::Long dscp_codepoint_; }; TAO_END_VERSIONED_NAMESPACE_DECL |