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