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 /TAO/tao/GIOP_Message_Generator_Parser.cpp | |
parent | 38012ca062b866fc05069ec56d75f40c4824476f (diff) | |
download | ATCD-788f237feaaece0ddc56b9a46ecbcd22b163816d.tar.gz |
Mon Sep 24 07:43:15 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tao/GIOP_Message_Generator_Parser.cpp')
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser.cpp | 87 |
1 files changed, 8 insertions, 79 deletions
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 |