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) = 0;
00050
00051 virtual PortableServer::Servant find_servant (
00052 const PortableServer::ObjectId &system_id,
00053 TAO::Portable_Server::Servant_Upcall &servant_upcall,
00054 TAO::Portable_Server::POA_Current_Impl &poa_current_impl) = 0;
00055
00056 virtual int find_servant_priority (
00057 const PortableServer::ObjectId &system_id,
00058 CORBA::Short &priority) = 0;
00059
00060 virtual PortableServer::ObjectId *activate_object (
00061 PortableServer::Servant servant,
00062 CORBA::Short priority,
00063 bool &wait_occurred_restart_call) = 0;
00064
00065 #if !defined (CORBA_E_MICRO)
00066 virtual void activate_object_with_id (
00067 const PortableServer::ObjectId &id,
00068 PortableServer::Servant servant,
00069 CORBA::Short priority,
00070 bool &wait_occurred_restart_call) = 0;
00071 #endif
00072
00073 virtual void deactivate_object (const PortableServer::ObjectId &id) = 0;
00074
00075 virtual PortableServer::Servant find_servant (
00076 const PortableServer::ObjectId &system_id) = 0;
00077
00078 virtual PortableServer::ObjectId *system_id_to_object_id (
00079 const PortableServer::ObjectId &system_id) = 0;
00080
00081 virtual PortableServer::Servant user_id_to_servant (
00082 const PortableServer::ObjectId &id) = 0;
00083
00084 virtual CORBA::Object_ptr id_to_reference (
00085 const PortableServer::ObjectId &id,
00086 bool indirect) = 0;
00087
00088 virtual void deactivate_all_objects (void) = 0;
00089
00090 virtual PortableServer::ObjectId *servant_to_user_id (
00091 PortableServer::Servant servant) = 0;
00092
00093 virtual CORBA::Object_ptr servant_to_reference (
00094 PortableServer::Servant servant) = 0;
00095
00096 virtual CORBA::Object_ptr create_reference (
00097 const char *intf,
00098 CORBA::Short priority) = 0;
00099
00100 #if !defined (CORBA_E_MICRO)
00101 virtual CORBA::Object_ptr create_reference_with_id (
00102 const PortableServer::ObjectId &oid,
00103 const char *intf,
00104 CORBA::Short priority) = 0;
00105 #endif
00106
00107 virtual int rebind_using_user_id_and_system_id (
00108 PortableServer::Servant servant,
00109 const PortableServer::ObjectId &user_id,
00110 const PortableServer::ObjectId &system_id,
00111 TAO::Portable_Server::Servant_Upcall &servant_upcall) = 0;
00112
00113 virtual int unbind_using_user_id (
00114 const PortableServer::ObjectId &user_id) = 0;
00115
00116 virtual CORBA::Boolean servant_has_remaining_activations (
00117 PortableServer::Servant servant) = 0;
00118
00119 virtual ::PortableServer::ServantRetentionPolicyValue type() const = 0;
00120 };
00121 }
00122 }
00123
00124 TAO_END_VERSIONED_NAMESPACE_DECL
00125
00126 #include "ace/post.h"
00127 #endif