00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file RequestProcessingStrategy.h 00006 * 00007 * $Id: RequestProcessingStrategy.h 76995 2007-02-11 12:51:42Z johnnyw $ 00008 * 00009 * @author Johnny Willemsen <jwillemsen@remedy.nl> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef TAO_REQUEST_PROCESSING_STRATEGY_H 00014 #define TAO_REQUEST_PROCESSING_STRATEGY_H 00015 #include /**/ "ace/pre.h" 00016 00017 #include "tao/PortableServer/Policy_Strategy.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 #include "tao/PortableServer/PortableServer.h" 00024 #include "tao/PortableServer/Servant_Location.h" 00025 00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00027 00028 namespace PortableServer 00029 { 00030 class ServantManager; 00031 typedef ServantManager *ServantManager_ptr; 00032 } 00033 00034 namespace TAO 00035 { 00036 namespace Portable_Server 00037 { 00038 class Servant_Upcall; 00039 class POA_Current_Impl; 00040 } 00041 } 00042 00043 class TAO_Root_POA; 00044 00045 namespace TAO 00046 { 00047 namespace Portable_Server 00048 { 00049 class RequestProcessingStrategy 00050 : public Policy_Strategy 00051 { 00052 public: 00053 RequestProcessingStrategy (void); 00054 00055 virtual void strategy_init( 00056 TAO_Root_POA *poa 00057 ); 00058 00059 virtual void strategy_init( 00060 TAO_Root_POA *poa, 00061 ::PortableServer::ServantRetentionPolicyValue 00062 ); 00063 00064 virtual void strategy_cleanup(void); 00065 00066 #if (TAO_HAS_MINIMUM_POA == 0) 00067 00068 virtual PortableServer::ServantManager_ptr get_servant_manager ( 00069 void) 00070 = 0; 00071 00072 virtual void set_servant_manager ( 00073 PortableServer::ServantManager_ptr imgr 00074 ) 00075 = 0; 00076 00077 virtual void set_servant (PortableServer::Servant servant ) 00078 = 0; 00079 00080 #endif /* TAO_HAS_MINIMUM_POA == 0 */ 00081 00082 virtual PortableServer::Servant get_servant (void) 00083 = 0; 00084 00085 virtual TAO_SERVANT_LOCATION locate_servant ( 00086 const PortableServer::ObjectId &system_id, 00087 PortableServer::Servant &servant 00088 ) = 0; 00089 00090 virtual PortableServer::Servant locate_servant ( 00091 const char *operation, 00092 const PortableServer::ObjectId &system_id, 00093 TAO::Portable_Server::Servant_Upcall &servant_upcall, 00094 TAO::Portable_Server::POA_Current_Impl &poa_current_impl, 00095 bool &wait_occurred_restart_call 00096 ) = 0; 00097 00098 virtual void cleanup_servant ( 00099 PortableServer::Servant servant, 00100 const PortableServer::ObjectId &user_id 00101 ) = 0; 00102 00103 virtual PortableServer::Servant system_id_to_servant ( 00104 const PortableServer::ObjectId &system_id 00105 ) = 0; 00106 00107 virtual PortableServer::Servant id_to_servant ( 00108 const PortableServer::ObjectId &id 00109 ) 00110 = 0; 00111 00112 virtual void etherealize_objects (CORBA::Boolean etherealize_objects) = 0; 00113 00114 virtual PortableServer::ObjectId *servant_to_id ( 00115 PortableServer::Servant servant 00116 ) 00117 = 0; 00118 00119 virtual void post_invoke_servant_cleanup( 00120 const PortableServer::ObjectId &system_id, 00121 const TAO::Portable_Server::Servant_Upcall &servant_upcall) = 0; 00122 00123 virtual ::PortableServer::RequestProcessingPolicyValue type() const = 0; 00124 00125 virtual ::PortableServer::ServantRetentionPolicyValue sr_type() const; 00126 00127 protected: 00128 TAO_Root_POA* poa_; 00129 ::PortableServer::ServantRetentionPolicyValue sr_value_; 00130 }; 00131 } 00132 } 00133 00134 TAO_END_VERSIONED_NAMESPACE_DECL 00135 00136 #include /**/ "ace/post.h" 00137 #endif /* TAO_REQUEST_PROCESSING_STRATEGY_H */