00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file RequestProcessingStrategyServantActivator.h 00006 * 00007 * $Id: RequestProcessingStrategyServantActivator.h 80572 2008-02-05 20:02:46Z johnnyw $ 00008 * 00009 * @author Johnny Willemsen <jwillemsen@remedy.nl> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef TAO_REQUESTPROCESSINGSTRATEGYSERVANTACTIVATOR_H 00014 #define TAO_REQUESTPROCESSINGSTRATEGYSERVANTACTIVATOR_H 00015 #include /**/ "ace/pre.h" 00016 00017 #include "tao/PortableServer/RequestProcessingStrategyServantManager.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) 00024 00025 #include "tao/PortableServer/Servant_Location.h" 00026 #include "tao/PortableServer/PortableServer.h" 00027 #include "tao/PortableServer/ServantActivatorC.h" 00028 00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00030 00031 namespace TAO 00032 { 00033 namespace Portable_Server 00034 { 00035 class RequestProcessingStrategyServantActivator 00036 : public RequestProcessingStrategyServantManager 00037 { 00038 public: 00039 RequestProcessingStrategyServantActivator (void); 00040 00041 virtual void strategy_cleanup(void); 00042 00043 PortableServer::ServantManager_ptr get_servant_manager (void); 00044 00045 void set_servant_manager (PortableServer::ServantManager_ptr imgr); 00046 00047 virtual TAO_SERVANT_LOCATION locate_servant ( 00048 const PortableServer::ObjectId &system_id, 00049 PortableServer::Servant &servant); 00050 00051 virtual PortableServer::Servant locate_servant ( 00052 const char *operation, 00053 const PortableServer::ObjectId &system_id, 00054 TAO::Portable_Server::Servant_Upcall &servant_upcall, 00055 TAO::Portable_Server::POA_Current_Impl &poa_current_impl, 00056 bool &wait_occurred_restart_call); 00057 00058 virtual void cleanup_servant ( 00059 PortableServer::Servant servant, 00060 const PortableServer::ObjectId &user_id); 00061 00062 virtual void etherealize_objects (CORBA::Boolean etherealize_objects); 00063 00064 virtual void post_invoke_servant_cleanup( 00065 const PortableServer::ObjectId &system_id, 00066 const TAO::Portable_Server::Servant_Upcall &servant_upcall); 00067 00068 private: 00069 PortableServer::Servant incarnate_servant ( 00070 const PortableServer::ObjectId& object_id); 00071 00072 void etherealize_servant (const PortableServer::ObjectId& object_id, 00073 PortableServer::Servant servant, 00074 CORBA::Boolean cleanup_in_progress); 00075 00076 private: 00077 PortableServer::ServantActivator_var servant_activator_; 00078 CORBA::Boolean etherealize_objects_; 00079 }; 00080 } 00081 } 00082 00083 TAO_END_VERSIONED_NAMESPACE_DECL 00084 00085 #endif /* TAO_HAS_MINIMUM_POA == 0 */ 00086 00087 #include /**/ "ace/post.h" 00088 #endif /* TAO_REQUESTPROCESSINGSTRATEGYSERVANTACTIVATOR_H */