00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Synch_Reply_Dispatcher.h 00006 * 00007 * $Id: Synch_Reply_Dispatcher.h 84563 2009-02-23 08:13:54Z johnnyw $ 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 virtual void reply_timed_out (void); 00065 00066 protected: 00067 /// The service context list 00068 IOP::ServiceContextList &reply_service_info_; 00069 00070 private: 00071 /// Cache the ORB Core pointer. 00072 TAO_ORB_Core *orb_core_; 00073 00074 /* @todo At some point of time we are going to get to a situation 00075 where TAO has huge stack sizes. Need to think on how we would 00076 deal with that. One idea would be to push these things on TSS as 00077 this is created by the thread on a per invocation basis. Post 1.2 00078 would be a nice time for that I guess 00079 */ 00080 00081 /// The buffer that is used to initialise the data block 00082 char buf_[ACE_CDR::DEFAULT_BUFSIZE]; 00083 00084 /// Datablock that is created on the stack to initialise the CDR 00085 /// stream underneath. 00086 ACE_Data_Block db_; 00087 00088 /// CDR stream which has the reply information that needs to be 00089 /// demarshalled by the stubs 00090 TAO_InputCDR reply_cdr_; 00091 }; 00092 00093 TAO_END_VERSIONED_NAMESPACE_DECL 00094 00095 #include /**/ "ace/post.h" 00096 00097 #endif /* TAO_REPLY_DISPATCHER_H */