diff options
-rw-r--r-- | TAO/tao/GIOP_Message_Base.cpp | 19 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Base.h | 16 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser.h | 5 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser_10.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser_10.h | 17 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser_12.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser_12.h | 17 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Lite.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Lite.h | 12 | ||||
-rw-r--r-- | TAO/tao/Pluggable_Messaging.h | 6 | ||||
-rw-r--r-- | TAO/tao/Pluggable_Messaging_Utils.cpp | 16 | ||||
-rw-r--r-- | TAO/tao/Pluggable_Messaging_Utils.h | 41 | ||||
-rw-r--r-- | TAO/tao/Pluggable_Messaging_Utils.i | 18 | ||||
-rw-r--r-- | TAO/tao/TAO_Server_Request.cpp | 6 |
15 files changed, 118 insertions, 69 deletions
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index d564b85ff37..1c545e48c7f 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -131,8 +131,10 @@ TAO_GIOP_Message_Base::generate_locate_request_header ( } int -TAO_GIOP_Message_Base::generate_reply_header (TAO_OutputCDR &cdr, - TAO_Pluggable_Reply_Params ¶ms) +TAO_GIOP_Message_Base::generate_reply_header ( + TAO_OutputCDR &cdr, + TAO_Pluggable_Reply_Params_Base ¶ms + ) { // Write the GIOP header first if (!this->write_protocol_header (TAO_GIOP_REPLY, @@ -409,9 +411,11 @@ TAO_GIOP_Message_Base::process_reply_message ( } int -TAO_GIOP_Message_Base::generate_exception_reply (TAO_OutputCDR &cdr, - TAO_Pluggable_Reply_Params ¶ms, - CORBA::Exception &x) +TAO_GIOP_Message_Base::generate_exception_reply ( + TAO_OutputCDR &cdr, + TAO_Pluggable_Reply_Params_Base ¶ms, + CORBA::Exception &x + ) { // A new try/catch block, but if something goes wrong now we have no // hope, just abort. @@ -447,6 +451,7 @@ TAO_GIOP_Message_Base::write_protocol_header (TAO_GIOP_Message_Type t, TAO_OutputCDR &msg) { // Reset the message type + // Reset the message type msg.reset (); CORBA::Octet header[12] = @@ -1043,7 +1048,7 @@ TAO_GIOP_Message_Base::send_reply_exception ( orb_core->to_iso8859 (), orb_core->to_unicode ()); - TAO_Pluggable_Reply_Params reply_params (orb_core); + TAO_Pluggable_Reply_Params_Base reply_params; reply_params.request_id_ = request_id; reply_params.svc_ctx_.length (0); @@ -1143,7 +1148,7 @@ TAO_GIOP_Message_Base::dump_msg (const char *label, int TAO_GIOP_Message_Base::generate_locate_reply_header ( TAO_OutputCDR & /*cdr*/, - TAO_Pluggable_Reply_Params & /*params*/) + TAO_Pluggable_Reply_Params_Base & /*params*/) { return 0; } diff --git a/TAO/tao/GIOP_Message_Base.h b/TAO/tao/GIOP_Message_Base.h index 3936fd09912..04ebd504701 100644 --- a/TAO/tao/GIOP_Message_Base.h +++ b/TAO/tao/GIOP_Message_Base.h @@ -67,12 +67,14 @@ public: virtual int generate_locate_request_header ( TAO_Operation_Details &op, TAO_Target_Specification &spec, - TAO_OutputCDR &cdr); + TAO_OutputCDR &cdr + ); /// Write the reply header virtual int generate_reply_header ( TAO_OutputCDR &cdr, - TAO_Pluggable_Reply_Params ¶ms); + TAO_Pluggable_Reply_Params_Base ¶ms + ); /// This method reads the message on the connection. Returns 0 when /// there is short read on the connection. Returns 1 when the full @@ -110,13 +112,15 @@ public: /// Parse the reply message that we received and return the reply /// information though <reply_info> virtual int process_reply_message ( - TAO_Pluggable_Reply_Params &reply_info); + TAO_Pluggable_Reply_Params &reply_info + ); /// Generate a reply message with the exception <ex>. virtual int generate_exception_reply ( TAO_OutputCDR &cdr, - TAO_Pluggable_Reply_Params ¶ms, - CORBA::Exception &x); + TAO_Pluggable_Reply_Params_Base ¶ms, + CORBA::Exception &x + ); private: @@ -172,7 +176,7 @@ private: /// Write the locate reply header virtual int generate_locate_reply_header ( TAO_OutputCDR & /*cdr*/, - TAO_Pluggable_Reply_Params & /*params*/); + TAO_Pluggable_Reply_Params_Base & /*params*/); /// Is the messaging object ready for processing BiDirectional /// request/response? diff --git a/TAO/tao/GIOP_Message_Generator_Parser.cpp b/TAO/tao/GIOP_Message_Generator_Parser.cpp index fc431c2436b..0f3e7a21c5e 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser.cpp @@ -140,7 +140,7 @@ TAO_GIOP_Message_Generator_Parser::is_ready_for_bidirectional (void) void TAO_GIOP_Message_Generator_Parser::marshal_reply_status ( TAO_OutputCDR &output, - TAO_Pluggable_Reply_Params &reply + TAO_Pluggable_Reply_Params_Base &reply ) { switch (reply.reply_status_) diff --git a/TAO/tao/GIOP_Message_Generator_Parser.h b/TAO/tao/GIOP_Message_Generator_Parser.h index 037c42011ce..5363fca970c 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser.h +++ b/TAO/tao/GIOP_Message_Generator_Parser.h @@ -34,6 +34,7 @@ class TAO_Target_Specification; class TAO_OutputCDR; class TAO_InputCDR; class TAO_Pluggable_Reply_Params; +class TAO_Pluggable_Reply_Params_Base; class TAO_GIOP_Locate_Status_Msg; class TAO_GIOP_Locate_Request_Header; class TAO_Tagged_Profile; @@ -67,7 +68,7 @@ public: /// Write the reply header in to <output> virtual int write_reply_header ( TAO_OutputCDR &output, - TAO_Pluggable_Reply_Params &reply, + TAO_Pluggable_Reply_Params_Base &reply, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) = 0; @@ -106,7 +107,7 @@ protected: /// Marshall the reply status void marshal_reply_status (TAO_OutputCDR &output, - TAO_Pluggable_Reply_Params &reply); + TAO_Pluggable_Reply_Params_Base &reply); /// Unmarshals the received object key CORBA::Boolean unmarshall_object_key (TAO_ObjectKey &object_key, diff --git a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp index 6e733284895..22bc29161b5 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp @@ -116,7 +116,7 @@ TAO_GIOP_Message_Generator_Parser_10::write_locate_request_header ( int TAO_GIOP_Message_Generator_Parser_10::write_reply_header ( TAO_OutputCDR &output, - TAO_Pluggable_Reply_Params &reply, + TAO_Pluggable_Reply_Params_Base &reply, CORBA::Environment &ACE_TRY_ENV ) ACE_THROW_SPEC ((CORBA::SystemException)) diff --git a/TAO/tao/GIOP_Message_Generator_Parser_10.h b/TAO/tao/GIOP_Message_Generator_Parser_10.h index a9d336abd3e..ea2c2ab77af 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_10.h +++ b/TAO/tao/GIOP_Message_Generator_Parser_10.h @@ -45,26 +45,30 @@ public: virtual int write_request_header ( const TAO_Operation_Details &opdetails, TAO_Target_Specification &spec, - TAO_OutputCDR &msg); + TAO_OutputCDR &msg + ); /// Write the LocateRequest header virtual int write_locate_request_header ( CORBA::ULong request_id, TAO_Target_Specification &spec, - TAO_OutputCDR &msg); + TAO_OutputCDR &msg + ); /// Write the reply header in to <output> virtual int write_reply_header ( TAO_OutputCDR &output, - TAO_Pluggable_Reply_Params &reply, - CORBA::Environment &ACE_TRY_ENV) + TAO_Pluggable_Reply_Params_Base &reply, + CORBA::Environment &ACE_TRY_ENV + ) ACE_THROW_SPEC ((CORBA::SystemException)); /// Writes the locate _reply message in to the <output> virtual int write_locate_reply_mesg ( TAO_OutputCDR &output, CORBA::ULong request_id, - TAO_GIOP_Locate_Status_Msg &status); + TAO_GIOP_Locate_Status_Msg &status + ); /// Parse the Request Header from the incoming stream. This will do a /// version specific parsing of the incoming Request header @@ -73,7 +77,8 @@ public: /// Parse the LocateRequest Header from the incoming stream. This will do a /// version specific parsing of the incoming Request header virtual int parse_locate_header ( - TAO_GIOP_Locate_Request_Header &); + TAO_GIOP_Locate_Request_Header & + ); /// Parse the reply message from the server virtual int parse_reply (TAO_InputCDR &input, diff --git a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp index 31a8df6986a..4f6f5b054cb 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp @@ -130,7 +130,7 @@ TAO_GIOP_Message_Generator_Parser_12::write_locate_request_header ( int TAO_GIOP_Message_Generator_Parser_12::write_reply_header ( TAO_OutputCDR & output, - TAO_Pluggable_Reply_Params &reply, + TAO_Pluggable_Reply_Params_Base &reply, CORBA::Environment & /* ACE_TRY_ENV */ ) ACE_THROW_SPEC ((CORBA::SystemException)) diff --git a/TAO/tao/GIOP_Message_Generator_Parser_12.h b/TAO/tao/GIOP_Message_Generator_Parser_12.h index 58c4270b6bb..946037a35cf 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_12.h +++ b/TAO/tao/GIOP_Message_Generator_Parser_12.h @@ -47,26 +47,30 @@ public: virtual int write_request_header ( const TAO_Operation_Details &opdetails, TAO_Target_Specification &spec, - TAO_OutputCDR &msg); + TAO_OutputCDR &msg + ); /// Write the LocateRequest header virtual int write_locate_request_header ( CORBA::ULong request_id, TAO_Target_Specification &spec, - TAO_OutputCDR &msg); + TAO_OutputCDR &msg + ); /// Write the reply header in to <output> virtual int write_reply_header ( TAO_OutputCDR &output, - TAO_Pluggable_Reply_Params &reply, - CORBA::Environment &ACE_TRY_ENV) + TAO_Pluggable_Reply_Params_Base &reply, + CORBA::Environment &ACE_TRY_ENV + ) ACE_THROW_SPEC ((CORBA::SystemException)); /// Writes the locate _reply message in to the <output> virtual int write_locate_reply_mesg ( TAO_OutputCDR &output, CORBA::ULong request_id, - TAO_GIOP_Locate_Status_Msg &status); + TAO_GIOP_Locate_Status_Msg &status + ); /// Parse the Request Header from the incoming stream. This will do a /// version specific parsing of the incoming Request header @@ -75,7 +79,8 @@ public: /// Parse the LocateRequest Header from the incoming stream. This will do a /// version specific parsing of the incoming Request header virtual int parse_locate_header ( - TAO_GIOP_Locate_Request_Header &); + TAO_GIOP_Locate_Request_Header & + ); /// Parse the reply message virtual int parse_reply (TAO_InputCDR &input, diff --git a/TAO/tao/GIOP_Message_Lite.cpp b/TAO/tao/GIOP_Message_Lite.cpp index 2bb83b97795..4b324a13203 100644 --- a/TAO/tao/GIOP_Message_Lite.cpp +++ b/TAO/tao/GIOP_Message_Lite.cpp @@ -185,7 +185,7 @@ TAO_GIOP_Message_Lite::generate_locate_request_header ( int TAO_GIOP_Message_Lite::generate_reply_header ( TAO_OutputCDR &cdr, - TAO_Pluggable_Reply_Params ¶ms + TAO_Pluggable_Reply_Params_Base ¶ms ) { // Write the GIOPLite header first @@ -495,7 +495,7 @@ TAO_GIOP_Message_Lite::process_reply_message ( int TAO_GIOP_Message_Lite::generate_exception_reply ( TAO_OutputCDR &cdr, - TAO_Pluggable_Reply_Params ¶ms, + TAO_Pluggable_Reply_Params_Base ¶ms, CORBA::Exception &x ) { @@ -982,7 +982,7 @@ TAO_GIOP_Message_Lite::parse_reply (TAO_InputCDR &cdr, int TAO_GIOP_Message_Lite::write_reply_header ( TAO_OutputCDR &output, - TAO_Pluggable_Reply_Params &reply, + TAO_Pluggable_Reply_Params_Base &reply, CORBA::Environment & /* ACE_TRY_ENV */ ) ACE_THROW_SPEC ((CORBA::SystemException)) @@ -1446,7 +1446,7 @@ TAO_GIOP_Message_Lite::dump_msg (const char *label, int TAO_GIOP_Message_Lite::generate_locate_reply_header ( TAO_OutputCDR & /*cdr*/, - TAO_Pluggable_Reply_Params & /*params*/) + TAO_Pluggable_Reply_Params_Base & /*params*/) { return 0; } diff --git a/TAO/tao/GIOP_Message_Lite.h b/TAO/tao/GIOP_Message_Lite.h index 3bd155cc5ab..fa47b7849e9 100644 --- a/TAO/tao/GIOP_Message_Lite.h +++ b/TAO/tao/GIOP_Message_Lite.h @@ -70,7 +70,8 @@ public: /// Write the reply header virtual int generate_reply_header ( TAO_OutputCDR &cdr, - TAO_Pluggable_Reply_Params ¶ms); + TAO_Pluggable_Reply_Params_Base ¶ms + ); /// This method reads the message on the connection. Returns 0 when /// there is short read on the connection. Returns 1 when the full @@ -113,8 +114,9 @@ public: /// Generate a reply message with the exception <ex>. virtual int generate_exception_reply ( TAO_OutputCDR &cdr, - TAO_Pluggable_Reply_Params ¶ms, - CORBA::Exception &x); + TAO_Pluggable_Reply_Params_Base ¶ms, + CORBA::Exception &x + ); private: @@ -182,7 +184,7 @@ private: /// Write the locate reply header virtual int generate_locate_reply_header ( TAO_OutputCDR & /*cdr*/, - TAO_Pluggable_Reply_Params & /*params*/); + TAO_Pluggable_Reply_Params_Base & /*params*/); /// Is the messaging object ready for processing BiDirectional /// request/response? @@ -205,7 +207,7 @@ private: /// Write the reply header in to <output> int write_reply_header ( TAO_OutputCDR &output, - TAO_Pluggable_Reply_Params &reply, + TAO_Pluggable_Reply_Params_Base &reply, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); diff --git a/TAO/tao/Pluggable_Messaging.h b/TAO/tao/Pluggable_Messaging.h index 55d4a903517..eb8fda573b0 100644 --- a/TAO/tao/Pluggable_Messaging.h +++ b/TAO/tao/Pluggable_Messaging.h @@ -81,7 +81,7 @@ public: */ virtual int generate_reply_header ( TAO_OutputCDR &cdr, - TAO_Pluggable_Reply_Params ¶ms) = 0; + TAO_Pluggable_Reply_Params_Base ¶ms) = 0; /** * Write the locate reply header @@ -91,7 +91,7 @@ public: */ virtual int generate_locate_reply_header ( TAO_OutputCDR &cdr, - TAO_Pluggable_Reply_Params ¶ms) = 0; + TAO_Pluggable_Reply_Params_Base ¶ms) = 0; /** * This method reads the message on the connection. Returns 0 when @@ -133,7 +133,7 @@ public: /// Generate a reply message with the exception <ex>. virtual int generate_exception_reply ( TAO_OutputCDR &cdr, - TAO_Pluggable_Reply_Params ¶ms, + TAO_Pluggable_Reply_Params_Base ¶ms, CORBA::Exception &x) = 0; /// Is the messaging object ready for processing BiDirectional diff --git a/TAO/tao/Pluggable_Messaging_Utils.cpp b/TAO/tao/Pluggable_Messaging_Utils.cpp index 30155e37afb..d954c8299b3 100644 --- a/TAO/tao/Pluggable_Messaging_Utils.cpp +++ b/TAO/tao/Pluggable_Messaging_Utils.cpp @@ -8,17 +8,13 @@ ACE_RCSID(tao, Pluggable_Messaging_Utils, "$Id$") -TAO_Pluggable_Reply_Params::TAO_Pluggable_Reply_Params (TAO_ORB_Core *orb_core) - : svc_ctx_ () - , request_id_ (0) - , reply_status_ (0) - , is_dsi_ (0) - , dsi_nvlist_align_ (0) - , argument_flag_ (0) - , input_cdr_ (orb_core->create_input_cdr_data_block ( - ACE_CDR::DEFAULT_BUFSIZE), +TAO_Pluggable_Reply_Params::TAO_Pluggable_Reply_Params ( + TAO_ORB_Core *orb_core + ) + : input_cdr_ (orb_core->create_input_cdr_data_block ( + ACE_CDR::DEFAULT_BUFSIZE + ), TAO_ENCAP_BYTE_ORDER, orb_core) - , service_context_ (0) { } diff --git a/TAO/tao/Pluggable_Messaging_Utils.h b/TAO/tao/Pluggable_Messaging_Utils.h index 017b3f35383..63f0d756e57 100644 --- a/TAO/tao/Pluggable_Messaging_Utils.h +++ b/TAO/tao/Pluggable_Messaging_Utils.h @@ -27,18 +27,21 @@ #include "tao/CDR.h" /** - * @class TAO_Pluggable_Reply_Params + * @class TAO_Pluggable_Reply_Params_Base * - * @brief TAO_Pluggable_Connector_Params + * @brief TAO_Pluggable_Acceptor_Params * - * This represents a set of data that would be received by the - * connector from the acceptor. + * This represents a set of data that would be assembled by the + * acceptor to pass to the connector. This base class is used by + * TAO_ServerRequest. The child class TAO_Pluggable_Reply_Params + * is used on the client side, and contains an additional + * TAO_InputCDR member, not needed on the server side. */ -class TAO_Export TAO_Pluggable_Reply_Params +class TAO_Export TAO_Pluggable_Reply_Params_Base { public: /// Constructor. - TAO_Pluggable_Reply_Params (TAO_ORB_Core *orb_core); + TAO_Pluggable_Reply_Params_Base (void); /// The IOP service context list. IOP::ServiceContextList svc_ctx_; @@ -76,15 +79,31 @@ public: /// marshalled in the reply CORBA::Boolean argument_flag_; - /// The stream with the non-demarshalled reply. This stream will be - /// passed up to the stubs to demarshall the parameter values. - TAO_InputCDR input_cdr_; - -private: +protected: /// The service context list that we don't own. IOP::ServiceContextList *service_context_; }; +/** + * @class TAO_Pluggable_Reply_Params + * + * @brief TAO_Pluggable_Connector_Params + * + * This represents a set of data that would be received by the + * connector from the acceptor. + */ +class TAO_Export TAO_Pluggable_Reply_Params + : public TAO_Pluggable_Reply_Params_Base +{ +public: + /// Constructor. + TAO_Pluggable_Reply_Params (TAO_ORB_Core *orb_core); + + /// The stream with the non-demarshaled reply. This stream will be + /// passed up to the stubs to demarshal the parameter values. + TAO_InputCDR input_cdr_; +}; + // @@ Bala: this is a GIOPism too, there is no such thing as locate // request in HTTP (the basis for SOAP and XIOP), i don't know about // HTTP-NG, but i wouldn't be surprised if it had. Furthermore, some diff --git a/TAO/tao/Pluggable_Messaging_Utils.i b/TAO/tao/Pluggable_Messaging_Utils.i index bff1e9704c0..0aa88955e5d 100644 --- a/TAO/tao/Pluggable_Messaging_Utils.i +++ b/TAO/tao/Pluggable_Messaging_Utils.i @@ -2,16 +2,28 @@ //$Id$ - +ACE_INLINE +TAO_Pluggable_Reply_Params_Base::TAO_Pluggable_Reply_Params_Base (void) + : svc_ctx_ (), + request_id_ (0), + reply_status_ (0), + is_dsi_ (0), + dsi_nvlist_align_ (0), + argument_flag_ (0), + service_context_ (0) +{ +} ACE_INLINE void -TAO_Pluggable_Reply_Params::service_context_notowned (IOP::ServiceContextList *svc) +TAO_Pluggable_Reply_Params_Base::service_context_notowned ( + IOP::ServiceContextList *svc + ) { this->service_context_ = svc; } ACE_INLINE IOP::ServiceContextList & -TAO_Pluggable_Reply_Params::service_context_notowned (void) +TAO_Pluggable_Reply_Params_Base::service_context_notowned (void) { return *this->service_context_; } diff --git a/TAO/tao/TAO_Server_Request.cpp b/TAO/tao/TAO_Server_Request.cpp index 3eed1af8bc7..5441117ea4a 100644 --- a/TAO/tao/TAO_Server_Request.cpp +++ b/TAO/tao/TAO_Server_Request.cpp @@ -127,7 +127,7 @@ void TAO_ServerRequest::init_reply (void) { // Construct our reply generator. - TAO_Pluggable_Reply_Params reply_params (this->orb_core_); + TAO_Pluggable_Reply_Params_Base reply_params; // We put all the info that we have in to this <reply_params> and // call the <write_reply_header> in the @@ -185,7 +185,7 @@ void TAO_ServerRequest::send_no_exception_reply (void) { // Construct our reply generator. - TAO_Pluggable_Reply_Params reply_params (this->orb_core_); + TAO_Pluggable_Reply_Params_Base reply_params; reply_params.request_id_ = this->request_id_; reply_params.is_dsi_ = this->is_dsi_; reply_params.dsi_nvlist_align_ = this->dsi_nvlist_align_; @@ -249,7 +249,7 @@ TAO_ServerRequest::tao_send_reply_exception (CORBA::Exception &ex) if (this->response_expected_) { // A copy of the reply parameters - TAO_Pluggable_Reply_Params reply_params (this->orb_core_); + TAO_Pluggable_Reply_Params_Base reply_params; reply_params.request_id_ = this->request_id_; reply_params.svc_ctx_.length (0); |