00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_SERVANTRETENTIONSTRATEGY_H
00014 #define TAO_SERVANTRETENTIONSTRATEGY_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/Servant_Location.h"
00024 #include "tao/PortableServer/Servant_Upcall.h"
00025 #include "tao/PortableServer/ServantRetentionPolicyC.h"
00026 #include "tao/PortableServer/PortableServer.h"
00027
00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00029
00030 class TAO_Root_POA;
00031 class TAO_Active_Object_Map;
00032 struct TAO_Active_Object_Map_Entry;
00033
00034 namespace TAO
00035 {
00036 namespace Portable_Server
00037 {
00038 class ServantRetentionStrategy
00039 : public Policy_Strategy
00040 {
00041 public:
00042 virtual CORBA::ULong waiting_servant_deactivation (void) const = 0;
00043
00044 virtual int is_servant_in_map (PortableServer::Servant servant,
00045 bool &wait_occurred_restart_call) = 0;
00046
00047 virtual TAO_SERVANT_LOCATION servant_present (
00048 const PortableServer::ObjectId &system_id,
00049 PortableServer::Servant &servant
00050 ) = 0;
00051
00052 virtual PortableServer::Servant find_servant (
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 ) = 0;
00057
00058 virtual int find_servant_priority (
00059 const PortableServer::ObjectId &system_id,
00060 CORBA::Short &priority
00061 ) = 0;
00062
00063 virtual PortableServer::ObjectId *activate_object (
00064 PortableServer::Servant servant,
00065 CORBA::Short priority,
00066 bool &wait_occurred_restart_call
00067 )
00068 = 0;
00069
00070 #if !defined (CORBA_E_MICRO)
00071 virtual void activate_object_with_id (
00072 const PortableServer::ObjectId &id,
00073 PortableServer::Servant servant,
00074 CORBA::Short priority,
00075 bool &wait_occurred_restart_call
00076 )
00077 = 0;
00078 #endif
00079
00080 virtual void deactivate_object (const PortableServer::ObjectId &id
00081 ) = 0;
00082
00083 virtual PortableServer::Servant find_servant (
00084 const PortableServer::ObjectId &system_id
00085 ) = 0;
00086
00087 virtual PortableServer::ObjectId *system_id_to_object_id (
00088 const PortableServer::ObjectId &system_id
00089 )
00090 = 0;
00091
00092 virtual PortableServer::Servant user_id_to_servant (
00093 const PortableServer::ObjectId &id
00094 )
00095 = 0;
00096
00097 virtual CORBA::Object_ptr id_to_reference (
00098 const PortableServer::ObjectId &id,
00099 bool indirect
00100 )
00101 = 0;
00102
00103 virtual void deactivate_all_objects (void)
00104 = 0;
00105
00106 virtual PortableServer::ObjectId *servant_to_user_id (
00107 PortableServer::Servant servant
00108 )
00109 = 0;
00110
00111 virtual CORBA::Object_ptr servant_to_reference (
00112 PortableServer::Servant servant
00113 )
00114 = 0;
00115
00116 virtual CORBA::Object_ptr create_reference (
00117 const char *intf,
00118 CORBA::Short priority
00119 )
00120 = 0;
00121
00122 virtual CORBA::Object_ptr create_reference_with_id (
00123 const PortableServer::ObjectId &oid,
00124 const char *intf,
00125 CORBA::Short priority
00126 )
00127 = 0;
00128
00129 virtual int rebind_using_user_id_and_system_id (
00130 PortableServer::Servant servant,
00131 const PortableServer::ObjectId &user_id,
00132 const PortableServer::ObjectId &system_id,
00133 TAO::Portable_Server::Servant_Upcall &servant_upcall) = 0;
00134
00135 virtual int unbind_using_user_id (
00136 const PortableServer::ObjectId &user_id) = 0;
00137
00138 virtual CORBA::Boolean servant_has_remaining_activations (
00139 PortableServer::Servant servant) = 0;
00140
00141 virtual ::PortableServer::ServantRetentionPolicyValue type() const = 0;
00142 };
00143 }
00144 }
00145
00146 TAO_END_VERSIONED_NAMESPACE_DECL
00147
00148 #include "ace/post.h"
00149 #endif