Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Exclusive_TMS.h

Go to the documentation of this file.
00001 // This may look like C, but it's really -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Exclusive_TMS.h
00006  *
00007  *  $Id: Exclusive_TMS.h,v 1.1.1.2 2003/02/21 18:36:44 chad Exp $
00008  *
00009  *  @author  Alexander Babu Arulanthu <alex@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_EXCLUSIVE_TMS_H
00015 #define TAO_EXCLUSIVE_TMS_H
00016 #include "ace/pre.h"
00017 
00018 #include "tao/Transport_Mux_Strategy.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 
00025 class TAO_Pluggable_Reply_Params;
00026 
00027 /**
00028  * @class TAO_Exclusive_TMS
00029  *
00030  * Using this strategy only one request can be pending at a time
00031  * in a connection.  This improves performance because the client
00032  * does not have to demux the reply, and there is less need for
00033  * synchronization.
00034  * On the other hand, it does not scale well when you have
00035  * multiple client threads or asynchronous messaging.
00036  */
00037 class TAO_Export TAO_Exclusive_TMS : public TAO_Transport_Mux_Strategy
00038 {
00039 
00040 public:
00041   /// Constructor.
00042   TAO_Exclusive_TMS (TAO_Transport *transport);
00043 
00044   /// Destructor.
00045   virtual ~TAO_Exclusive_TMS (void);
00046 
00047   /**
00048    * @name The TAO_Transport_Mux_Strategy overrided methods
00049    *
00050    * Please read the documentation in the TAO_Transport_Mux_Strategy class
00051    * for details.
00052    */
00053   //@{
00054   virtual CORBA::ULong request_id (void);
00055   virtual int bind_dispatcher (CORBA::ULong request_id,
00056                                TAO_Reply_Dispatcher *rh);
00057   virtual int unbind_dispatcher (CORBA::ULong request_id);
00058 
00059   virtual int dispatch_reply (TAO_Pluggable_Reply_Params &params);
00060 
00061   virtual int idle_after_send (void);
00062   virtual int idle_after_reply (void);
00063   virtual void connection_closed (void);
00064   //@}
00065 
00066 protected:
00067   /// Used to generate a different request_id on each call to
00068   /// request_id().
00069   CORBA::ULong request_id_generator_;
00070 
00071   /// If 0 then the request id and reply dispatcher below are
00072   /// meaningless
00073   int has_request_;
00074 
00075   /// Request id for the current request.
00076   CORBA::ULong request_id_;
00077 
00078   /// Reply Dispatcher corresponding to the request.
00079   TAO_Reply_Dispatcher *rd_;
00080 
00081   // @@ Commented for the time being, let the commented line stay for
00082   //    sometime - Bala
00083   // TAO_GIOP_Message_State message_state_;
00084   // Message state to read the incoming message.
00085 
00086   // @@ Having members of type TAO_GIOP* indicates that we
00087   // (Transport_Mux_Strategy) are aware of the underlying messaging
00088   // protocol. But for the present let us close our eyes till we are
00089   // able to iterate on a use case - Bala.
00090 };
00091 
00092 #include "ace/post.h"
00093 #endif /* EXCLUSIVE_TMS_H */

Generated on Mon Jun 16 13:48:23 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002