00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Collocated_Invocation.h 00006 * 00007 * Collocated_Invocation.h,v 1.10 2005/11/03 17:38:44 ossama Exp 00008 * 00009 * 00010 * @author Balachandran Natarajan <bala@dre.vanderbilt.edu> 00011 */ 00012 //============================================================================= 00013 00014 #ifndef TAO_COLLOCATED_INVOCATION_H 00015 #define TAO_COLLOCATED_INVOCATION_H 00016 00017 #include /**/ "ace/pre.h" 00018 00019 #include "tao/TAO_Export.h" 00020 00021 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00022 # pragma once 00023 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00024 00025 #include "tao/Collocation_Strategy.h" 00026 #include "tao/Invocation_Base.h" 00027 #include "tao/Exception.h" 00028 00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00030 00031 class TAO_Operation_Details; 00032 class TAO_Stub; 00033 00034 namespace TAO 00035 { 00036 class Profile_Transport_Resolver; 00037 class Argument; 00038 class Collocation_Proxy_Broker; 00039 00040 /** 00041 * @class Collocated_Invocation 00042 * 00043 * @brief Class for Collocated invocations 00044 * 00045 * @note Reliable oneways are not handled properly including use of 00046 * interceptors. This class should technically serve as the base 00047 * for all invocation types. But now, this is the only class that 00048 * handles collocated invocations and that too in a brain dead way. 00049 */ 00050 class TAO_Export Collocated_Invocation : public Invocation_Base 00051 { 00052 public: 00053 /// Constructor used by TAO::Invocation_Adapter 00054 /** 00055 * @param t The target on which invocation first started. 00056 * 00057 * @param et The effective target in which this invocation is now 00058 * flowing 00059 * 00060 * @param stub Stub for effective target @a et 00061 * 00062 * @param detail operation details of the invocation including 00063 * the service context list 00064 * 00065 * @param response_expected flag to indicate whether the 00066 * operation encapsulated by @a detail returns a response or not. 00067 */ 00068 Collocated_Invocation (CORBA::Object_ptr t, 00069 CORBA::Object_ptr et, 00070 TAO_Stub *stub, 00071 TAO_Operation_Details &detail, 00072 bool response_expected = true); 00073 00074 /// Invocation on the collocated object mediated through this 00075 /// class. 00076 /** 00077 * Practically this method is a place holder to do the 00078 * following 00079 * - Call the start and end interception points on the client 00080 * side. 00081 * 00082 * - Handle location forwards that could be thrown by the 00083 * servant. 00084 * 00085 */ 00086 Invocation_Status invoke (Collocation_Proxy_Broker *cpb, 00087 Collocation_Strategy strat 00088 ACE_ENV_ARG_DECL); 00089 00090 private: 00091 00092 // Disallow default construction. 00093 Collocated_Invocation (void); 00094 00095 }; 00096 } 00097 00098 TAO_END_VERSIONED_NAMESPACE_DECL 00099 00100 #include /**/ "ace/post.h" 00101 #endif /*TAO_COLLOCATED_INVOCATION_H*/