00001
00002
00003
00004
00005
00006
00007
00008
00009
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
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(ACE_ENV_SINGLE_ARG_DECL);
00045
00046 PortableServer::ServantManager_ptr
00047 get_servant_manager (ACE_ENV_SINGLE_ARG_DECL)
00048 ACE_THROW_SPEC ((CORBA::SystemException,
00049 PortableServer::POA::WrongPolicy));
00050
00051 void set_servant_manager (
00052 PortableServer::ServantManager_ptr imgr
00053 ACE_ENV_ARG_DECL)
00054 ACE_THROW_SPEC ((CORBA::SystemException,
00055 PortableServer::POA::WrongPolicy));
00056
00057 PortableServer::Servant get_servant (ACE_ENV_SINGLE_ARG_DECL)
00058 ACE_THROW_SPEC ((CORBA::SystemException,
00059 PortableServer::POA::WrongPolicy));
00060
00061 void set_servant (
00062 PortableServer::Servant servant
00063 ACE_ENV_ARG_DECL)
00064 ACE_THROW_SPEC ((CORBA::SystemException,
00065 PortableServer::POA::WrongPolicy));
00066
00067 virtual TAO_SERVANT_LOCATION locate_servant (
00068 const PortableServer::ObjectId &system_id,
00069 PortableServer::Servant &servant
00070 ACE_ENV_ARG_DECL);
00071
00072 virtual PortableServer::Servant locate_servant (
00073 const char *operation,
00074 const PortableServer::ObjectId &system_id,
00075 TAO::Portable_Server::Servant_Upcall &servant_upcall,
00076 TAO::Portable_Server::POA_Current_Impl &poa_current_impl,
00077 int &wait_occurred_restart_call
00078 ACE_ENV_ARG_DECL);
00079
00080 virtual PortableServer::Servant system_id_to_servant (
00081 const PortableServer::ObjectId &system_id
00082 ACE_ENV_ARG_DECL);
00083
00084 virtual PortableServer::Servant id_to_servant (
00085 const PortableServer::ObjectId &id
00086 ACE_ENV_ARG_DECL)
00087 ACE_THROW_SPEC ((CORBA::SystemException,
00088 PortableServer::POA::ObjectNotActive,
00089 PortableServer::POA::WrongPolicy));
00090
00091 virtual void cleanup_servant (
00092 PortableServer::Servant servant,
00093 const PortableServer::ObjectId &user_id
00094 ACE_ENV_ARG_DECL);
00095
00096 virtual void etherealize_objects (CORBA::Boolean etherealize_objects);
00097
00098 virtual PortableServer::ObjectId *servant_to_id (
00099 PortableServer::Servant servant
00100 ACE_ENV_ARG_DECL)
00101 ACE_THROW_SPEC ((CORBA::SystemException,
00102 PortableServer::POA::ServantNotActive,
00103 PortableServer::POA::WrongPolicy));
00104
00105 virtual void post_invoke_servant_cleanup(
00106 const PortableServer::ObjectId &system_id,
00107 const TAO::Portable_Server::Servant_Upcall &servant_upcall);
00108
00109 virtual ::PortableServer::RequestProcessingPolicyValue type() const;
00110
00111 private:
00112 PortableServer::ServantBase_var default_servant_;
00113 };
00114
00115 }
00116 }
00117
00118 TAO_END_VERSIONED_NAMESPACE_DECL
00119
00120 #endif
00121
00122 #include "ace/post.h"
00123 #endif