From 22f83ef755c2dea1094a933b65a16378bd93fee5 Mon Sep 17 00:00:00 2001 From: bala Date: Tue, 14 Mar 2000 17:28:05 +0000 Subject: *** empty log message *** --- TAO/tao/GIOP_Message_Acceptors.cpp | 2 + TAO/tao/GIOP_Message_Acceptors.h | 11 ++++- TAO/tao/GIOP_Message_Connectors.cpp | 82 ++++++++++++++----------------------- TAO/tao/GIOP_Message_Connectors.h | 6 --- TAO/tao/Pluggable_Messaging_Utils.h | 1 + 5 files changed, 44 insertions(+), 58 deletions(-) diff --git a/TAO/tao/GIOP_Message_Acceptors.cpp b/TAO/tao/GIOP_Message_Acceptors.cpp index d6bfdbc529a..7a41d9a3944 100644 --- a/TAO/tao/GIOP_Message_Acceptors.cpp +++ b/TAO/tao/GIOP_Message_Acceptors.cpp @@ -54,6 +54,8 @@ TAO_GIOP_Message_Acceptors:: // Get the revision info TAO_GIOP_Version version (this->major_version (), this->minor_version ()); + + // This will extract the request header, set // and as appropriate. diff --git a/TAO/tao/GIOP_Message_Acceptors.h b/TAO/tao/GIOP_Message_Acceptors.h index 8d3caa9e084..030b0b3e63c 100644 --- a/TAO/tao/GIOP_Message_Acceptors.h +++ b/TAO/tao/GIOP_Message_Acceptors.h @@ -100,16 +100,25 @@ private: CORBA::Octet def_minor); TAO_GIOP_Message_Accept_State *accept_state_; + // This indicates the strategy that we are using for this request TAO_GIOP_Message_Accept_Impl implementations_; + // Different strategies that we know - TAO_OutputCDR output_; // The output CDR stream char repbuf_[ACE_CDR::DEFAULT_BUFSIZE]; // A buffer that we will use to initialise the CDR stream + // Quoting Carlos, + // Remember that the same connection could receive multiple + // requests concurrently. Currently the ORB cannot do this, but we + // want to do it in the future.... + + // The above will not work for the case that Carlos mentions, but + // till then we can have it here. This gets us better performance. + //////////////////////////////////////////////////// // Inherited methods. Should not be here in the first place? //////////////////////////////////////////////////// diff --git a/TAO/tao/GIOP_Message_Connectors.cpp b/TAO/tao/GIOP_Message_Connectors.cpp index b32f4124252..9689e86ba85 100644 --- a/TAO/tao/GIOP_Message_Connectors.cpp +++ b/TAO/tao/GIOP_Message_Connectors.cpp @@ -10,52 +10,6 @@ # include "tao/GIOP_Message_Connectors.i" #endif /* __ACE_INLINE__ */ -CORBA::Boolean -TAO_GIOP_Message_Connectors:: - write_request_header (const TAO_Operation_Details &opdetails, - TAO_Target_Specification & /*spec*/, - TAO_OutputCDR &msg) -{ - // Adding only stuff that are common to all versions of GIOP. - // @@ Note: If at any stage we feel that this amount of granularity - // for factorisation is not important we can dispense with it - // anyway. - - // First the request id - msg << opdetails.request_id (); - - const CORBA::Octet response_flags = opdetails.response_flags (); - - // @@ (JP) Temporary hack until all of GIOP 1.2 is implemented. - if (response_flags == 131) - msg << CORBA::Any::from_octet (1); - - // Second the response flags - // Sync scope - ignored by server if request is not oneway. - else if (response_flags == CORBA::Octet (TAO::SYNC_WITH_TRANSPORT) || - response_flags == CORBA::Octet (TAO::SYNC_NONE) || - response_flags == CORBA::Octet (TAO::SYNC_EAGER_BUFFERING) || - response_flags == CORBA::Octet (TAO::SYNC_DELAYED_BUFFERING)) - // No response required. - msg << CORBA::Any::from_octet (0); - - else if (response_flags == CORBA::Octet (TAO::SYNC_WITH_SERVER)) - // Return before dispatching servant. We're also setting the high - // bit here. This is a temporary fix until the rest of GIOP 1.2 is - // implemented in TAO. - msg << CORBA::Any::from_octet (129); - - else if (response_flags == CORBA::Octet (TAO::SYNC_WITH_TARGET)) - // Return after dispatching servant. - msg << CORBA::Any::from_octet (3); - - else - // Until more flags are defined by the OMG. - return 0; - - return 1; -} - int TAO_GIOP_Message_Connectors:: parse_reply (TAO_Message_State_Factory &mesg_state, @@ -161,11 +115,37 @@ TAO_GIOP_Message_Connector_11:: // This is sepecific to GIOP 1.1. So put them here msg << opdetails.service_info (); - // Let us call our parent class to check what he can do for - // us. - TAO_GIOP_Message_Connectors::write_request_header (opdetails, - spec, - msg); + // First the request id + msg << opdetails.request_id (); + + const CORBA::Octet response_flags = opdetails.response_flags (); + + // @@ (JP) Temporary hack until all of GIOP 1.2 is implemented. + if (response_flags == 131) + msg << CORBA::Any::from_octet (1); + + // Second the response flags + // Sync scope - ignored by server if request is not oneway. + else if (response_flags == CORBA::Octet (TAO::SYNC_WITH_TRANSPORT) || + response_flags == CORBA::Octet (TAO::SYNC_NONE) || + response_flags == CORBA::Octet (TAO::SYNC_EAGER_BUFFERING) || + response_flags == CORBA::Octet (TAO::SYNC_DELAYED_BUFFERING)) + // No response required. + msg << CORBA::Any::from_octet (0); + + else if (response_flags == CORBA::Octet (TAO::SYNC_WITH_SERVER)) + // Return before dispatching servant. We're also setting the high + // bit here. This is a temporary fix until the rest of GIOP 1.2 is + // implemented in TAO. + msg << CORBA::Any::from_octet (129); + + else if (response_flags == CORBA::Octet (TAO::SYNC_WITH_TARGET)) + // Return after dispatching servant. + msg << CORBA::Any::from_octet (3); + + else + // Until more flags are defined by the OMG. + return 0; // In this case we cannot recognise anything other than the Object // key as the address disposition variable. But we do a sanity check diff --git a/TAO/tao/GIOP_Message_Connectors.h b/TAO/tao/GIOP_Message_Connectors.h index 6fb7c757459..977d2e3f68b 100644 --- a/TAO/tao/GIOP_Message_Connectors.h +++ b/TAO/tao/GIOP_Message_Connectors.h @@ -32,12 +32,6 @@ class TAO_Export TAO_GIOP_Message_Connectors: // class. protected: - virtual CORBA::Boolean - write_request_header (const TAO_Operation_Details &opdetails, - TAO_Target_Specification &spec, - TAO_OutputCDR &msg); - // Write the GIOP request header. - int parse_reply (TAO_Message_State_Factory &mesg_state, TAO_Pluggable_Connector_Params ¶ms); // Parse the reply message from the server diff --git a/TAO/tao/Pluggable_Messaging_Utils.h b/TAO/tao/Pluggable_Messaging_Utils.h index f40d0158e94..a01bce36619 100644 --- a/TAO/tao/Pluggable_Messaging_Utils.h +++ b/TAO/tao/Pluggable_Messaging_Utils.h @@ -18,6 +18,7 @@ // ============================================================================ #ifndef TAO_PLUGGABLE_MESSAGING_UTILS_H #define TAO_PLUGGABLE_MESSAGING_UTILS_H +#include "tao/IOPC.h" class TAO_Export TAO_Pluggable_Connector_Params { -- cgit v1.2.1