diff options
Diffstat (limited to 'TAO/tao/Synch_Reply_Dispatcher.cpp')
-rw-r--r-- | TAO/tao/Synch_Reply_Dispatcher.cpp | 42 |
1 files changed, 11 insertions, 31 deletions
diff --git a/TAO/tao/Synch_Reply_Dispatcher.cpp b/TAO/tao/Synch_Reply_Dispatcher.cpp index 609fa947b29..752e7143295 100644 --- a/TAO/tao/Synch_Reply_Dispatcher.cpp +++ b/TAO/tao/Synch_Reply_Dispatcher.cpp @@ -2,9 +2,8 @@ #include "tao/Synch_Reply_Dispatcher.h" #include "tao/ORB_Core.h" -#include "tao/Wait_Strategy.h" #include "tao/Pluggable_Messaging_Utils.h" -#include "Transport.h" +#include "tao/Transport.h" ACE_RCSID(tao, Synch_Reply_Dispatcher, "$Id$") @@ -17,7 +16,6 @@ TAO_Synch_Reply_Dispatcher::TAO_Synch_Reply_Dispatcher ( : reply_service_info_ (sc), reply_received_ (0), orb_core_ (orb_core), - wait_strategy_ (0), db_ (sizeof buf_, ACE_Message_Block::MB_DATA, this->buf_, @@ -30,9 +28,10 @@ TAO_Synch_Reply_Dispatcher::TAO_Synch_Reply_Dispatcher ( TAO_ENCAP_BYTE_ORDER, TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR, - orb_core), - leader_follower_condition_variable_ (0) + orb_core) { + // As a TAO_LF_Event we start in the active state.... + this->state_changed_i (TAO_LF_Event::LFS_ACTIVE); } // Destructor. @@ -70,42 +69,23 @@ TAO_Synch_Reply_Dispatcher::dispatch_reply ( //this->message_state_.reset (0); // Transfer the <params.input_cdr_>'s content to this->reply_cdr_ + // @@ Somebody could please explain why we ignore the value + // returned? And why don't we simply use the normal C++ idioms to + // represent that? Namely: + // (void) this->reply_cdr_.close_from (params.input_cdr_); + // ACE_Data_Block *db = this->reply_cdr_.clone_from (params.input_cdr_); ACE_UNUSED_ARG (db); - if (this->wait_strategy_ != 0) - { - if (this->wait_strategy_->reply_dispatched ( - this->reply_received_, - this->leader_follower_condition_variable_ - ) - == -1) - { - return -1; - } - } + this->state_changed (TAO_LF_Event::LFS_SUCCESS); return 1; } void -TAO_Synch_Reply_Dispatcher::dispatcher_bound (TAO_Transport *transport) -{ - this->wait_strategy_ = transport->wait_strategy (); - this->leader_follower_condition_variable_ = - transport->wait_strategy ()->leader_follower_condition_variable (); -} - -void TAO_Synch_Reply_Dispatcher::connection_closed (void) { - if (this->wait_strategy_ != 0) - { - this->wait_strategy_->connection_closed ( - this->reply_received_, - this->leader_follower_condition_variable_ - ); - } + this->state_changed (TAO_LF_Event::LFS_CONNECTION_CLOSED); } |