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