diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-03-17 10:17:38 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-03-17 10:17:38 +0000 |
commit | e0df6a4970cb995d5fad1357c1d3179284c7466b (patch) | |
tree | 85106fba4304c6a62b1ed2b789de4747db2fa488 /TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp | |
parent | 9273aa201123e1335da1f305feb323247ee10d47 (diff) | |
download | ATCD-e0df6a4970cb995d5fad1357c1d3179284c7466b.tar.gz |
Tue Mar 17 10:09:22 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp:
* orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h:
* orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.h:
* orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp:
* orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h:
* tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp:
* tao/BiDir_GIOP/BiDir_Service_Context_Handler.h:
* tao/Codeset/Codeset_Manager_i.cpp:
* tao/Codeset/Codeset_Manager_i.h:
* tao/Codeset_Manager.h:
* tao/DiffServPolicy/DiffServ_Protocols_Hooks.cpp:
* tao/DiffServPolicy/DiffServ_Protocols_Hooks.h:
* tao/DiffServPolicy/DiffServ_Service_Context_Handler.cpp:
* tao/DiffServPolicy/DiffServ_Service_Context_Handler.h:
* tao/DiffServPolicy/DiffServPolicy_ORBInitializer.cpp:
* tao/GIOP_Message_Base.cpp:
* tao/IIOP_Transport.cpp:
* tao/IIOP_Transport.h:
* tao/IORManipulation/IORManip_IIOP_Filter.cpp:
* tao/LocateRequest_Invocation.cpp:
* tao/Makefile.am:
* tao/Network_Priority_Protocols_Hooks.h:
* tao/ORB_Core.cpp:
* tao/ORB_Core.h:
* tao/Protocols_Hooks.h:
* tao/Remote_Invocation.cpp:
* tao/Remote_Invocation.h:
* tao/RTCORBA/RT_Endpoint_Selector_Factory.h:
* tao/RTCORBA/RT_ORBInitializer.cpp:
* tao/RTCORBA/RT_Protocols_Hooks.cpp:
* tao/RTCORBA/RT_Protocols_Hooks.h:
* tao/RTCORBA/RT_Service_Context_Handler.cpp:
* tao/RTCORBA/RT_Service_Context_Handler.h:
* tao/RTCORBA/RT_Thread_Lane_Resources_Manager.h:
* tao/Service_Context_Handler.h:
* tao/Service_Context_Handler_Registry.cpp:
* tao/Service_Context_Handler_Registry.h:
* tao/Strategies/SCIOP_Transport.cpp:
* tao/Strategies/SCIOP_Transport.h:
* tao/Transport.cpp:
* tao/Transport.h:
* tao/TypeCodeFactory/TypeCodeFactory_i.cpp:
Refactored BiDir/Diffserv/RTCORBA/Codeset support. The service contexts are
now generated by the specific service context handlers. This way the
special RTCORBA/Diffserv hooks are removed from the code, generating
the service contexts is now a generic solution. In the near future
we will also rework the handling of those service contexts. The
generation of the BiDIR service context is now also moved out of the
specific transports
Diffstat (limited to 'TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp')
-rw-r--r-- | TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp b/TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp index 3a008c59d5f..244e89db3a7 100644 --- a/TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp +++ b/TAO/tao/BiDir_GIOP/BiDir_Service_Context_Handler.cpp @@ -9,6 +9,10 @@ ACE_RCSID (BiDir_GIOP, #include "tao/CDR.h" #include "tao/TAO_Server_Request.h" #include "tao/Transport.h" +#include "tao/ORB_Core.h" +#include "tao/GIOP_Message_Base.h" +#include "tao/Operation_Details.h" +#include "tao/Transport_Mux_Strategy.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -23,4 +27,32 @@ TAO_BiDIR_Service_Context_Handler::process_service_context ( return transport.tear_listen_point_list (cdr); } +int +TAO_BiDIR_Service_Context_Handler::generate_service_context ( + TAO_Stub *, + TAO_Transport& transport, + TAO_Operation_Details &opdetails, + TAO_Target_Specification &spec, + TAO_OutputCDR &msg) +{ + if (transport.orb_core ()->bidir_giop_policy () && + transport.messaging_object ()->is_ready_for_bidirectional (msg) && + transport.bidirectional_flag () < 0) + { + transport.set_bidir_context_info (opdetails); + + // Set the flag to 1 (i.e., originating side) + transport.bidirectional_flag (1); + + // At the moment we enable BiDIR giop we have to get a new + // request id to make sure that we follow the even/odd rule + // for request id's. We only need to do this when enabled + // it, after that the Transport Mux Strategy will make sure + // that the rule is followed + opdetails.request_id (transport.tms ()->request_id ()); + } + + return 0; +} + TAO_END_VERSIONED_NAMESPACE_DECL |