diff options
author | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-20 04:09:33 +0000 |
---|---|---|
committer | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-20 04:09:33 +0000 |
commit | 29c22856478ad50ea84fa8659242bff9405386fc (patch) | |
tree | 59817d70bc6c8d3fc8fe11f5d3457b5d26a12eef | |
parent | e1585ab33045f3fd6852b253f3f4612bf14168ec (diff) | |
download | ATCD-29c22856478ad50ea84fa8659242bff9405386fc.tar.gz |
Removed IIOP from their names. Deleting these files.
-rw-r--r-- | TAO/tao/IIOP_Wait_Strategy.cpp | 151 | ||||
-rw-r--r-- | TAO/tao/IIOP_Wait_Strategy.h | 110 |
2 files changed, 0 insertions, 261 deletions
diff --git a/TAO/tao/IIOP_Wait_Strategy.cpp b/TAO/tao/IIOP_Wait_Strategy.cpp deleted file mode 100644 index 692c59455df..00000000000 --- a/TAO/tao/IIOP_Wait_Strategy.cpp +++ /dev/null @@ -1,151 +0,0 @@ -// $Id$ - -#include "tao/IIOP_Wait_Strategy.h" -#include "tao/Pluggable.h" -#include "tao/ORB_Core.h" - -// @@ This is not IIOP specific, ditto for IIOP_RMS and -// IIOP_Reply_Dispatcher - -// Constructor. -TAO_IIOP_Wait_Strategy::TAO_IIOP_Wait_Strategy (TAO_Transport *transport) - : transport_ (transport) -{ -} - -// Destructor. -TAO_IIOP_Wait_Strategy::~TAO_IIOP_Wait_Strategy (void) -{ -} - -// ********************************************************************* - -// Constructor. -TAO_Wait_On_Reactor::TAO_Wait_On_Reactor (TAO_Transport *transport) - : TAO_IIOP_Wait_Strategy (transport) -{ -} - -// Destructor. -TAO_Wait_On_Reactor::~TAO_Wait_On_Reactor (void) -{ -} - -int -TAO_Wait_On_Reactor::wait (void) -{ - // Result of the Reactor event loop. - int result = 0; - - // Flag that tells when we have finished reading the whole of the - // incoming message. - // int end_loop_flag = 0; - - while (result == 0) // != -1 && end_loop_flag == 0) - { - // Do the event loop. - result = this->transport_->orb_core ()->reactor ()->handle_events (/* timeout */); - - // Check for ending the event loop. - // if (this->transport_->message_size () == this->transport_->message_offset ()) - // end_loop_flag = 1; - } - - if (result == -1) - return -1; - else - return 0; -} - -// ********************************************************************* - -// Constructor. -TAO_Wait_On_Leader_Follower::TAO_Wait_On_Leader_Follower (TAO_Transport *transport) - : TAO_IIOP_Wait_Strategy (transport) -{ -} - -// Destructor. -TAO_Wait_On_Leader_Follower::~TAO_Wait_On_Leader_Follower (void) -{ -} - -int -TAO_Wait_On_Leader_Follower::wait (void) -{ -#if 0 - // Grab leader follower lock. - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, - ace_mon, - this->orb_core_->leader_follower_lock (), - -1)); - - // Bind the reply handler. - - TAO_Leader_Follower_Reply_Handler rh (..); - - rrs->bind (this->request_id, &rh); - - // Check if we need to become the leader. - if (!this->orb_core_->leader_available ()) - { - // This might increase the refcount of the leader. - this->orb_core_->set_leader_thread (); - - // Do the reactor event loop. - this->orb_core_->reactor ()->owner (ACE_Thread::self ()); - - int result = 0; - while (result != -1) - result = this->orb_core_->reactor ()->handle_events (); - - if (result == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%N:%l:(%P | %t):TAO_Wait_On_Leader_Follower::wait: " - "Reactor::handle_events failed.\n"), - -1); - } - else - { - // Block on condition variable. - ACE_SYNCH_CONDITION* cond = - this->cond_response_available (orb_core); - if (this->orb_core_->add_follower (cond) == -1) - ACE_ERROR ((LM_ERROR, - "%N:%l:(%P|%t) TAO_Wait_On_Leader_Follower::wait: " - "Failed to add a follower thread\n")); - cond->wait (); - } -#endif /* 0 */ - return 0; -} - -// ********************************************************************* - -// Constructor. -TAO_Wait_On_Read::TAO_Wait_On_Read (TAO_Transport *transport) - : TAO_IIOP_Wait_Strategy (transport) -{ -} - -// Destructor. -TAO_Wait_On_Read::~TAO_Wait_On_Read (void) -{ -} - -// Wait on the read operation. -int -TAO_Wait_On_Read::wait (void) -{ - int received_reply = 0; - while (received_reply == 0) - { - // @@ In this case sockets *must* be blocking. - // We need to control how they are set! - received_reply = this->transport_->handle_client_input (1); - if (received_reply == -1) - return -1; - } - - return 0; -} diff --git a/TAO/tao/IIOP_Wait_Strategy.h b/TAO/tao/IIOP_Wait_Strategy.h deleted file mode 100644 index aeb863951d7..00000000000 --- a/TAO/tao/IIOP_Wait_Strategy.h +++ /dev/null @@ -1,110 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// IIOP_Wait_Strategy.h -// -// = DESCRIPTION -// Classes to strategize waiting for reply. -// -// = AUTHOR -// Alexander Babu Arulanthu <alex@cs.wustl.edu> -// -// ============================================================================ - - -#include "tao/GIOP.h" - -class TAO_IIOP_Request_Multiplexing_Strategy; -class TAO_Transport; - -class TAO_Export TAO_IIOP_Wait_Strategy -{ - // = TITLE - // - // Strategy for waiting for the reply. - // - // = DESCRIPTION - // - -public: - TAO_IIOP_Wait_Strategy (TAO_Transport *transport); - // Constructor. - - virtual ~TAO_IIOP_Wait_Strategy (void); - // Destructor. - - virtual int wait (void) = 0; - // Base class virtual method. - -protected: - TAO_Transport *transport_; - // Transport object. -}; - -class TAO_Export TAO_Wait_On_Reactor : public TAO_IIOP_Wait_Strategy -{ - // = TITLE - // - // Wait on the Reactor. Happens in s Single Threaded client - // environment. - // - // = DESCRIPTION - // - -public: - TAO_Wait_On_Reactor (TAO_Transport *transport); - // Constructor. - - virtual ~TAO_Wait_On_Reactor (void); - // Destructor. - - virtual int wait (void); - // Do the event loop of the Reactor. -}; - -class TAO_Export TAO_Wait_On_Leader_Follower : public TAO_IIOP_Wait_Strategy -{ - // = TITLE - // - // Wait according to the Leader-Follower model. Leader does the - // event loop of the Reactor and the Followers wait on the - // condition variable. - // - // = DESCRIPTION - // - -public: - TAO_Wait_On_Leader_Follower (TAO_Transport *transport); - // Constructor. - - virtual ~TAO_Wait_On_Leader_Follower (void); - // Destructor. - - virtual int wait (void); - // Wait according to the L-F model. -}; - -class TAO_Export TAO_Wait_On_Read : public TAO_IIOP_Wait_Strategy -{ - // = TITLE - // - // Wait on receiving the reply. - // - // = DESCRIPTION - // - -public: - TAO_Wait_On_Read (TAO_Transport *transport); - // Constructor. - - virtual ~TAO_Wait_On_Read (void); - // Destructor. - - virtual int wait (void); - // Wait on the read operation. -}; |