Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_SERVANT_RETENTION_STRATEGY_RETAIN_H
00014 #define TAO_SERVANT_RETENTION_STRATEGY_RETAIN_H
00015 #include "ace/pre.h"
00016
00017 #include "tao/PortableServer/ServantRetentionStrategyNonRetain.h"
00018
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif
00022
00023 #include "ace/Auto_Ptr.h"
00024
00025 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00026
00027 class TAO_Root_POA;
00028
00029 namespace TAO
00030 {
00031 namespace Portable_Server
00032 {
00033 class ServantRetentionStrategyRetain
00034 : public ServantRetentionStrategyNonRetain
00035 {
00036 public:
00037 ServantRetentionStrategyRetain (void);
00038
00039 CORBA::ULong waiting_servant_deactivation (void) const;
00040
00041 virtual void strategy_init (TAO_Root_POA *poa);
00042
00043 virtual void strategy_cleanup(void);
00044
00045 virtual int is_servant_in_map (PortableServer::Servant servant,
00046 bool &wait_occurred_restart_call);
00047
00048 virtual
00049 PortableServer::ObjectId *
00050 activate_object (PortableServer::Servant servant,
00051 CORBA::Short priority,
00052 bool &wait_occurred_restart_call);
00053
00054 virtual
00055 void
00056 activate_object_with_id (const PortableServer::ObjectId &id,
00057 PortableServer::Servant servant,
00058 CORBA::Short priority,
00059 bool &wait_occurred_restart_call);
00060
00061 void deactivate_object (const PortableServer::ObjectId &id);
00062
00063 virtual PortableServer::Servant find_servant (
00064 const PortableServer::ObjectId &system_id);
00065
00066 virtual PortableServer::ObjectId * system_id_to_object_id (
00067 const PortableServer::ObjectId &system_id);
00068
00069 virtual
00070 PortableServer::Servant
00071 user_id_to_servant (const PortableServer::ObjectId &id);
00072
00073 CORBA::Object_ptr id_to_reference (const PortableServer::ObjectId &id,
00074 bool indirect);
00075
00076 virtual
00077 TAO_SERVANT_LOCATION
00078 servant_present (const PortableServer::ObjectId &system_id,
00079 PortableServer::Servant &servant);
00080
00081 virtual PortableServer::Servant find_servant (
00082 const PortableServer::ObjectId &system_id,
00083 TAO::Portable_Server::Servant_Upcall &servant_upcall,
00084 TAO::Portable_Server::POA_Current_Impl &poa_current_impl);
00085
00086 virtual int find_servant_priority (
00087 const PortableServer::ObjectId &system_id,
00088 CORBA::Short &priority);
00089
00090 virtual void deactivate_all_objects (void);
00091
00092 virtual PortableServer::ObjectId *servant_to_user_id (
00093 PortableServer::Servant servant);
00094
00095 virtual
00096 CORBA::Object_ptr servant_to_reference (PortableServer::Servant servant);
00097
00098 virtual
00099 CORBA::Object_ptr create_reference (
00100 const char *intf,
00101 CORBA::Short priority);
00102
00103 #if !defined (CORBA_E_MICRO)
00104 virtual
00105 CORBA::Object_ptr create_reference_with_id (
00106 const PortableServer::ObjectId &oid,
00107 const char *intf,
00108 CORBA::Short priority);
00109 #endif
00110
00111 virtual ::PortableServer::ServantRetentionPolicyValue type() const;
00112
00113 protected:
00114 int
00115 is_user_id_in_map (const PortableServer::ObjectId &id,
00116 CORBA::Short priority,
00117 bool &priorities_match,
00118 bool &wait_occurred_restart_call);
00119
00120 void
00121 deactivate_map_entry (TAO_Active_Object_Map_Entry *active_object_map_entry);
00122
00123 PortableServer::ObjectId *servant_to_system_id_i (
00124 PortableServer::Servant p_servant,
00125 CORBA::Short &priority);
00126
00127 virtual
00128 int rebind_using_user_id_and_system_id (
00129 PortableServer::Servant servant,
00130 const PortableServer::ObjectId &user_id,
00131 const PortableServer::ObjectId &system_id,
00132 TAO::Portable_Server::Servant_Upcall &servant_upcall);
00133
00134 virtual
00135 CORBA::Boolean servant_has_remaining_activations (
00136 PortableServer::Servant servant);
00137
00138 virtual int unbind_using_user_id (
00139 const PortableServer::ObjectId &user_id);
00140
00141 private:
00142 auto_ptr<TAO_Active_Object_Map> active_object_map_;
00143 CORBA::ULong waiting_servant_deactivation_;
00144 };
00145 }
00146 }
00147
00148 TAO_END_VERSIONED_NAMESPACE_DECL
00149
00150 #include "ace/post.h"
00151 #endif