00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Synch_Reply_Dispatcher.h 00006 * 00007 * Synch_Reply_Dispatcher.h,v 1.17 2005/11/02 11:03:27 ossama Exp 00008 * 00009 * Dispatch the reply appropriately. 00010 * 00011 * @author Alexander Babu Arulanthu <alex@cs.wustl.edu> 00012 */ 00013 //============================================================================= 00014 00015 #ifndef TAO_SYNCH_REPLY_DISPATCHER_H 00016 #define TAO_SYNCH_REPLY_DISPATCHER_H 00017 00018 #include /**/ "ace/pre.h" 00019 00020 #include "tao/Reply_Dispatcher.h" 00021 00022 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00023 # pragma once 00024 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00025 00026 #include "tao/LF_Invocation_Event.h" 00027 #include "tao/CDR.h" 00028 00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00030 00031 class TAO_Pluggable_Reply_Params; 00032 00033 namespace IOP 00034 { 00035 class ServiceContextList; 00036 } 00037 00038 /** 00039 * @class TAO_Synch_Reply_Dispatcher 00040 * 00041 * @brief Reply dispatcher for Synchronous Method Invocation (SMI)s. 00042 * 00043 */ 00044 class TAO_Export TAO_Synch_Reply_Dispatcher 00045 : public TAO_Reply_Dispatcher 00046 , public TAO_LF_Invocation_Event 00047 { 00048 00049 public: 00050 /// Constructor. 00051 TAO_Synch_Reply_Dispatcher (TAO_ORB_Core *orb_core, 00052 IOP::ServiceContextList &sc); 00053 00054 /// Destructor. 00055 virtual ~TAO_Synch_Reply_Dispatcher (void); 00056 00057 /// Return the reply CDR. 00058 TAO_InputCDR &reply_cdr (void); 00059 00060 virtual int dispatch_reply (TAO_Pluggable_Reply_Params ¶ms); 00061 00062 virtual void connection_closed (void); 00063 00064 protected: 00065 /// The service context list 00066 IOP::ServiceContextList &reply_service_info_; 00067 00068 private: 00069 /// Cache the ORB Core pointer. 00070 TAO_ORB_Core *orb_core_; 00071 00072 /* @todo At some point of time we are going to get to a situation 00073 where TAO has huge stack sizes. Need to think on how we would 00074 deal with that. One idea would be to push these things on TSS as 00075 this is created by the thread on a per invocation basis. Post 1.2 00076 would be a nice time for that I guess 00077 */ 00078 00079 /// The buffer that is used to initialise the data block 00080 char buf_[ACE_CDR::DEFAULT_BUFSIZE]; 00081 00082 /// datablock that is created on teh stack to initialise the CDR 00083 /// stream underneath. 00084 ACE_Data_Block db_; 00085 00086 /// CDR stream which has the reply information that needs to be 00087 /// demarshalled by the stubs 00088 TAO_InputCDR reply_cdr_; 00089 }; 00090 00091 TAO_END_VERSIONED_NAMESPACE_DECL 00092 00093 #include /**/ "ace/post.h" 00094 00095 #endif /* TAO_REPLY_DISPATCHER_H */