diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-09-24 07:45:37 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-09-24 07:45:37 +0000 |
commit | 788f237feaaece0ddc56b9a46ecbcd22b163816d (patch) | |
tree | ad977c7c7b9c79040be3e02f040926b16ba6e6bb | |
parent | 38012ca062b866fc05069ec56d75f40c4824476f (diff) | |
download | ATCD-788f237feaaece0ddc56b9a46ecbcd22b163816d.tar.gz |
Mon Sep 24 07:43:15 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
46 files changed, 362 insertions, 529 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 0609a273d7e..b787821492b 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,57 @@ +Mon Sep 24 07:43:15 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp: + * tao/DynamicInterface/AMH_DSI_Response_Handler.cpp: + * tao/DynamicInterface/DII_Invocation_Adapter.cpp: + * tao/DynamicInterface/DII_Reply_Dispatcher.cpp: + * tao/DynamicInterface/Request.cpp: + * tao/DynamicInterface/Request.h: + * tao/DynamicInterface/Server_Request.cpp: + * tao/GIOP_Message_Base.cpp: + * tao/GIOP_Message_Base.h: + * tao/GIOP_Message_Generator_Parser.cpp: + * tao/GIOP_Message_Generator_Parser.h: + * tao/GIOP_Message_Generator_Parser_10.cpp: + * tao/GIOP_Message_Generator_Parser_12.cpp: + * tao/GIOP_Message_State.cpp: + * tao/GIOP_Message_State.h: + * tao/GIOP_Message_State.inl: + * tao/GIOP_Utils.h: + * tao/Invocation_Adapter.cpp: + * tao/LocateRequest_Invocation.cpp: + * tao/LocateRequest_Invocation.h: + * tao/LocateRequest_Invocation_Adapter.cpp: + * tao/LocateRequest_Invocation_Adapter.h: + * tao/Messaging/AMH_Response_Handler.cpp: + * tao/Messaging/AMH_Response_Handler.h: + * tao/Messaging/AMI_Arguments_Converter_Impl.cpp: + * tao/Messaging/Asynch_Invocation_Adapter.cpp: + * tao/Messaging/Asynch_Reply_Dispatcher.cpp: + * tao/PI_Server/ServerInterceptorAdapter.cpp: + * tao/PI_Server/ServerRequestInfo.cpp: + * tao/PI_Server/ServerRequestInfo.inl: + * tao/Pluggable_Messaging_Utils.cpp: + * tao/Pluggable_Messaging_Utils.h: + * tao/Pluggable_Messaging_Utils.inl: + * tao/PortableServer/Upcall_Wrapper.cpp: + * tao/Queued_Data.h: + * tao/Queued_Data.inl: + * tao/Reply_Dispatcher.cpp: + * tao/Reply_Dispatcher.h: + * tao/Reply_Dispatcher.inl: + * tao/Synch_Invocation.cpp: + * tao/Synch_Reply_Dispatcher.cpp: + * tao/TAO_Server_Request.cpp: + * tao/TAO_Server_Request.h: + * tao/TAO_Server_Request.inl: + * tao/Transport.cpp: + Use the in IDL defined enums for message type, reply status type and + locate status type. By making this a real enum the compiler can check + whether we handle all possible values in a switch statement and can + also check incorrect checks. As a result the code to convert between + the IDL enums and the TAO enums has been removed. Also changes in several + classes exception_type to reply_status, that is meant by that flag + Fri Sep 22 00:57:01 UTC 2007 Ossama Othman <ossama_othman at symantec dot com> * orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp (init_ORB): @@ -20,7 +74,7 @@ Fri Sep 22 00:21:47 UTC 2007 Ossama Othman <ossama_othman at symantec dot com> list since such use is not portable. Removed stray semi-colon. - + * tao/Tagged_Profile.inl (TAO_Tagged_Profile): Added missing initialization of "object_key_extracted_" member diff --git a/TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp b/TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp index 2fcf4df73b6..2176020836a 100644 --- a/TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp +++ b/TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp @@ -215,7 +215,7 @@ TAO::CSD::FW_Server_Request_Wrapper::clone (TAO_ServerRequest*& request) // TYPE: CORBA::ULong // ACTION: Primitive data type assignment. - clone_obj->exception_type_ = request->exception_type_; + clone_obj->reply_status_ = request->reply_status_; // TYPE: TAO_ORB_Core* // ACTION: Assuming that a shallow-copy is ok here. diff --git a/TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.cpp b/TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.cpp index 0cd4b617d69..093dcff9263 100644 --- a/TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.cpp +++ b/TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.cpp @@ -374,10 +374,10 @@ TAO_AMH_DSI_Response_Handler::gateway_exception_reply ( switch (reply_status) { case TAO_AMI_REPLY_USER_EXCEPTION: - this->exception_type_ = TAO_GIOP_USER_EXCEPTION; + this->reply_status_ = GIOP::USER_EXCEPTION; break; case TAO_AMI_REPLY_SYSTEM_EXCEPTION: - this->exception_type_ = TAO_GIOP_SYSTEM_EXCEPTION; + this->reply_status_ = GIOP::SYSTEM_EXCEPTION; break; // TODO: we don't handle location forward at this moment. @@ -419,10 +419,10 @@ TAO_AMH_DSI_Response_Handler::gateway_exception_reply ( { //case TAO_PLUGGABLE_MESSAGE_USER_EXCEPTION: case TAO_AMI_REPLY_USER_EXCEPTION: - this->exception_type_ = TAO_GIOP_USER_EXCEPTION; + this->reply_status_ = GIOP::USER_EXCEPTION; break; case TAO_AMI_REPLY_SYSTEM_EXCEPTION: - this->exception_type_ = TAO_GIOP_SYSTEM_EXCEPTION; + this->reply_status_ = GIOP::SYSTEM_EXCEPTION; break; // we don't handle location forward at this moment. diff --git a/TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp b/TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp index 907726faad9..744ff1a11f8 100644 --- a/TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp +++ b/TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp @@ -105,7 +105,7 @@ namespace TAO #if TAO_HAS_INTERCEPTORS == 1 CORBA::Boolean const permanent_forward = - (synch.reply_status() == TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD_PERM); + (synch.reply_status() == GIOP::LOCATION_FORWARD_PERM); #else CORBA::Boolean const permanent_forward = false; #endif diff --git a/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp index 550069d57e6..e7a9e8488ff 100644 --- a/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp +++ b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp @@ -36,7 +36,8 @@ TAO_DII_Deferred_Reply_Dispatcher::dispatch_reply ( if (params.input_cdr_ == 0) return -1; - this->reply_status_ = params.reply_status_; + this->reply_status_ = params.reply_status (); + this->locate_reply_status_ = params.locate_reply_status (); // Transfer the <params.input_cdr_>'s content to this->reply_cdr_ ACE_Data_Block *db = this->reply_cdr_.clone_from (*params.input_cdr_); @@ -110,7 +111,7 @@ TAO_DII_Deferred_Reply_Dispatcher::connection_closed (void) // Turn into an output CDR TAO_InputCDR cdr (out_cdr); - this->req_->handle_response (cdr, TAO_PLUGGABLE_MESSAGE_SYSTEM_EXCEPTION); + this->req_->handle_response (cdr, GIOP::SYSTEM_EXCEPTION); } catch (const ::CORBA::Exception& ex) { @@ -155,7 +156,8 @@ int TAO_DII_Asynch_Reply_Dispatcher::dispatch_reply ( TAO_Pluggable_Reply_Params ¶ms) { - this->reply_status_ = params.reply_status_; + this->reply_status_ = params.reply_status (); + this->locate_reply_status_ = params.locate_reply_status (); // Transfer the <params.input_cdr_>'s content to this->reply_cdr_ ACE_Data_Block *db = @@ -223,7 +225,7 @@ TAO_DII_Asynch_Reply_Dispatcher::connection_closed (void) CORBA::Request::_tao_reply_stub ( this->reply_cdr_, this->callback_, - TAO_PLUGGABLE_MESSAGE_SYSTEM_EXCEPTION); + GIOP::SYSTEM_EXCEPTION); } catch (const CORBA::Exception& ex) { diff --git a/TAO/tao/DynamicInterface/Request.cpp b/TAO/tao/DynamicInterface/Request.cpp index c0cc130e5d0..ef1043ba83a 100644 --- a/TAO/tao/DynamicInterface/Request.cpp +++ b/TAO/tao/DynamicInterface/Request.cpp @@ -329,7 +329,7 @@ CORBA::Request::poll_response (void) void CORBA::Request::handle_response (TAO_InputCDR &incoming, - CORBA::ULong reply_status) + GIOP::ReplyStatusType reply_status) { // If this request was created by a gateway, then result_ // and/or args_ are shared by a CORBA::ServerRequest, whose @@ -339,7 +339,7 @@ CORBA::Request::handle_response (TAO_InputCDR &incoming, switch (reply_status) { - case TAO_PLUGGABLE_MESSAGE_NO_EXCEPTION: + case GIOP::NO_EXCEPTION: if (this->result_ != 0) { // We can be sure that the impl is a TAO::Unknown_IDL_Type. @@ -359,10 +359,10 @@ CORBA::Request::handle_response (TAO_InputCDR &incoming, } break; - case TAO_PLUGGABLE_MESSAGE_USER_EXCEPTION: - case TAO_PLUGGABLE_MESSAGE_SYSTEM_EXCEPTION: - case TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD: - case TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD_PERM: + case GIOP::USER_EXCEPTION: + case GIOP::SYSTEM_EXCEPTION: + case GIOP::LOCATION_FORWARD: + case GIOP::LOCATION_FORWARD_PERM: default: // @@ (JP) Don't know what to do about any of these yet. ACE_ERROR ((LM_ERROR, diff --git a/TAO/tao/DynamicInterface/Request.h b/TAO/tao/DynamicInterface/Request.h index 372ed49d9ab..896d530c0da 100644 --- a/TAO/tao/DynamicInterface/Request.h +++ b/TAO/tao/DynamicInterface/Request.h @@ -34,6 +34,7 @@ #include "tao/ORB.h" #include "tao/Environment.h" #include "tao/CDR.h" +#include "tao/GIOPC.h" #include "tao/AnyTypeCode/NVList.h" #if defined (TAO_HAS_AMI) @@ -154,7 +155,7 @@ namespace CORBA //@} /// Callback method for deferred synchronous requests. - void handle_response (TAO_InputCDR &incoming, CORBA::ULong reply_status); + void handle_response (TAO_InputCDR &incoming, GIOP::ReplyStatusType reply_status); #if defined (TAO_HAS_AMI) /// The 'asychronous' send method. The object is a DSI based callback diff --git a/TAO/tao/DynamicInterface/Server_Request.cpp b/TAO/tao/DynamicInterface/Server_Request.cpp index 5b3f0a795c7..f5da3ed799e 100644 --- a/TAO/tao/DynamicInterface/Server_Request.cpp +++ b/TAO/tao/DynamicInterface/Server_Request.cpp @@ -132,7 +132,7 @@ CORBA::ServerRequest::set_exception (const CORBA::Any &value) CORBA::Any (value), CORBA::NO_MEMORY ()); - this->orb_server_request_.exception_type (TAO_GIOP_USER_EXCEPTION); + this->orb_server_request_.reply_status (GIOP::USER_EXCEPTION); } // This method will be utilized by the DSI servant to marshal outgoing @@ -146,12 +146,12 @@ CORBA::ServerRequest::dsi_marshal (void) return; } - if (this->orb_server_request_.exception_type () == TAO_GIOP_NO_EXCEPTION) + if (this->orb_server_request_.reply_status () == GIOP::NO_EXCEPTION) { // In DSI, we can't rely on the skeleton to do this. if (this->retval_ == 0 && this->params_ == 0) { - this->orb_server_request_.argument_flag (0); + this->orb_server_request_.argument_flag (false); } this->orb_server_request_.init_reply (); @@ -173,8 +173,8 @@ CORBA::ServerRequest::dsi_marshal (void) } else { - // This defaults to 1, but just to be safe... - this->orb_server_request_.argument_flag (1); + // This defaults to true, but just to be safe... + this->orb_server_request_.argument_flag (true); // Write the reply header to the ORB request's outgoing CDR stream. this->orb_server_request_.init_reply (); @@ -190,10 +190,10 @@ void CORBA::ServerRequest::gateway_exception_reply (ACE_CString &raw_exception) { // This defaults to 1, but just to be safe... - this->orb_server_request_.argument_flag (1); + this->orb_server_request_.argument_flag (true); // This reply path handles only user exceptions. - this->orb_server_request_.exception_type (TAO_GIOP_USER_EXCEPTION); + this->orb_server_request_.reply_status (GIOP::USER_EXCEPTION); this->orb_server_request_.init_reply (); diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index c181edba25d..f3721aeeeb6 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -73,7 +73,7 @@ TAO_GIOP_Message_Base::generate_request_header ( cdr.get_version (giop_version); // Write the GIOP header first - if (!this->write_protocol_header (TAO_GIOP_REQUEST, giop_version, cdr)) + if (!this->write_protocol_header (GIOP::Request, giop_version, cdr)) { if (TAO_debug_level) { @@ -116,7 +116,7 @@ TAO_GIOP_Message_Base::generate_locate_request_header ( this->get_parser (giop_version); // Write the GIOP header first - if (!this->write_protocol_header (TAO_GIOP_LOCATEREQUEST, giop_version, cdr)) + if (!this->write_protocol_header (GIOP::LocateRequest, giop_version, cdr)) { if (TAO_debug_level) ACE_ERROR ((LM_ERROR, @@ -151,7 +151,7 @@ TAO_GIOP_Message_Base::generate_reply_header ( cdr.get_version (giop_version); // Write the GIOP header first - if (!this->write_protocol_header (TAO_GIOP_REPLY, giop_version, cdr)) + if (!this->write_protocol_header (GIOP::Reply, giop_version, cdr)) { if (TAO_debug_level) ACE_ERROR ((LM_ERROR, @@ -208,7 +208,7 @@ TAO_GIOP_Message_Base::generate_fragment_header (TAO_OutputCDR & cdr, this->get_parser (giop_version); // Write the GIOP header first - if (!this->write_protocol_header (TAO_GIOP_FRAGMENT, giop_version, cdr) + if (!this->write_protocol_header (GIOP::Fragment, giop_version, cdr) || !generator_parser->write_fragment_header (cdr, request_id)) { if (TAO_debug_level) @@ -644,7 +644,7 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport, switch (qd->msg_type ()) { - case TAO_PLUGGABLE_MESSAGE_REQUEST: + case GIOP::Request: // Should be taken care by the state specific invocations. They // could raise an exception or write things in the output CDR // stream @@ -653,7 +653,7 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport, output, generator_parser); - case TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST: + case GIOP::LocateRequest: return this->process_locate_request (transport, input_cdr, output, @@ -706,12 +706,11 @@ TAO_GIOP_Message_Base::process_reply_message ( switch (qd->msg_type ()) { - case TAO_PLUGGABLE_MESSAGE_REPLY: + case GIOP::Reply: // Should be taken care by the state specific parsing retval = generator_parser->parse_reply (input_cdr, params); - break; - case TAO_PLUGGABLE_MESSAGE_LOCATEREPLY: + case GIOP::LocateReply: retval = generator_parser->parse_locate_reply (input_cdr, params); break; default: @@ -772,7 +771,7 @@ TAO_GIOP_Message_Base::generate_exception_reply ( } int -TAO_GIOP_Message_Base::write_protocol_header (TAO_GIOP_Message_Type type, +TAO_GIOP_Message_Base::write_protocol_header (GIOP::MsgType type, const TAO_GIOP_Message_Version &version, TAO_OutputCDR &msg) { @@ -795,7 +794,7 @@ TAO_GIOP_Message_Base::write_protocol_header (TAO_GIOP_Message_Type type, // "flags" octet, i.e. header[6] will be set up later when message // is formatted by the transport. - header[7] = CORBA::Octet (type); // Message type + header[7] = static_cast <CORBA::Octet> (type); // Message type static ACE_CDR::ULong const header_size = sizeof (header) / sizeof (header[0]); @@ -873,10 +872,10 @@ TAO_GIOP_Message_Base::process_request ( // We should forward to another object... TAO_Pluggable_Reply_Params_Base reply_params; reply_params.request_id_ = request_id; - reply_params.reply_status_ = + reply_params.reply_status ( permanent_forward_condition - ? TAO_GIOP_LOCATION_FORWARD_PERM - : TAO_GIOP_LOCATION_FORWARD; + ? GIOP::LOCATION_FORWARD_PERM + : GIOP::LOCATION_FORWARD); reply_params.svc_ctx_.length (0); // Send back the reply service context. @@ -1031,7 +1030,7 @@ TAO_GIOP_Message_Base::process_locate_request (TAO_Transport *transport, TAO_GIOP_Locate_Status_Msg status_info; // Defaulting. - status_info.status = TAO_GIOP_UNKNOWN_OBJECT; + status_info.status = GIOP::UNKNOWN_OBJECT; CORBA::Boolean response_required = true; @@ -1081,17 +1080,17 @@ TAO_GIOP_Message_Base::process_locate_request (TAO_Transport *transport, if (!CORBA::is_nil (forward_to.in ())) { - status_info.status = TAO_GIOP_OBJECT_FORWARD; + status_info.status = GIOP::OBJECT_FORWARD; status_info.forward_location_var = forward_to; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - TAO_GIOP_Message_Base::process_locate_request, ") ACE_TEXT ("called: forwarding\n"))); } - else if (server_request.exception_type () == TAO_GIOP_NO_EXCEPTION) + else if (server_request.reply_status () == GIOP::NO_EXCEPTION) { // We got no exception, so the object is here. - status_info.status = TAO_GIOP_OBJECT_HERE; + status_info.status = GIOP::OBJECT_HERE; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - TAO_GIOP_Message_Base::process_locate_request, ") @@ -1103,7 +1102,7 @@ TAO_GIOP_Message_Base::process_locate_request (TAO_Transport *transport, if (!CORBA::is_nil (status_info.forward_location_var.in ())) { - status_info.status = TAO_GIOP_OBJECT_FORWARD; + status_info.status = GIOP::OBJECT_FORWARD; ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - TAO_GIOP_Message_Base::process_locate_request, ") ACE_TEXT ("forwarding\n"))); @@ -1111,7 +1110,7 @@ TAO_GIOP_Message_Base::process_locate_request (TAO_Transport *transport, else { // Normal exception, so the object is not here - status_info.status = TAO_GIOP_UNKNOWN_OBJECT; + status_info.status = GIOP::UNKNOWN_OBJECT; ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - TAO_GIOP_Message_Base::process_locate_request, ") ACE_TEXT ("not here\n"))); @@ -1122,7 +1121,7 @@ TAO_GIOP_Message_Base::process_locate_request (TAO_Transport *transport, catch (const ::CORBA::Exception&) { // Normal exception, so the object is not here - status_info.status = TAO_GIOP_UNKNOWN_OBJECT; + status_info.status = GIOP::UNKNOWN_OBJECT; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - TAO_GIOP_Message_Base::process_locate_request, ") @@ -1131,7 +1130,7 @@ TAO_GIOP_Message_Base::process_locate_request (TAO_Transport *transport, catch (...) { // Normal exception, so the object is not here - status_info.status = TAO_GIOP_UNKNOWN_OBJECT; + status_info.status = GIOP::UNKNOWN_OBJECT; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) TAO_GIOP_Message_Base::process_locate_request - ") @@ -1158,7 +1157,7 @@ TAO_GIOP_Message_Base::make_send_locate_reply (TAO_Transport *transport, // Note here we are making the Locate reply header which is *QUITE* // different from the reply header made by the make_reply () call.. // Make the GIOP message header - this->write_protocol_header (TAO_GIOP_LOCATEREPLY, giop_version, output); + this->write_protocol_header (GIOP::LocateReply, giop_version, output); // This writes the header & body parser->write_locate_reply_mesg (output, @@ -1205,7 +1204,7 @@ TAO_GIOP_Message_Base::send_error (TAO_Transport *transport) (CORBA::Octet) 1, // Use the lowest GIOP version (CORBA::Octet) 0, TAO_ENCAP_BYTE_ORDER, - TAO_GIOP_MESSAGERROR, + GIOP::MessageError, 0, 0, 0, 0 }; @@ -1290,8 +1289,7 @@ TAO_GIOP_Message_Base::get_parser ( void TAO_GIOP_Message_Base:: send_close_connection (const TAO_GIOP_Message_Version &version, - TAO_Transport *transport, - void *) + TAO_Transport *transport) { // static CORBA::Octet // I hate this in every method. Till the time I figure out a way @@ -1307,7 +1305,7 @@ TAO_GIOP_Message_Base:: version.major, version.minor, TAO_ENCAP_BYTE_ORDER, - TAO_GIOP_CLOSECONNECTION, + GIOP::CloseConnection, 0, 0, 0, 0 }; @@ -1387,11 +1385,13 @@ TAO_GIOP_Message_Base::send_reply_exception ( // this). reply_params.service_context_notowned (svc_info); - reply_params.reply_status_ = TAO_GIOP_USER_EXCEPTION; - if (CORBA::SystemException::_downcast (x) != 0) { - reply_params.reply_status_ = TAO_GIOP_SYSTEM_EXCEPTION; + reply_params.reply_status (GIOP::SYSTEM_EXCEPTION); + } + else + { + reply_params.reply_status (GIOP::USER_EXCEPTION); } if (this->generate_exception_reply (output, reply_params, *x) == -1) @@ -1441,9 +1441,9 @@ TAO_GIOP_Message_Base::dump_msg (const char *label, CORBA::ULong *id = &tmp; char *tmp_id = 0; - if (ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == TAO_GIOP_REQUEST || - ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == TAO_GIOP_REPLY || - ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == TAO_GIOP_FRAGMENT) + if (ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == GIOP::Request || + ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == GIOP::Reply || + ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == GIOP::Fragment) { if (major == 1 && minor < 2) { @@ -1618,8 +1618,8 @@ TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd, { switch (qd->msg_type ()) { - case TAO_PLUGGABLE_MESSAGE_REQUEST: - case TAO_PLUGGABLE_MESSAGE_REPLY: + case GIOP::Request: + case GIOP::Reply: { IOP::ServiceContextList service_context; @@ -1630,9 +1630,9 @@ TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd, } } break; - case TAO_PLUGGABLE_MESSAGE_CANCELREQUEST: - case TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST: - case TAO_PLUGGABLE_MESSAGE_LOCATEREPLY: + case GIOP::CancelRequest: + case GIOP::LocateRequest: + case GIOP::LocateReply: { if ((input_cdr >> request_id)) { @@ -1648,12 +1648,12 @@ TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd, { switch (qd->msg_type ()) { - case TAO_PLUGGABLE_MESSAGE_REQUEST: - case TAO_PLUGGABLE_MESSAGE_REPLY: - case TAO_PLUGGABLE_MESSAGE_FRAGMENT: - case TAO_PLUGGABLE_MESSAGE_CANCELREQUEST: - case TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST: - case TAO_PLUGGABLE_MESSAGE_LOCATEREPLY: + case GIOP::Request: + case GIOP::Reply: + case GIOP::Fragment: + case GIOP::CancelRequest: + case GIOP::LocateRequest: + case GIOP::LocateReply: { // Dealing with GIOP-1.2, the request-id is located directly // behind the GIOP-Header. This is true for all message @@ -1858,7 +1858,7 @@ TAO_GIOP_Message_Base::discard_fragmented_message (const TAO_Queued_Data *cancel if (head->giop_version ().major_version () == 1 && head->giop_version ().minor_version () <= 1 && - head->msg_type () != TAO_PLUGGABLE_MESSAGE_FRAGMENT && // GIOP11 fragment does not provide request id + head->msg_type () != GIOP::Fragment && // GIOP11 fragment does not provide request id this->parse_request_id (head, head_request_id) >= 0 && cancel_request_id == head_request_id) { diff --git a/TAO/tao/GIOP_Message_Base.h b/TAO/tao/GIOP_Message_Base.h index 3322de8656e..c486068cace 100644 --- a/TAO/tao/GIOP_Message_Base.h +++ b/TAO/tao/GIOP_Message_Base.h @@ -179,7 +179,7 @@ protected: /// Writes the GIOP header in to @a msg /// @note If the GIOP header happens to change in the future, we can /// push this method in to the generator_parser classes. - int write_protocol_header (TAO_GIOP_Message_Type t, + int write_protocol_header (GIOP::MsgType t, const TAO_GIOP_Message_Version& version, TAO_OutputCDR &msg); @@ -198,8 +198,7 @@ protected: /// Close a connection, first sending GIOP::CloseConnection. void send_close_connection (const TAO_GIOP_Message_Version &version, - TAO_Transport *transport, - void *ctx); + TAO_Transport *transport); /// We must send a LocateReply through @a transport, this request /// resulted in some kind of exception. diff --git a/TAO/tao/GIOP_Message_Generator_Parser.cpp b/TAO/tao/GIOP_Message_Generator_Parser.cpp index e50ddf43117..b33ed9ba70c 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser.cpp @@ -24,7 +24,6 @@ TAO_GIOP_Message_Generator_Parser::parse_reply ( TAO_InputCDR &stream, TAO_Pluggable_Reply_Params ¶ms) { - // Read the request id if (!stream.read_ulong (params.request_id_)) { @@ -52,53 +51,7 @@ TAO_GIOP_Message_Generator_Parser::parse_reply ( return -1; } - - // Pass the right Pluggable interface code to the transport layer - switch (rep_stat) - { - // Request completed successfully - case TAO_GIOP_NO_EXCEPTION: - params.reply_status_ = - TAO_PLUGGABLE_MESSAGE_NO_EXCEPTION; - break; - - // Request terminated with user exception - case TAO_GIOP_USER_EXCEPTION: - params.reply_status_ = - TAO_PLUGGABLE_MESSAGE_USER_EXCEPTION; - break; - // Request terminated with system exception - case TAO_GIOP_SYSTEM_EXCEPTION: - params.reply_status_ = - TAO_PLUGGABLE_MESSAGE_SYSTEM_EXCEPTION; - break; - // Reply is a location forward type - case TAO_GIOP_LOCATION_FORWARD: - params.reply_status_ = - TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD; - break; - // Reply is a location forward perm type - // LOCATION_FORWARD_PERM is only allowed in context of - // FaultTolerant featured requests and requires PortableGroup - // features in forwarded object and service context - case TAO_GIOP_LOCATION_FORWARD_PERM: - params.reply_status_ = - TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD_PERM; - break; - // Reply is a location forward type - case TAO_GIOP_NEEDS_ADDRESSING_MODE: - params.reply_status_ = - TAO_PLUGGABLE_MESSAGE_NEEDS_ADDRESSING_MODE; - break; - default: - if (TAO_debug_level > 0) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("TAO (%P|%t) : TAO_GIOP_Message_Generator_Parser::parse_reply, ") - ACE_TEXT ("Unknown reply status \n"))); - } - return -1; - } + params.reply_status (static_cast <GIOP::ReplyStatusType> (rep_stat)); return 0; } @@ -120,22 +73,24 @@ TAO_GIOP_Message_Generator_Parser::parse_locate_reply ( return -1; } - // and the reply status type. status can be NO_EXCEPTION, - // SYSTEM_EXCEPTION, USER_EXCEPTION, LOCATION_FORWARD - // LOCATION_FORWARD_PERM + // and the locate reply status type. status can be UNKNOWN_OBJECT, + // OBJECT_HERE, OBJECT_FORWARD, OBJECT_FORWARD_PERM + // LOC_SYSTEM_EXCEPTION, LOC_NEEDS_ADDRESSING_MODE // Please note here that we are NOT converting to the Pluggable // messaging layer exception as this is GIOP specific. Not many // messaging protocols have the locate_* messages. - if (!cdr.read_ulong (params.reply_status_)) + CORBA::ULong locate_reply_status; + if (!cdr.read_ulong (locate_reply_status)) { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, ACE_TEXT ("TAO N|(%P|%t|l) parse_locate_reply, ") - ACE_TEXT ("extracting reply status\n"))); + ACE_TEXT ("extracting locate reply status\n"))); return -1; } + params.locate_reply_status (static_cast <GIOP::LocateStatusType> (locate_reply_status)); return 0; @@ -147,30 +102,4 @@ TAO_GIOP_Message_Generator_Parser::is_ready_for_bidirectional (void) const return false; } -void -TAO_GIOP_Message_Generator_Parser::marshal_reply_status ( - TAO_OutputCDR &output, - TAO_Pluggable_Reply_Params_Base &reply) -{ - switch (reply.reply_status_) - { - case TAO_PLUGGABLE_MESSAGE_NO_EXCEPTION: - output.write_ulong (TAO_GIOP_NO_EXCEPTION); - break; - case TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD: - output.write_ulong (TAO_GIOP_LOCATION_FORWARD); - break; - case TAO_PLUGGABLE_MESSAGE_SYSTEM_EXCEPTION: - output.write_ulong (TAO_GIOP_SYSTEM_EXCEPTION); - break; - case TAO_PLUGGABLE_MESSAGE_USER_EXCEPTION: - output.write_ulong (TAO_GIOP_USER_EXCEPTION); - break; - default: - // Some other specific exception - output.write_ulong (reply.reply_status_); - break; - } -} - TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/GIOP_Message_Generator_Parser.h b/TAO/tao/GIOP_Message_Generator_Parser.h index 2bb432ebf57..a12eaa4cc83 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser.h +++ b/TAO/tao/GIOP_Message_Generator_Parser.h @@ -105,13 +105,6 @@ public: /// The header length of a fragment virtual size_t fragment_header_length (void) const = 0; - -protected: - - /// Marshall the reply status - void marshal_reply_status (TAO_OutputCDR &output, - TAO_Pluggable_Reply_Params_Base &reply); - }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp index 4ab08d0f47d..3d002815733 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp @@ -263,8 +263,7 @@ TAO_GIOP_Message_Generator_Parser_10::write_reply_header ( output.write_ulong (reply.request_id_); // Write the reply status - this->marshal_reply_status (output, - reply); + output.write_ulong (reply.reply_status ()); return true; } @@ -280,7 +279,7 @@ TAO_GIOP_Message_Generator_Parser_10::write_locate_reply_mesg ( output.write_ulong (request_id); output.write_ulong (status_info.status); - if (status_info.status == TAO_GIOP_OBJECT_FORWARD) + if (status_info.status == GIOP::OBJECT_FORWARD) { CORBA::Object_ptr object_ptr = status_info.forward_location_var.in (); diff --git a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp index 29edcf603aa..871a8a24d50 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp @@ -120,23 +120,8 @@ TAO_GIOP_Message_Generator_Parser_12::write_reply_header ( // Write the request ID output.write_ulong (reply.request_id_); - // Write the reply status - if (reply.reply_status_ == - TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD_PERM) - { - // Not sure when we will use this. - output.write_ulong (TAO_GIOP_LOCATION_FORWARD_PERM); - } - else if (reply.reply_status_ == - TAO_PLUGGABLE_MESSAGE_NEEDS_ADDRESSING_MODE) - { - // Not sure when we will use this. - output.write_ulong (TAO_GIOP_LOC_NEEDS_ADDRESSING_MODE); - } - else - { - this->marshal_reply_status (output, reply); - } + // Write the reply status + output.write_ulong (reply.reply_status ()); if (!(output << reply.service_context_notowned ())) return false; @@ -181,10 +166,10 @@ TAO_GIOP_Message_Generator_Parser_12::write_locate_reply_mesg ( */ switch (status_info.status) { - case TAO_GIOP_OBJECT_FORWARD: + case GIOP::OBJECT_FORWARD: // More likely than not we will not have this in TAO - case TAO_GIOP_OBJECT_FORWARD_PERM: + case GIOP::OBJECT_FORWARD_PERM: { CORBA::Object_ptr object_ptr = status_info.forward_location_var.in (); @@ -202,8 +187,8 @@ TAO_GIOP_Message_Generator_Parser_12::write_locate_reply_mesg ( } } break; - case TAO_GIOP_LOC_SYSTEM_EXCEPTION: - case TAO_GIOP_LOC_NEEDS_ADDRESSING_MODE: + case GIOP::LOC_SYSTEM_EXCEPTION: + case GIOP::LOC_NEEDS_ADDRESSING_MODE: // Do we do these in TAO?? // What to do here???? I dont really know. I have to do a survey // of the specifications that uses this. @@ -365,8 +350,7 @@ TAO_GIOP_Message_Generator_Parser_12::parse_locate_reply ( TAO_InputCDR &cdr, TAO_Pluggable_Reply_Params ¶ms) { - if (TAO_GIOP_Message_Generator_Parser::parse_locate_reply (cdr, - params) == -1) + if (TAO_GIOP_Message_Generator_Parser::parse_locate_reply (cdr, params) == -1) return -1; diff --git a/TAO/tao/GIOP_Message_State.cpp b/TAO/tao/GIOP_Message_State.cpp index c401f774fec..63cffc1995d 100644 --- a/TAO/tao/GIOP_Message_State.cpp +++ b/TAO/tao/GIOP_Message_State.cpp @@ -57,13 +57,13 @@ TAO_GIOP_Message_State::parse_message_header_i (ACE_Message_Block &incoming) { switch (this->message_type_) { - case TAO_PLUGGABLE_MESSAGE_MESSAGERROR: - case TAO_PLUGGABLE_MESSAGE_CLOSECONNECTION: + case GIOP::MessageError: + case GIOP::CloseConnection: if (TAO_debug_level > 0) { char const * const which = - (this->message_type_ == TAO_PLUGGABLE_MESSAGE_CLOSECONNECTION) ? "CloseConnection" : - (this->message_type_ == TAO_PLUGGABLE_MESSAGE_MESSAGERROR) ? "MessageError" : "unknown"; + (this->message_type_ == GIOP::CloseConnection) ? "CloseConnection" : + (this->message_type_ == GIOP::MessageError) ? "MessageError" : "unknown"; ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - GIOP %s received \n"), which)); } @@ -81,48 +81,6 @@ TAO_GIOP_Message_State::parse_message_header_i (ACE_Message_Block &incoming) return 0; // success } -TAO_Pluggable_Message_Type -TAO_GIOP_Message_State::message_type (CORBA::Octet type) const -{ - // Convert to the right type of Pluggable Messaging message type. - - switch (type) - { - case TAO_GIOP_REQUEST: - return TAO_PLUGGABLE_MESSAGE_REQUEST; - case TAO_GIOP_LOCATEREQUEST: - return TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST; - - case TAO_GIOP_LOCATEREPLY: - return TAO_PLUGGABLE_MESSAGE_LOCATEREPLY; - - case TAO_GIOP_REPLY: - return TAO_PLUGGABLE_MESSAGE_REPLY; - - case TAO_GIOP_CLOSECONNECTION: - return TAO_PLUGGABLE_MESSAGE_CLOSECONNECTION; - - case TAO_GIOP_FRAGMENT: - return TAO_PLUGGABLE_MESSAGE_FRAGMENT; - - case TAO_GIOP_MESSAGERROR: - return TAO_PLUGGABLE_MESSAGE_MESSAGERROR; - - case TAO_GIOP_CANCELREQUEST: - return TAO_PLUGGABLE_MESSAGE_CANCELREQUEST; - - default: - if (TAO_debug_level > 0) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("TAO (%P|%t) %N:%l message_type : ") - ACE_TEXT ("wrong message.\n"))); - } - } - - return TAO_PLUGGABLE_MESSAGE_MESSAGERROR; -} - int TAO_GIOP_Message_State::parse_magic_bytes (char *buf) { diff --git a/TAO/tao/GIOP_Message_State.h b/TAO/tao/GIOP_Message_State.h index c4313aac833..125f914ca6b 100644 --- a/TAO/tao/GIOP_Message_State.h +++ b/TAO/tao/GIOP_Message_State.h @@ -25,7 +25,7 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/Pluggable_Messaging_Utils.h" +#include "tao/GIOPC.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -62,7 +62,7 @@ public: CORBA::Octet byte_order (void) const; /// Return the message type - TAO_Pluggable_Message_Type message_type (void) const; + GIOP::MsgType message_type (void) const; /// Return the more fragments CORBA::Octet more_fragments (void) const; @@ -77,7 +77,7 @@ private: int parse_message_header_i (ACE_Message_Block &incoming); /// Get the message type. - TAO_Pluggable_Message_Type message_type (CORBA::Octet type) const; + GIOP::MsgType message_type (CORBA::Octet type) const; /// Checks for the magic word 'GIOP' in the start of the incoing /// stream @@ -108,7 +108,7 @@ private: CORBA::Octet byte_order_; /// MsgType above - TAO_Pluggable_Message_Type message_type_; + GIOP::MsgType message_type_; /// In byte_order! CORBA::ULong payload_size_; diff --git a/TAO/tao/GIOP_Message_State.inl b/TAO/tao/GIOP_Message_State.inl index e13f70dc94d..4556039c389 100644 --- a/TAO/tao/GIOP_Message_State.inl +++ b/TAO/tao/GIOP_Message_State.inl @@ -9,7 +9,7 @@ TAO_GIOP_Message_State::TAO_GIOP_Message_State (void) : giop_version_ (TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR), byte_order_ (0), - message_type_ (TAO_PLUGGABLE_MESSAGE_REQUEST), + message_type_ (GIOP::Request), payload_size_ (0), more_fragments_ (0) { @@ -33,7 +33,7 @@ TAO_GIOP_Message_State::byte_order (void) const return this->byte_order_; } -ACE_INLINE TAO_Pluggable_Message_Type +ACE_INLINE GIOP::MsgType TAO_GIOP_Message_State::message_type (void) const { return this->message_type_; @@ -57,4 +57,10 @@ TAO_GIOP_Message_State::giop_version (void) const return this->giop_version_; } +ACE_INLINE GIOP::MsgType +TAO_GIOP_Message_State::message_type (CORBA::Octet type) const +{ + return static_cast <GIOP::MsgType> (type); +} + TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/GIOP_Utils.h b/TAO/tao/GIOP_Utils.h index 50bb953f1c2..00e8f9c41de 100644 --- a/TAO/tao/GIOP_Utils.h +++ b/TAO/tao/GIOP_Utils.h @@ -20,6 +20,7 @@ #include /**/ "ace/pre.h" #include "tao/Object.h" +#include "tao/GIOPC.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -28,42 +29,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /** - * All GIOP messages include a header and message type. Not - * really a message type, but needed to bring that information - * back somehow. - */ -typedef enum GIOP_Messages -{ - // = GIOP message types. - TAO_GIOP_REQUEST = 0, // sent by client. - TAO_GIOP_REPLY = 1, // by server. - TAO_GIOP_CANCELREQUEST = 2, // by client. - TAO_GIOP_LOCATEREQUEST = 3, // by client. - TAO_GIOP_LOCATEREPLY = 4, - TAO_GIOP_CLOSECONNECTION = 5, // by both. - TAO_GIOP_MESSAGERROR = 6, // by both. - TAO_GIOP_FRAGMENT = 7 // by both. -} TAO_GIOP_Message_Type; - - -typedef enum GIOP_LocateStatusType -{ - TAO_GIOP_UNKNOWN_OBJECT, - TAO_GIOP_OBJECT_HERE, - TAO_GIOP_OBJECT_FORWARD, - TAO_GIOP_OBJECT_FORWARD_PERM, //GIOP1.2 - TAO_GIOP_LOC_SYSTEM_EXCEPTION, // GIOP1.2 - TAO_GIOP_LOC_NEEDS_ADDRESSING_MODE //GIOP 1.2 -}TAO_GIOP_Locate_Status_Type; - -/** * @class TAO_GIOP_Locate_Status_Msg * - * @brief Hold the relevant information for every type of Locate mesg. + * @brief Hold the relevant information for every type of Locate msg. * * This class is there to hold the relevant info for different * types of locate status messages. As on date we dont know much - * about other mesg types other than OBJECT_FORWARD. This clss can + * about other mesg types other than OBJECT_FORWARD. This class can * be clearly defined as time progresses. */ class TAO_Export TAO_GIOP_Locate_Status_Msg @@ -74,33 +46,9 @@ public: CORBA::Object_var forward_location_var; /// Stype of Locate status message - ///@@ Other mesg types. - TAO_GIOP_Locate_Status_Type status; + GIOP::LocateStatusType status; }; - -typedef enum GIOP_ReplyStatusType -{ - /// Request completed successfully - TAO_GIOP_NO_EXCEPTION, - - /// Request terminated with user exception - TAO_GIOP_USER_EXCEPTION, - - /// Request terminated with system exception - TAO_GIOP_SYSTEM_EXCEPTION, - - /// Reply is a location forward type - TAO_GIOP_LOCATION_FORWARD, - - /// GIOP 1.2, Reply is a location forward perm type.. - TAO_GIOP_LOCATION_FORWARD_PERM, - - /// GIOP1.2, - TAO_GIOP_NEEDS_ADDRESSING_MODE - -} TAO_GIOP_Reply_Status_Type; - TAO_END_VERSIONED_NAMESPACE_DECL #include /**/ "ace/post.h" diff --git a/TAO/tao/Invocation_Adapter.cpp b/TAO/tao/Invocation_Adapter.cpp index daf7505c027..9e5c3bf4da4 100644 --- a/TAO/tao/Invocation_Adapter.cpp +++ b/TAO/tao/Invocation_Adapter.cpp @@ -173,7 +173,7 @@ namespace TAO #if TAO_HAS_INTERCEPTORS == 1 CORBA::Boolean const is_permanent_forward = - (coll_inv.reply_status() == TAO_GIOP_LOCATION_FORWARD_PERM); + (coll_inv.reply_status() == GIOP::LOCATION_FORWARD_PERM); #else CORBA::Boolean const is_permanent_forward = false; #endif @@ -304,7 +304,7 @@ namespace TAO #if TAO_HAS_INTERCEPTORS == 1 CORBA::Boolean const is_permanent_forward = - (synch.reply_status() == TAO_GIOP_LOCATION_FORWARD_PERM); + (synch.reply_status() == GIOP::LOCATION_FORWARD_PERM); #else CORBA::Boolean const is_permanent_forward = false; #endif @@ -333,7 +333,7 @@ namespace TAO #if TAO_HAS_INTERCEPTORS == 1 CORBA::Boolean const is_permanent_forward = - (synch.reply_status() == TAO_GIOP_LOCATION_FORWARD_PERM); + (synch.reply_status() == GIOP::LOCATION_FORWARD_PERM); #else CORBA::Boolean const is_permanent_forward = false; #endif diff --git a/TAO/tao/LocateRequest_Invocation.cpp b/TAO/tao/LocateRequest_Invocation.cpp index 6611730e9a8..f489e8e52f1 100644 --- a/TAO/tao/LocateRequest_Invocation.cpp +++ b/TAO/tao/LocateRequest_Invocation.cpp @@ -101,17 +101,16 @@ namespace TAO // Set the translators this->resolver_.transport ()->assign_translators (&cdr, 0); - switch (rd.reply_status ()) + switch (rd.locate_reply_status ()) { - case TAO_GIOP_OBJECT_HERE: + case GIOP::OBJECT_HERE: break; - case TAO_GIOP_UNKNOWN_OBJECT: + case GIOP::UNKNOWN_OBJECT: throw ::CORBA::OBJECT_NOT_EXIST (TAO::VMCID, CORBA::COMPLETED_YES); - case TAO_GIOP_OBJECT_FORWARD: - case TAO_GIOP_OBJECT_FORWARD_PERM: + case GIOP::OBJECT_FORWARD: + case GIOP::OBJECT_FORWARD_PERM: return this->location_forward (cdr); - - case TAO_GIOP_LOC_SYSTEM_EXCEPTION: + case GIOP::LOC_SYSTEM_EXCEPTION: { // Pull the exception from the stream. CORBA::String_var buf; @@ -127,7 +126,7 @@ namespace TAO // but if it does, we turn it into a CORBA::UNKNOWN exception. throw ::CORBA::UNKNOWN (TAO::VMCID, CORBA::COMPLETED_YES); } - case TAO_GIOP_LOC_NEEDS_ADDRESSING_MODE: + case GIOP::LOC_NEEDS_ADDRESSING_MODE: { // We have received an exception with a request to change the // addressing mode. First let us read the mode that the diff --git a/TAO/tao/LocateRequest_Invocation.h b/TAO/tao/LocateRequest_Invocation.h index 1a8d5713133..a8162e669b6 100644 --- a/TAO/tao/LocateRequest_Invocation.h +++ b/TAO/tao/LocateRequest_Invocation.h @@ -37,7 +37,7 @@ namespace TAO * @brief Object created by TAO::LocateRequest_Invocation_Adapter to * create and send LocateRequest invocation. */ - class TAO_Export LocateRequest_Invocation + class LocateRequest_Invocation : public Synch_Twoway_Invocation { public: diff --git a/TAO/tao/LocateRequest_Invocation_Adapter.cpp b/TAO/tao/LocateRequest_Invocation_Adapter.cpp index 5057b2542f7..df9fbaf8aa3 100644 --- a/TAO/tao/LocateRequest_Invocation_Adapter.cpp +++ b/TAO/tao/LocateRequest_Invocation_Adapter.cpp @@ -80,7 +80,7 @@ namespace TAO #if TAO_HAS_INTERCEPTORS == 1 CORBA::Boolean const is_permanent_forward = - (synch.reply_status() == TAO_GIOP_LOCATION_FORWARD_PERM); + (synch.reply_status() == GIOP::LOCATION_FORWARD_PERM); #else CORBA::Boolean const is_permanent_forward = false; #endif diff --git a/TAO/tao/LocateRequest_Invocation_Adapter.h b/TAO/tao/LocateRequest_Invocation_Adapter.h index d4fde4a0901..4300d8aa19e 100644 --- a/TAO/tao/LocateRequest_Invocation_Adapter.h +++ b/TAO/tao/LocateRequest_Invocation_Adapter.h @@ -55,7 +55,7 @@ namespace TAO * collocated. Looks like there are no ways to utilize the * opportunity that may have been presented. */ - class TAO_Export LocateRequest_Invocation_Adapter + class LocateRequest_Invocation_Adapter { public: LocateRequest_Invocation_Adapter (CORBA::Object_ptr target); diff --git a/TAO/tao/Messaging/AMH_Response_Handler.cpp b/TAO/tao/Messaging/AMH_Response_Handler.cpp index 15a56085556..3ce088b7df1 100644 --- a/TAO/tao/Messaging/AMH_Response_Handler.cpp +++ b/TAO/tao/Messaging/AMH_Response_Handler.cpp @@ -18,13 +18,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_AMH_Response_Handler::TAO_AMH_Response_Handler () - : exception_type_ (TAO_GIOP_NO_EXCEPTION) + : reply_status_ (GIOP::NO_EXCEPTION) , mesg_base_ (0) , request_id_ (0) , transport_ (0) , orb_core_ (0) , argument_flag_ (1) - , reply_status_ (TAO_RS_UNINITIALIZED) + , rh_reply_status_ (TAO_RS_UNINITIALIZED) , allocator_ (0) { } @@ -46,7 +46,7 @@ TAO_AMH_Response_Handler::~TAO_AMH_Response_Handler (void) // If the ResponseHandler is being destroyed before a reply has // been sent to the client, we send a system exception // CORBA::NO_RESPONSE, with minor code to indicate the problem. - if (this->reply_status_ == TAO_RS_SENT) + if (this->rh_reply_status_ == TAO_RS_SENT) { return; } @@ -86,7 +86,7 @@ TAO_AMH_Response_Handler::_tao_rh_init_reply (void) { { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (this->reply_status_ != TAO_RS_UNINITIALIZED) + if (this->rh_reply_status_ != TAO_RS_UNINITIALIZED) { // Looks like someone is trying to call an AMH method // more than once @@ -108,15 +108,7 @@ TAO_AMH_Response_Handler::_tao_rh_init_reply (void) reply_params.request_id_ = this->request_id_; reply_params.service_context_notowned (&(this->reply_service_context_.service_info ())); reply_params.argument_flag_ = this->argument_flag_; - - if (this->exception_type_ == TAO_GIOP_NO_EXCEPTION) - { - reply_params.reply_status_ = TAO_PLUGGABLE_MESSAGE_NO_EXCEPTION; - } - else - { - reply_params.reply_status_ = this->exception_type_; - } + reply_params.reply_status (this->reply_status_); { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); @@ -124,7 +116,7 @@ TAO_AMH_Response_Handler::_tao_rh_init_reply (void) this->mesg_base_->generate_reply_header (this->_tao_out, reply_params); // We are done initialising the reply - this->reply_status_ = TAO_RS_INITIALIZED; + this->rh_reply_status_ = TAO_RS_INITIALIZED; } } @@ -137,7 +129,7 @@ TAO_AMH_Response_Handler::_tao_rh_send_reply (void) // If the reply has not been initialised, raise an exception to the // server-app saying it is not doing something right. - if (this->reply_status_ != TAO_RS_INITIALIZED) + if (this->rh_reply_status_ != TAO_RS_INITIALIZED) { throw ::CORBA::BAD_INV_ORDER ( CORBA::SystemException::_tao_minor_code ( @@ -145,7 +137,7 @@ TAO_AMH_Response_Handler::_tao_rh_send_reply (void) ENOTSUP), CORBA::COMPLETED_YES); } - this->reply_status_ = TAO_RS_SENDING; + this->rh_reply_status_ = TAO_RS_SENDING; } // Send the message. @@ -169,7 +161,7 @@ TAO_AMH_Response_Handler::_tao_rh_send_reply (void) { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - this->reply_status_ = TAO_RS_SENT; + this->rh_reply_status_ = TAO_RS_SENT; } } @@ -178,7 +170,7 @@ TAO_AMH_Response_Handler::_tao_rh_send_exception (const CORBA::Exception &ex) { { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - if (this->reply_status_ != TAO_RS_UNINITIALIZED) + if (this->rh_reply_status_ != TAO_RS_UNINITIALIZED) { throw ::CORBA::BAD_INV_ORDER ( CORBA::SystemException::_tao_minor_code ( @@ -186,20 +178,25 @@ TAO_AMH_Response_Handler::_tao_rh_send_exception (const CORBA::Exception &ex) ENOTSUP), CORBA::COMPLETED_YES); } - this->reply_status_ = TAO_RS_SENDING; + this->rh_reply_status_ = TAO_RS_SENDING; } TAO_Pluggable_Reply_Params_Base reply_params; reply_params.request_id_ = this->request_id_; reply_params.svc_ctx_.length (0); reply_params.service_context_notowned (&this->reply_service_context_.service_info ()); - reply_params.argument_flag_ = 1; - reply_params.reply_status_ = TAO_GIOP_USER_EXCEPTION; + reply_params.argument_flag_ = true; // @@ It appears as if there should be a more efficient way to do // this: the caller already knows this because it is part of the // ExceptionHolder information. if (CORBA::SystemException::_downcast (&ex)) - reply_params.reply_status_ = TAO_GIOP_SYSTEM_EXCEPTION; + { + reply_params.reply_status (GIOP::SYSTEM_EXCEPTION); + } + else + { + reply_params.reply_status (GIOP::USER_EXCEPTION); + } if (this->mesg_base_->generate_exception_reply (this->_tao_out, reply_params, @@ -220,7 +217,7 @@ TAO_AMH_Response_Handler::_tao_rh_send_exception (const CORBA::Exception &ex) { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); - this->reply_status_ = TAO_RS_SENT; + this->rh_reply_status_ = TAO_RS_SENT; } } diff --git a/TAO/tao/Messaging/AMH_Response_Handler.h b/TAO/tao/Messaging/AMH_Response_Handler.h index 2a7c7732230..6731503368e 100644 --- a/TAO/tao/Messaging/AMH_Response_Handler.h +++ b/TAO/tao/Messaging/AMH_Response_Handler.h @@ -20,6 +20,7 @@ #include "tao/CDR.h" #include "tao/LocalObject.h" #include "tao/Buffer_Allocator_T.h" +#include "tao/GIOPC.h" #include "ace/Synch_Traits.h" #include "ace/Thread_Mutex.h" #include "ace/Null_Mutex.h" @@ -116,13 +117,8 @@ protected: */ TAO_OutputCDR _tao_out; - // TAO_GIOP_ReplyStatusType exception_type_; - /// Exception type (will be NO_EXCEPTION in the majority of the - /// cases). - // @@ Mayur: I do not think we need this one, we can deduce the type - // of reply depending on the _tao_rh_*() method called. - CORBA::ULong exception_type_; - + /// Reply status (will be NO_EXCEPTION in the majority of the + GIOP::ReplyStatusType reply_status_; private: @@ -165,14 +161,15 @@ private: * the states are used not only in implementing the 'once-only semantics of * RHs, but in making sure well the call thread-safe as well. */ - enum Reply_Status + enum RH_Reply_Status { TAO_RS_UNINITIALIZED, TAO_RS_INITIALIZED, TAO_RS_SENDING, TAO_RS_SENT }; - Reply_Status reply_status_; + RH_Reply_Status rh_reply_status_; + // I would use the "state pattern".. // Carlos, Isn't that an overkill? // @@ Mayur: it depends on what form of the "State Pattern" you diff --git a/TAO/tao/Messaging/AMI_Arguments_Converter_Impl.cpp b/TAO/tao/Messaging/AMI_Arguments_Converter_Impl.cpp index 6d5fc89d3c6..144ff7ed9f4 100644 --- a/TAO/tao/Messaging/AMI_Arguments_Converter_Impl.cpp +++ b/TAO/tao/Messaging/AMI_Arguments_Converter_Impl.cpp @@ -59,7 +59,7 @@ TAO_AMI_Arguments_Converter_Impl::convert_reply ( { TAO_OutputCDR output; TAO_Pluggable_Reply_Params params (0); - params.reply_status_ = TAO_PLUGGABLE_MESSAGE_NO_EXCEPTION; + params.reply_status (GIOP::NO_EXCEPTION); for (CORBA::ULong j = 0; j < nargs; ++j) { if (!(args[j]->marshal (output))) @@ -84,11 +84,11 @@ TAO_AMI_Arguments_Converter_Impl::handle_corba_exception ( exception->_tao_encode (output); if (CORBA::SystemException::_downcast (exception) != 0) { - params.reply_status_ = TAO_PLUGGABLE_MESSAGE_SYSTEM_EXCEPTION; + params.reply_status (GIOP::SYSTEM_EXCEPTION); } else { - params.reply_status_ = TAO_PLUGGABLE_MESSAGE_USER_EXCEPTION; + params.reply_status (GIOP::USER_EXCEPTION); } TAO_InputCDR input (output); params.input_cdr_ = &input; diff --git a/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp b/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp index 514061e22ab..ac14e6978f3 100644 --- a/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp +++ b/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp @@ -202,7 +202,7 @@ namespace TAO #if TAO_HAS_INTERCEPTORS == 1 CORBA::Boolean const permanent_forward = - (asynch.reply_status() == TAO_GIOP_LOCATION_FORWARD_PERM); + (asynch.reply_status() == GIOP::LOCATION_FORWARD_PERM); #else CORBA::Boolean const permanent_forward = false; #endif diff --git a/TAO/tao/Messaging/Asynch_Reply_Dispatcher.cpp b/TAO/tao/Messaging/Asynch_Reply_Dispatcher.cpp index 4d3f497a306..27eb11ecae8 100644 --- a/TAO/tao/Messaging/Asynch_Reply_Dispatcher.cpp +++ b/TAO/tao/Messaging/Asynch_Reply_Dispatcher.cpp @@ -51,7 +51,8 @@ TAO_Asynch_Reply_Dispatcher::dispatch_reply (TAO_Pluggable_Reply_Params ¶ms) // AMI Timeout Handling End } - this->reply_status_ = params.reply_status_; + this->reply_status_ = params.reply_status (); + this->locate_reply_status_ = params.locate_reply_status (); // Transfer the <params.input_cdr_>'s content to this->reply_cdr_ ACE_Data_Block *db = this->reply_cdr_.clone_from (*params.input_cdr_); @@ -94,18 +95,18 @@ TAO_Asynch_Reply_Dispatcher::dispatch_reply (TAO_Pluggable_Reply_Params ¶ms) CORBA::ULong reply_error = TAO_AMI_REPLY_NOT_OK; switch (this->reply_status_) { - case TAO_PLUGGABLE_MESSAGE_NO_EXCEPTION: + case GIOP::NO_EXCEPTION: reply_error = TAO_AMI_REPLY_OK; break; - case TAO_PLUGGABLE_MESSAGE_USER_EXCEPTION: + case GIOP::USER_EXCEPTION: reply_error = TAO_AMI_REPLY_USER_EXCEPTION; break; - case TAO_PLUGGABLE_MESSAGE_SYSTEM_EXCEPTION: + case GIOP::SYSTEM_EXCEPTION: reply_error = TAO_AMI_REPLY_SYSTEM_EXCEPTION; break; default: - case TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD: - case TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD_PERM: + case GIOP::LOCATION_FORWARD: + case GIOP::LOCATION_FORWARD_PERM: // @@ Michael: Not even the spec mentions this case. // We have to think about this case. // Handle the forwarding and return so the stub restarts the diff --git a/TAO/tao/PI_Server/ServerInterceptorAdapter.cpp b/TAO/tao/PI_Server/ServerInterceptorAdapter.cpp index a4658c28a99..edd6333959b 100644 --- a/TAO/tao/PI_Server/ServerInterceptorAdapter.cpp +++ b/TAO/tao/PI_Server/ServerInterceptorAdapter.cpp @@ -212,7 +212,7 @@ TAO::ServerRequestInterceptor_Adapter_Impl::receive_request_service_contexts ( catch (const ::PortableInterceptor::ForwardRequest& exc) { server_request.forward_location (exc.forward.in ()); - server_request.reply_status (PortableInterceptor::LOCATION_FORWARD); + server_request.pi_reply_status (PortableInterceptor::LOCATION_FORWARD); (void) this->send_other (server_request, args, nargs, @@ -280,7 +280,7 @@ TAO::ServerRequestInterceptor_Adapter_Impl::receive_request ( catch (const ::PortableInterceptor::ForwardRequest& exc) { server_request.forward_location (exc.forward.in ()); - server_request.reply_status (PortableInterceptor::LOCATION_FORWARD); + server_request.pi_reply_status (PortableInterceptor::LOCATION_FORWARD); this->send_other (server_request, args, nargs, @@ -391,7 +391,7 @@ TAO::ServerRequestInterceptor_Adapter_Impl::send_exception ( catch (const ::PortableInterceptor::ForwardRequest& exc) { server_request.forward_location (exc.forward.in ()); - server_request.reply_status (PortableInterceptor::LOCATION_FORWARD); + server_request.pi_reply_status (PortableInterceptor::LOCATION_FORWARD); this->send_other (server_request, args, nargs, @@ -483,7 +483,7 @@ TAO::ServerRequestInterceptor_Adapter_Impl::send_other ( catch (const ::PortableInterceptor::ForwardRequest& exc) { server_request.forward_location (exc.forward.in ()); - server_request.reply_status (PortableInterceptor::LOCATION_FORWARD); + server_request.pi_reply_status (PortableInterceptor::LOCATION_FORWARD); this->send_other (server_request, args, nargs, diff --git a/TAO/tao/PI_Server/ServerRequestInfo.cpp b/TAO/tao/PI_Server/ServerRequestInfo.cpp index 33383e098e2..a63e7864817 100644 --- a/TAO/tao/PI_Server/ServerRequestInfo.cpp +++ b/TAO/tao/PI_Server/ServerRequestInfo.cpp @@ -108,8 +108,8 @@ TAO::ServerRequestInfo::arguments (void) parameter.mode = (*i)->mode (); // When we are in receive_request and have an out argument, then // don't copy it, just let the any be empty with typecode tk_null - if ((this->server_request_.reply_status () != -1) || - (this->server_request_.reply_status () == -1 && + if ((this->server_request_.pi_reply_status () != -1) || + (this->server_request_.pi_reply_status () == -1 && (*i)->mode () != CORBA::PARAM_OUT)) { (*i)->interceptor_value (¶meter.argument); @@ -203,17 +203,17 @@ TAO::ServerRequestInfo::sync_scope (void) PortableInterceptor::ReplyStatus TAO::ServerRequestInfo::reply_status (void) { - if (this->server_request_.reply_status () == -1) + if (this->server_request_.pi_reply_status () == -1) // A reply hasn't been received yet. throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO); - return this->server_request_.reply_status (); + return this->server_request_.pi_reply_status (); } CORBA::Object_ptr TAO::ServerRequestInfo::forward_reference (void) { - if (this->server_request_.reply_status () != PortableInterceptor::LOCATION_FORWARD) + if (this->server_request_.pi_reply_status () != PortableInterceptor::LOCATION_FORWARD) throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO); // TAO_ServerRequest::forward_location() already duplicates the @@ -287,8 +287,8 @@ TAO::ServerRequestInfo::get_service_context_i ( CORBA::Any * TAO::ServerRequestInfo::sending_exception (void) { - if (this->server_request_.reply_status () != PortableInterceptor::SYSTEM_EXCEPTION - && this->server_request_.reply_status () != PortableInterceptor::USER_EXCEPTION) + if (this->server_request_.pi_reply_status () != PortableInterceptor::SYSTEM_EXCEPTION + && this->server_request_.pi_reply_status () != PortableInterceptor::USER_EXCEPTION) { throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO); } diff --git a/TAO/tao/PI_Server/ServerRequestInfo.inl b/TAO/tao/PI_Server/ServerRequestInfo.inl index 09985532ba8..981df1cbdff 100644 --- a/TAO/tao/PI_Server/ServerRequestInfo.inl +++ b/TAO/tao/PI_Server/ServerRequestInfo.inl @@ -32,7 +32,7 @@ TAO::ServerRequestInfo::forward_reference ( // Note that we're converting the ForwardRequest exception in to a // LOCATION_FORWARD reply, so we do not set the exception status. - this->server_request_.reply_status (PortableInterceptor::LOCATION_FORWARD); + this->server_request_.pi_reply_status (PortableInterceptor::LOCATION_FORWARD); // Store the forward reference in the TAO_ServerRequest object. this->server_request_.forward_location (exc.forward.in ()); @@ -44,7 +44,7 @@ TAO::ServerRequestInfo::forward_reference (CORBA::Object_ptr obj) // We only get here if a servant manager threw a // PortableServer::ForwardRequest exception. - this->server_request_.reply_status (PortableInterceptor::LOCATION_FORWARD); + this->server_request_.pi_reply_status (PortableInterceptor::LOCATION_FORWARD); // Store the forward reference in the TAO_ServerRequest object. this->server_request_.forward_location (obj); diff --git a/TAO/tao/Pluggable_Messaging_Utils.cpp b/TAO/tao/Pluggable_Messaging_Utils.cpp index 9f50cc1119f..40fbcb5eebc 100644 --- a/TAO/tao/Pluggable_Messaging_Utils.cpp +++ b/TAO/tao/Pluggable_Messaging_Utils.cpp @@ -11,7 +11,6 @@ ACE_RCSID (tao, Pluggable_Messaging_Utils, "$Id$") - TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Pluggable_Reply_Params::TAO_Pluggable_Reply_Params (TAO_Transport *t) diff --git a/TAO/tao/Pluggable_Messaging_Utils.h b/TAO/tao/Pluggable_Messaging_Utils.h index aae0a7012bb..953edc32888 100644 --- a/TAO/tao/Pluggable_Messaging_Utils.h +++ b/TAO/tao/Pluggable_Messaging_Utils.h @@ -19,6 +19,7 @@ #include /**/ "ace/pre.h" #include "tao/IOP_IORC.h" +#include "tao/GIOPC.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -31,7 +32,7 @@ class TAO_Transport; /** * @class TAO_Pluggable_Reply_Params_Base * - * @brief TAO_Pluggable_Acceptor_Params + * @brief TAO_Pluggable_Reply_Params_Base * * This represents a set of data that would be assembled by the * acceptor to pass to the connector. This base class is used by @@ -51,12 +52,6 @@ public: /// The request id for which the reply we (connector) has received. CORBA::ULong request_id_; - // @@ Bala: this is (again) an GIOPism (to coin a word). Other - // protocol may choose to send different *messages* instead. - // @@ Carlos: I agree. Please see above. - /// The reply status. - CORBA::ULong reply_status_; - /** * Since this class no longer contains an NVList, this is the * way to determine if the request was DSI, so we can use Carlos' @@ -81,9 +76,22 @@ public: /// marshalled in the reply CORBA::Boolean argument_flag_; + GIOP::ReplyStatusType reply_status (void) const; + void reply_status (GIOP::ReplyStatusType status); + + GIOP::LocateStatusType locate_reply_status (void) const; + void locate_reply_status (GIOP::LocateStatusType status); + protected: /// The service context list that we don't own. IOP::ServiceContextList *service_context_; +private: + /// The reply status. + GIOP::ReplyStatusType reply_status_; + + /// The locate reply status + GIOP::LocateStatusType locate_reply_status_; + }; /** @@ -106,82 +114,6 @@ public: TAO_Transport *transport_; }; -// @@ 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 -// very influential people (Michi) is arguing against it in the OMG. -// -// @@Carlos: Yes, I also saw some of Michi's ideas. Even if OMG -// decides to remove this, can I point that we may have to support that -// for the existsing GIOP1.0,1.1 & GIOP 1.2. Above all, the enum type -// contains things that I know of today. I can go ahead and add HTTP-NG -// stuff. They all seem to be in Working Draft stage. So, I am just -// keeping off. I dont want to add something for the kick of it :-) -enum TAO_Pluggable_Header_Type -{ - TAO_PLUGGABLE_MESSAGE_REQUEST_HEADER = 0, - TAO_PLUGGABLE_MESSAGE_LOCATE_REQUEST_HEADER -}; - - -/** - * Provide an external interface for the users of this pluggable - * messaging framework to denote existing message types. This has - * an inspiration from GIOP. So if anybody wants to add more message - * types you are welcome but please do not change the numbering - * scheme as this would affect GIOP. - * - * @note - * We may not need everything here. It would be good if we - * have only the following messages TAO_PLUGGABLE_MESSAGE_REQUEST, - * TAO_PLUGGABLE_MESSAGE_REPLY, - * TAO_PLUGGABLE_MESSAGE_CLOSECONNECTION, - * TAO_PLUGGABLE_MESSAGE_MESSAGE_ERROR. Changes will be made once - * the rest of the stuff gets ready to roll - */ -enum TAO_Pluggable_Message_Type -{ - TAO_PLUGGABLE_MESSAGE_REQUEST = 0, // sent by client. - TAO_PLUGGABLE_MESSAGE_REPLY = 1, // by server. - TAO_PLUGGABLE_MESSAGE_CANCELREQUEST = 2, // by client. - TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST = 3, // by client. - TAO_PLUGGABLE_MESSAGE_LOCATEREPLY = 4, - TAO_PLUGGABLE_MESSAGE_CLOSECONNECTION = 5, - TAO_PLUGGABLE_MESSAGE_MESSAGERROR = 6, - TAO_PLUGGABLE_MESSAGE_FRAGMENT = 7 -}; - -// @@ Bala: This is a hopeless GIOPism. -// @@ Carlos: Agreed. - -/** - * Provide an external interface for the users of this pluggable - * messaging framework to denote existing Exception types. This has - * an inspiration from GIOP. So if anybody wants to add more message - * types you are welcome but please do not change the numbering - * scheme as this would affect GIOP. - */ -enum TAO_Pluggable_Message_Exception_Type -{ - /// Request completed successfully - TAO_PLUGGABLE_MESSAGE_NO_EXCEPTION = 0, - - /// Request terminated with user exception - TAO_PLUGGABLE_MESSAGE_USER_EXCEPTION, - - /// Request terminated with system exception - TAO_PLUGGABLE_MESSAGE_SYSTEM_EXCEPTION, - - /// Reply is a location forward type - TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD, - - /// PLUGGABLE_MESSAGE 1.2, Reply is a location forward perm type.. - TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD_PERM, - - /// GIOP1.2, - TAO_PLUGGABLE_MESSAGE_NEEDS_ADDRESSING_MODE -}; - TAO_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) diff --git a/TAO/tao/Pluggable_Messaging_Utils.inl b/TAO/tao/Pluggable_Messaging_Utils.inl index 2269bc9e91a..3af24e41ef7 100644 --- a/TAO/tao/Pluggable_Messaging_Utils.inl +++ b/TAO/tao/Pluggable_Messaging_Utils.inl @@ -8,14 +8,39 @@ 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_ (false), - service_context_ (0) + service_context_ (0), + reply_status_ (GIOP::NO_EXCEPTION), + locate_reply_status_ (GIOP::UNKNOWN_OBJECT) { } +ACE_INLINE GIOP::ReplyStatusType +TAO_Pluggable_Reply_Params_Base::reply_status (void) const +{ + return this->reply_status_; +} + +ACE_INLINE void +TAO_Pluggable_Reply_Params_Base::reply_status (GIOP::ReplyStatusType status) +{ + this->reply_status_ = status; +} + +ACE_INLINE GIOP::LocateStatusType +TAO_Pluggable_Reply_Params_Base::locate_reply_status (void) const +{ + return this->locate_reply_status_; +} + +ACE_INLINE void +TAO_Pluggable_Reply_Params_Base::locate_reply_status (GIOP::LocateStatusType status) +{ + this->locate_reply_status_ = status; +} + ACE_INLINE void TAO_Pluggable_Reply_Params_Base::service_context_notowned ( IOP::ServiceContextList *svc) diff --git a/TAO/tao/PortableServer/Upcall_Wrapper.cpp b/TAO/tao/PortableServer/Upcall_Wrapper.cpp index c8433a771c2..498843a3b9b 100644 --- a/TAO/tao/PortableServer/Upcall_Wrapper.cpp +++ b/TAO/tao/PortableServer/Upcall_Wrapper.cpp @@ -118,7 +118,7 @@ TAO::Upcall_Wrapper::upcall (TAO_ServerRequest & server_request, #if TAO_HAS_INTERCEPTORS == 1 if (interceptor_adapter == 0) { - server_request.reply_status (PortableInterceptor::SUCCESSFUL); + server_request.pi_reply_status (PortableInterceptor::SUCCESSFUL); } else { @@ -136,7 +136,7 @@ TAO::Upcall_Wrapper::upcall (TAO_ServerRequest & server_request, if (CORBA::is_nil (forward_to_after.in ())) { // No location forward by interceptors and successful upcall. - server_request.reply_status (PortableInterceptor::SUCCESSFUL); + server_request.pi_reply_status (PortableInterceptor::SUCCESSFUL); interceptor_adapter->send_reply (server_request, the_args, the_nargs, diff --git a/TAO/tao/Queued_Data.h b/TAO/tao/Queued_Data.h index 64ef1cd4bcd..75a56e58231 100644 --- a/TAO/tao/Queued_Data.h +++ b/TAO/tao/Queued_Data.h @@ -89,7 +89,7 @@ public: CORBA::Octet more_fragments (void) const; /// Get message type - TAO_Pluggable_Message_Type msg_type (void) const; + GIOP::MsgType msg_type (void) const; /// Get next TAO_Queued_Data *next (void) const; @@ -105,7 +105,7 @@ public: /// Set the state void state (const TAO_GIOP_Message_State& state); - + const TAO_GIOP_Message_State& state (void) const; private: diff --git a/TAO/tao/Queued_Data.inl b/TAO/tao/Queued_Data.inl index a5dd0331858..ce55deee47e 100644 --- a/TAO/tao/Queued_Data.inl +++ b/TAO/tao/Queued_Data.inl @@ -92,7 +92,7 @@ TAO_Queued_Data::more_fragments (void) const return this->state_.more_fragments (); } -ACE_INLINE TAO_Pluggable_Message_Type +ACE_INLINE GIOP::MsgType TAO_Queued_Data::msg_type (void) const { return this->state_.message_type (); @@ -128,7 +128,7 @@ TAO_Queued_Data::state (const TAO_GIOP_Message_State& state) this->state_ = state; } -ACE_INLINE const TAO_GIOP_Message_State& +ACE_INLINE const TAO_GIOP_Message_State& TAO_Queued_Data::state (void) const { return this->state_; diff --git a/TAO/tao/Reply_Dispatcher.cpp b/TAO/tao/Reply_Dispatcher.cpp index 2caa48e8418..eb6f608eaa2 100644 --- a/TAO/tao/Reply_Dispatcher.cpp +++ b/TAO/tao/Reply_Dispatcher.cpp @@ -2,8 +2,8 @@ #include "tao/Reply_Dispatcher.h" -ACE_RCSID (tao, - Reply_Dispatcher, +ACE_RCSID (tao, + Reply_Dispatcher, "$Id$") #if !defined (__ACE_INLINE__) @@ -15,7 +15,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL // Constructor. TAO_Reply_Dispatcher::TAO_Reply_Dispatcher (void) // Just an invalid reply status. - : reply_status_ (100) + : locate_reply_status_ (GIOP::UNKNOWN_OBJECT) + , reply_status_ (GIOP::NO_EXCEPTION) { } diff --git a/TAO/tao/Reply_Dispatcher.h b/TAO/tao/Reply_Dispatcher.h index 1635d749878..7ce7fd4903e 100644 --- a/TAO/tao/Reply_Dispatcher.h +++ b/TAO/tao/Reply_Dispatcher.h @@ -25,6 +25,7 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "tao/Basic_Types.h" +#include "tao/GIOPC.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -34,7 +35,6 @@ class TAO_Pluggable_Reply_Params; /** * @class TAO_Reply_Dispatcher * - * * Different invocation modes process the Reply messages in * different ways. Traditional synchronous replies simply receive * the message and wake up the waiting thread (if any). @@ -78,12 +78,17 @@ public: */ virtual void connection_closed (void) = 0; - /// Get the reply status. - CORBA::ULong reply_status (void) const; + /// Get the locate reply status. + GIOP::LocateStatusType locate_reply_status (void) const; + + GIOP::ReplyStatusType reply_status (void) const; protected: - /// Reply or LocateReply status. - CORBA::ULong reply_status_; + /// LocateReply status. + GIOP::LocateStatusType locate_reply_status_; + + // RequestReply status + GIOP::ReplyStatusType reply_status_; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Reply_Dispatcher.inl b/TAO/tao/Reply_Dispatcher.inl index e390ec5911c..fdbe87db09d 100644 --- a/TAO/tao/Reply_Dispatcher.inl +++ b/TAO/tao/Reply_Dispatcher.inl @@ -5,7 +5,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -ACE_INLINE CORBA::ULong +ACE_INLINE GIOP::LocateStatusType +TAO_Reply_Dispatcher::locate_reply_status (void) const +{ + return this->locate_reply_status_; +} + +ACE_INLINE GIOP::ReplyStatusType TAO_Reply_Dispatcher::reply_status (void) const { return this->reply_status_; diff --git a/TAO/tao/Synch_Invocation.cpp b/TAO/tao/Synch_Invocation.cpp index 34e957bdbba..2031d848c2d 100644 --- a/TAO/tao/Synch_Invocation.cpp +++ b/TAO/tao/Synch_Invocation.cpp @@ -339,7 +339,7 @@ namespace TAO // have been handled in the reply dispatcher/protocol framework. switch (rd.reply_status ()) { - case TAO_PLUGGABLE_MESSAGE_NO_EXCEPTION: + case GIOP::NO_EXCEPTION: { Reply_Guard mon (this, TAO_INVOKE_FAILURE); if (this->details_.demarshal_args (cdr) == false) @@ -350,9 +350,9 @@ namespace TAO mon.set_status (TAO_INVOKE_SUCCESS); } break; - case TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD: + case GIOP::LOCATION_FORWARD: return this->location_forward (cdr); - case TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD_PERM: + case GIOP::LOCATION_FORWARD_PERM: { // Unmarshal the location forward object and set the // variable this->forward_to_. @@ -379,12 +379,12 @@ namespace TAO return s; } - case TAO_PLUGGABLE_MESSAGE_USER_EXCEPTION: + case GIOP::USER_EXCEPTION: return this->handle_user_exception (cdr); - case TAO_PLUGGABLE_MESSAGE_SYSTEM_EXCEPTION: + case GIOP::SYSTEM_EXCEPTION: return this->handle_system_exception (cdr); - case TAO_PLUGGABLE_MESSAGE_NEEDS_ADDRESSING_MODE: + case GIOP::NEEDS_ADDRESSING_MODE: { Reply_Guard mon (this, TAO_INVOKE_FAILURE); // We have received a message with a request to change the diff --git a/TAO/tao/Synch_Reply_Dispatcher.cpp b/TAO/tao/Synch_Reply_Dispatcher.cpp index 9dbdcb0eabd..aec04954877 100644 --- a/TAO/tao/Synch_Reply_Dispatcher.cpp +++ b/TAO/tao/Synch_Reply_Dispatcher.cpp @@ -55,7 +55,8 @@ TAO_Synch_Reply_Dispatcher::dispatch_reply ( if (params.input_cdr_ == 0) return -1; - this->reply_status_ = params.reply_status_; + this->reply_status_ = params.reply_status (); + this->locate_reply_status_ = params.locate_reply_status (); // Steal the buffer, that way we don't do any unnecesary copies of // this data. @@ -78,8 +79,7 @@ TAO_Synch_Reply_Dispatcher::dispatch_reply ( } else { - ACE_Data_Block *db = - this->reply_cdr_.clone_from (*params.input_cdr_); + ACE_Data_Block *db = this->reply_cdr_.clone_from (*params.input_cdr_); if (db == 0) { diff --git a/TAO/tao/TAO_Server_Request.cpp b/TAO/tao/TAO_Server_Request.cpp index 41919f3775c..371d52005b6 100644 --- a/TAO/tao/TAO_Server_Request.cpp +++ b/TAO/tao/TAO_Server_Request.cpp @@ -64,7 +64,7 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_GIOP_Message_Base *mesg_base, sync_with_server_ (false), is_dsi_ (false), // @@ We shouldn't be using GIOP specific types here. Need to be revisited. - exception_type_ (TAO_GIOP_NO_EXCEPTION), + reply_status_ (GIOP::NO_EXCEPTION), orb_core_ (orb_core), request_id_ (0), profile_ (orb_core), @@ -76,7 +76,7 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_GIOP_Message_Base *mesg_base, , interceptor_count_ (0) , rs_pi_current_ (0) , caught_exception_ (0) - , reply_status_ (-1) + , pi_reply_status_ (-1) #endif /* TAO_HAS_INTERCEPTORS == 1 */ , transport_(transport) //already duplicated in TAO_Transport::process_parsed_messages () { @@ -105,7 +105,7 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_GIOP_Message_Base *mesg_base, deferred_reply_ (deferred_reply), sync_with_server_ (false), is_dsi_ (false), - exception_type_ (TAO_GIOP_NO_EXCEPTION), + reply_status_ (GIOP::NO_EXCEPTION), orb_core_ (orb_core), request_id_ (request_id), profile_ (orb_core), @@ -117,7 +117,7 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_GIOP_Message_Base *mesg_base, , interceptor_count_ (0) , rs_pi_current_ (0) , caught_exception_ (0) - , reply_status_ (-1) + , pi_reply_status_ (-1) #endif /* TAO_HAS_INTERCEPTORS == 1 */ , transport_(transport) //already duplicated in TAO_Transport::process_parsed_messages () { @@ -141,7 +141,7 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_ORB_Core * orb_core, deferred_reply_ (false), sync_with_server_ (details.response_flags () == static_cast<CORBA::Octet> (Messaging::SYNC_WITH_SERVER)), is_dsi_ (false), - exception_type_ (TAO_GIOP_NO_EXCEPTION), + reply_status_ (GIOP::NO_EXCEPTION), orb_core_ (orb_core), request_id_ (0), profile_ (orb_core), @@ -153,7 +153,7 @@ TAO_ServerRequest::TAO_ServerRequest (TAO_ORB_Core * orb_core, , interceptor_count_ (0) , rs_pi_current_ (0) , caught_exception_ (0) - , reply_status_ (-1) + , pi_reply_status_ (-1) #endif /* TAO_HAS_INTERCEPTORS == 1 */ , transport_ (0) { @@ -253,22 +253,17 @@ TAO_ServerRequest::init_reply (void) this->orb_core_->is_permanent_forward_condition (this->forward_location_.in (), this->request_service_context ()); - reply_params.reply_status_ - = permanent_forward_condition - ? TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD_PERM - : TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD; + reply_params.reply_status ( + permanent_forward_condition + ? GIOP::LOCATION_FORWARD_PERM + : GIOP::LOCATION_FORWARD); } // Any exception at all. - else if (this->exception_type_ == TAO_GIOP_NO_EXCEPTION) - { - reply_params.reply_status_ = TAO_PLUGGABLE_MESSAGE_NO_EXCEPTION; - } else { - reply_params.reply_status_ = this->exception_type_; + reply_params.reply_status (this->reply_status_); } - this->outgoing_->message_attributes (this->request_id_, 0, TAO_Transport::TAO_REPLY, @@ -278,8 +273,8 @@ TAO_ServerRequest::init_reply (void) this->mesg_base_->generate_reply_header (*this->outgoing_, reply_params); // Finish the GIOP Reply header, then marshal the exception. - if (reply_params.reply_status_ == TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD || - reply_params.reply_status_ == TAO_PLUGGABLE_MESSAGE_LOCATION_FORWARD_PERM) + if (reply_params.reply_status () == GIOP::LOCATION_FORWARD || + reply_params.reply_status () == GIOP::LOCATION_FORWARD_PERM) { // Marshal the forward location pointer. CORBA::Object_ptr object_ptr = this->forward_location_.in (); @@ -311,7 +306,7 @@ TAO_ServerRequest::send_no_exception_reply (void) // Send back the reply service context. reply_params.service_context_notowned (&this->reply_service_info ()); - reply_params.reply_status_ = TAO_GIOP_NO_EXCEPTION; + reply_params.reply_status (GIOP::NO_EXCEPTION); // No data anyway. reply_params.argument_flag_ = false; @@ -388,12 +383,15 @@ TAO_ServerRequest::tao_send_reply_exception (const CORBA::Exception &ex) reply_params.argument_flag_ = true; // Make a default reply status - reply_params.reply_status_ = TAO_GIOP_USER_EXCEPTION; // Check whether we are able to downcast the exception if (CORBA::SystemException::_downcast (&ex) != 0) { - reply_params.reply_status_ = TAO_GIOP_SYSTEM_EXCEPTION; + reply_params.reply_status (GIOP::SYSTEM_EXCEPTION); + } + else + { + reply_params.reply_status (GIOP::USER_EXCEPTION); } // Create a new output CDR stream @@ -503,7 +501,7 @@ TAO_ServerRequest::send_cached_reply (CORBA::OctetSeq &s) reply_params.argument_flag_ = true; // Make a default reply status - reply_params.reply_status_ = TAO_GIOP_NO_EXCEPTION; + reply_params.reply_status (GIOP::NO_EXCEPTION); this->outgoing_->message_attributes (this->request_id_, 0, @@ -547,9 +545,9 @@ void TAO_ServerRequest::caught_exception (CORBA::Exception *exception) { if (CORBA::SystemException::_downcast (exception) != 0) - this->reply_status_ = PortableInterceptor::SYSTEM_EXCEPTION; + this->pi_reply_status_ = PortableInterceptor::SYSTEM_EXCEPTION; else if (CORBA::UserException::_downcast (exception) != 0) - this->reply_status_ = PortableInterceptor::USER_EXCEPTION; + this->pi_reply_status_ = PortableInterceptor::USER_EXCEPTION; this->caught_exception_ = exception; } diff --git a/TAO/tao/TAO_Server_Request.h b/TAO/tao/TAO_Server_Request.h index ab1f8aae33f..709a19aa588 100644 --- a/TAO/tao/TAO_Server_Request.h +++ b/TAO/tao/TAO_Server_Request.h @@ -30,6 +30,7 @@ #include "tao/Service_Context.h" #include "tao/Object.h" #include "tao/Transport_Selection_Guard.h" +#include "tao/GIOPC.h" #if TAO_HAS_INTERCEPTORS == 1 @@ -209,11 +210,11 @@ public: /// Get the forward_location. CORBA::Object_ptr forward_location (void); - /// Get the exception type. - CORBA::ULong exception_type (void); + /// Get the reply status + GIOP::ReplyStatusType reply_status (void); - /// Set the exception type. - void exception_type (CORBA::ULong except_type); + /// Set the reply status + void reply_status (GIOP::ReplyStatusType except_type); /// Set the requesting principal void requesting_principal (const CORBA::OctetSeq & principal); @@ -265,10 +266,10 @@ public: void caught_exception (CORBA::Exception *exception); /// Set the status of the received reply. - void reply_status (PortableInterceptor::ReplyStatus s); + void pi_reply_status (PortableInterceptor::ReplyStatus s); /// Get the status of the received reply. - PortableInterceptor::ReplyStatus reply_status (void); + PortableInterceptor::ReplyStatus pi_reply_status (void); #endif /* TAO_HAS_INTERCEPTORS == 1 */ private: @@ -313,8 +314,8 @@ private: /// Did we get passed to a CORBA::ServerRequest? CORBA::Boolean is_dsi_; - /// Exception type (will be NO_EXCEPTION in the majority of the cases). - CORBA::ULong exception_type_; + /// Reply status (will be NO_EXCEPTION in the majority of the cases). + GIOP::ReplyStatusType reply_status_; /// A pointer to the ORB Core for the context where the request was /// created. @@ -359,7 +360,7 @@ private: CORBA::Exception * caught_exception_; /// Reply status for the current request. - PortableInterceptor::ReplyStatus reply_status_; + PortableInterceptor::ReplyStatus pi_reply_status_; #endif /* TAO_HAS_INTERCEPTORS == 1 */ ///// Transport class. diff --git a/TAO/tao/TAO_Server_Request.inl b/TAO/tao/TAO_Server_Request.inl index 2754acc1776..3dd267a0826 100644 --- a/TAO/tao/TAO_Server_Request.inl +++ b/TAO/tao/TAO_Server_Request.inl @@ -19,7 +19,7 @@ TAO_ServerRequest::TAO_ServerRequest (void) deferred_reply_ (false), sync_with_server_ (false), is_dsi_ (false), - exception_type_ (TAO_GIOP_NO_EXCEPTION), + reply_status_ (GIOP::NO_EXCEPTION), orb_core_ (0), request_id_ (0), profile_ (0), @@ -31,7 +31,7 @@ TAO_ServerRequest::TAO_ServerRequest (void) , interceptor_count_ (0) , rs_pi_current_ () , caught_exception_ (0) - , reply_status_ (-1) + , pi_reply_status_ (-1) #endif /* TAO_HAS_INTERCEPTORS == 1 */ , transport_(0) { @@ -177,16 +177,16 @@ TAO_ServerRequest::forward_location (void) return CORBA::Object::_duplicate (this->forward_location_.in ()); } -ACE_INLINE CORBA::ULong -TAO_ServerRequest::exception_type (void) +ACE_INLINE GIOP::ReplyStatusType +TAO_ServerRequest::reply_status (void) { - return this->exception_type_; + return this->reply_status_; } ACE_INLINE void -TAO_ServerRequest::exception_type (CORBA::ULong except_type) +TAO_ServerRequest::reply_status (GIOP::ReplyStatusType reply_status) { - this->exception_type_ = except_type; + this->reply_status_ = reply_status; } ACE_INLINE void @@ -240,15 +240,15 @@ TAO_ServerRequest::caught_exception (void) } ACE_INLINE void -TAO_ServerRequest::reply_status (PortableInterceptor::ReplyStatus s) +TAO_ServerRequest::pi_reply_status (PortableInterceptor::ReplyStatus s) { - this->reply_status_ = s; + this->pi_reply_status_ = s; } ACE_INLINE PortableInterceptor::ReplyStatus -TAO_ServerRequest::reply_status (void) +TAO_ServerRequest::pi_reply_status (void) { - return this->reply_status_; + return this->pi_reply_status_; } #endif /* TAO_HAS_INTERCEPTORS == 1 */ diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp index 4f5138e51a2..0232a41c81e 100644 --- a/TAO/tao/Transport.cpp +++ b/TAO/tao/Transport.cpp @@ -1557,7 +1557,7 @@ TAO_Transport::consolidate_process_message (TAO_Queued_Data *q_data, } if (q_data->more_fragments () || - q_data->msg_type () == TAO_PLUGGABLE_MESSAGE_FRAGMENT) + q_data->msg_type () == GIOP::Fragment) { // consolidate message on top of stack, only for fragmented messages TAO_Queued_Data *new_q_data = 0; @@ -1638,7 +1638,7 @@ TAO_Transport::consolidate_enqueue_message (TAO_Queued_Data *q_data) } if (q_data->more_fragments () || - q_data->msg_type () == TAO_PLUGGABLE_MESSAGE_FRAGMENT) + q_data->msg_type () == GIOP::Fragment) { TAO_Queued_Data *new_q_data = 0; @@ -2051,7 +2051,7 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, if (qd.missing_data () != 0 || qd.more_fragments () || - qd.msg_type () == TAO_PLUGGABLE_MESSAGE_FRAGMENT) + qd.msg_type () == GIOP::Fragment) { if (qd.missing_data () == 0) { @@ -2252,7 +2252,7 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd, switch (qd->msg_type ()) { - case TAO_PLUGGABLE_MESSAGE_CLOSECONNECTION: + case GIOP::CloseConnection: { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, @@ -2265,8 +2265,8 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd, return -1; } break; - case TAO_PLUGGABLE_MESSAGE_REQUEST: - case TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST: + case GIOP::Request: + case GIOP::LocateRequest: { // Let us resume the handle before we go ahead to process the // request. This will open up the handle for other threads. @@ -2282,15 +2282,14 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd, } } break; - case TAO_PLUGGABLE_MESSAGE_REPLY: - case TAO_PLUGGABLE_MESSAGE_LOCATEREPLY: + case GIOP::Reply: + case GIOP::LocateReply: { rh.resume_handle (); TAO_Pluggable_Reply_Params params (this); - if (this->messaging_object ()->process_reply_message (params, - qd) == -1) + if (this->messaging_object ()->process_reply_message (params, qd) == -1) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, @@ -2303,7 +2302,7 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd, } break; - case TAO_PLUGGABLE_MESSAGE_CANCELREQUEST: + case GIOP::CancelRequest: { // The associated request might be incomplete residing // fragmented in messaging object. We must make sure the @@ -2327,7 +2326,7 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd, // off the connection. } break; - case TAO_PLUGGABLE_MESSAGE_MESSAGERROR: + case GIOP::MessageError: { if (TAO_debug_level > 0) { @@ -2339,7 +2338,7 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd, return -1; } break; - case TAO_PLUGGABLE_MESSAGE_FRAGMENT: + case GIOP::Fragment: { // Nothing to be done. } |