00001
00002
00003
00004
00005
00006
00007
00008
00009
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
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 ACE_ENV_ARG_DECL);
00058
00059 virtual void strategy_init(
00060 TAO_Root_POA *poa,
00061 ::PortableServer::ServantRetentionPolicyValue
00062 ACE_ENV_ARG_DECL);
00063
00064 virtual void strategy_cleanup(ACE_ENV_SINGLE_ARG_DECL);
00065
00066 #if (TAO_HAS_MINIMUM_POA == 0)
00067
00068 virtual PortableServer::ServantManager_ptr get_servant_manager (
00069 ACE_ENV_SINGLE_ARG_DECL)
00070 ACE_THROW_SPEC ((CORBA::SystemException,
00071 PortableServer::POA::WrongPolicy)) = 0;
00072
00073 virtual void set_servant_manager (
00074 PortableServer::ServantManager_ptr imgr
00075 ACE_ENV_ARG_DECL)
00076 ACE_THROW_SPEC ((CORBA::SystemException,
00077 PortableServer::POA::WrongPolicy)) = 0;
00078
00079 virtual void set_servant (PortableServer::Servant servant ACE_ENV_ARG_DECL)
00080 ACE_THROW_SPEC ((CORBA::SystemException,
00081 PortableServer::POA::WrongPolicy)) = 0;
00082
00083 #endif
00084
00085 virtual PortableServer::Servant get_servant (ACE_ENV_SINGLE_ARG_DECL)
00086 ACE_THROW_SPEC ((CORBA::SystemException,
00087 PortableServer::POA::WrongPolicy)) = 0;
00088
00089 virtual TAO_SERVANT_LOCATION locate_servant (
00090 const PortableServer::ObjectId &system_id,
00091 PortableServer::Servant &servant
00092 ACE_ENV_ARG_DECL) = 0;
00093
00094 virtual PortableServer::Servant locate_servant (
00095 const char *operation,
00096 const PortableServer::ObjectId &system_id,
00097 TAO::Portable_Server::Servant_Upcall &servant_upcall,
00098 TAO::Portable_Server::POA_Current_Impl &poa_current_impl,
00099 int &wait_occurred_restart_call
00100 ACE_ENV_ARG_DECL) = 0;
00101
00102 virtual void cleanup_servant (
00103 PortableServer::Servant servant,
00104 const PortableServer::ObjectId &user_id
00105 ACE_ENV_ARG_DECL) = 0;
00106
00107 virtual PortableServer::Servant system_id_to_servant (
00108 const PortableServer::ObjectId &system_id
00109 ACE_ENV_ARG_DECL) = 0;
00110
00111 virtual PortableServer::Servant id_to_servant (
00112 const PortableServer::ObjectId &id
00113 ACE_ENV_ARG_DECL)
00114 ACE_THROW_SPEC ((CORBA::SystemException,
00115 PortableServer::POA::ObjectNotActive,
00116 PortableServer::POA::WrongPolicy)) = 0;
00117
00118 virtual void etherealize_objects (CORBA::Boolean etherealize_objects) = 0;
00119
00120 virtual PortableServer::ObjectId *servant_to_id (
00121 PortableServer::Servant servant
00122 ACE_ENV_ARG_DECL)
00123 ACE_THROW_SPEC ((CORBA::SystemException,
00124 PortableServer::POA::ServantNotActive,
00125 PortableServer::POA::WrongPolicy)) = 0;
00126
00127 virtual void post_invoke_servant_cleanup(
00128 const PortableServer::ObjectId &system_id,
00129 const TAO::Portable_Server::Servant_Upcall &servant_upcall) = 0;
00130
00131 virtual ::PortableServer::RequestProcessingPolicyValue type() const = 0;
00132
00133 virtual ::PortableServer::ServantRetentionPolicyValue sr_type() const;
00134
00135 protected:
00136 TAO_Root_POA* poa_;
00137 ::PortableServer::ServantRetentionPolicyValue sr_value_;
00138 };
00139 }
00140 }
00141
00142 TAO_END_VERSIONED_NAMESPACE_DECL
00143
00144 #include "ace/post.h"
00145 #endif