00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_SERVANT_RETENTION_STRATEGY_NON_RETAIN_H
00014 #define TAO_SERVANT_RETENTION_STRATEGY_NON_RETAIN_H
00015 #include "ace/pre.h"
00016
00017 #include "tao/PortableServer/ServantRetentionStrategy.h"
00018
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif
00022
00023 #include "tao/PortableServer/Servant_Location.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 ServantRetentionStrategyNonRetain
00034 : public ServantRetentionStrategy
00035 {
00036 public:
00037 ServantRetentionStrategyNonRetain (void);
00038
00039 virtual void strategy_init (TAO_Root_POA *poa ACE_ENV_ARG_DECL);
00040
00041 virtual void strategy_cleanup(ACE_ENV_SINGLE_ARG_DECL);
00042
00043 CORBA::ULong waiting_servant_deactivation (void) const;
00044
00045 virtual
00046 PortableServer::ObjectId *
00047 activate_object (PortableServer::Servant servant,
00048 CORBA::Short priority,
00049 int &wait_occurred_restart_call
00050 ACE_ENV_ARG_DECL)
00051 ACE_THROW_SPEC ((CORBA::SystemException,
00052 PortableServer::POA::ServantAlreadyActive,
00053 PortableServer::POA::WrongPolicy));
00054
00055 #if !defined (CORBA_E_MICRO)
00056 virtual
00057 void
00058 activate_object_with_id (const PortableServer::ObjectId &id,
00059 PortableServer::Servant servant,
00060 CORBA::Short priority,
00061 int &wait_occurred_restart_call
00062 ACE_ENV_ARG_DECL)
00063 ACE_THROW_SPEC ((CORBA::SystemException,
00064 PortableServer::POA::ServantAlreadyActive,
00065 PortableServer::POA::ObjectAlreadyActive,
00066 PortableServer::POA::WrongPolicy));
00067 #endif
00068
00069 virtual void deactivate_object (const PortableServer::ObjectId &id
00070 ACE_ENV_ARG_DECL);
00071
00072 virtual PortableServer::Servant find_servant (
00073 const PortableServer::ObjectId &system_id
00074 ACE_ENV_ARG_DECL);
00075
00076 virtual int is_servant_in_map (PortableServer::Servant servant,
00077 int &wait_occurred_restart_call);
00078
00079 virtual PortableServer::ObjectId *system_id_to_object_id (
00080 const PortableServer::ObjectId &system_id
00081 ACE_ENV_ARG_DECL)
00082 ACE_THROW_SPEC ((CORBA::SystemException,
00083 PortableServer::POA::WrongAdapter,
00084 PortableServer::POA::WrongPolicy));
00085
00086 virtual
00087 PortableServer::Servant
00088 user_id_to_servant (const PortableServer::ObjectId &id
00089 ACE_ENV_ARG_DECL)
00090 ACE_THROW_SPEC ((CORBA::SystemException,
00091 PortableServer::POA::ObjectNotActive,
00092 PortableServer::POA::WrongPolicy));
00093
00094 CORBA::Object_ptr
00095 id_to_reference (const PortableServer::ObjectId &id,
00096 bool indirect
00097 ACE_ENV_ARG_DECL)
00098 ACE_THROW_SPEC ((CORBA::SystemException,
00099 PortableServer::POA::ObjectNotActive,
00100 PortableServer::POA::WrongPolicy));
00101
00102 virtual TAO_SERVANT_LOCATION servant_present (
00103 const PortableServer::ObjectId &system_id,
00104 PortableServer::Servant &servant
00105 ACE_ENV_ARG_DECL);
00106
00107 virtual PortableServer::Servant find_servant (
00108 const PortableServer::ObjectId &system_id,
00109 TAO::Portable_Server::Servant_Upcall &servant_upcall,
00110 TAO::Portable_Server::POA_Current_Impl &poa_current_impl
00111 ACE_ENV_ARG_DECL);
00112
00113 virtual int find_servant_priority (
00114 const PortableServer::ObjectId &system_id,
00115 CORBA::Short &priority
00116 ACE_ENV_ARG_DECL);
00117
00118 virtual void deactivate_all_objects (ACE_ENV_SINGLE_ARG_DECL)
00119 ACE_THROW_SPEC ((CORBA::SystemException,
00120 PortableServer::POA::WrongPolicy));
00121
00122 virtual PortableServer::ObjectId *servant_to_user_id (
00123 PortableServer::Servant servant
00124 ACE_ENV_ARG_DECL)
00125 ACE_THROW_SPEC ((CORBA::SystemException,
00126 PortableServer::POA::ServantNotActive,
00127 PortableServer::POA::WrongPolicy));
00128
00129 virtual CORBA::Object_ptr servant_to_reference (
00130 PortableServer::Servant servant
00131 ACE_ENV_ARG_DECL)
00132 ACE_THROW_SPEC ((CORBA::SystemException,
00133 PortableServer::POA::ServantNotActive,
00134 PortableServer::POA::WrongPolicy));
00135
00136 virtual CORBA::Object_ptr create_reference (
00137 const char *intf,
00138 CORBA::Short priority
00139 ACE_ENV_ARG_DECL)
00140 ACE_THROW_SPEC ((CORBA::SystemException,
00141 PortableServer::POA::WrongPolicy));
00142
00143 virtual CORBA::Object_ptr create_reference_with_id (
00144 const PortableServer::ObjectId &oid,
00145 const char *intf,
00146 CORBA::Short priority
00147 ACE_ENV_ARG_DECL)
00148 ACE_THROW_SPEC ((CORBA::SystemException));
00149
00150 virtual int rebind_using_user_id_and_system_id (
00151 PortableServer::Servant servant,
00152 const PortableServer::ObjectId &user_id,
00153 const PortableServer::ObjectId &system_id,
00154 TAO::Portable_Server::Servant_Upcall &servant_upcall);
00155
00156 virtual CORBA::Boolean servant_has_remaining_activations (
00157 PortableServer::Servant servant);
00158
00159 virtual int unbind_using_user_id (
00160 const PortableServer::ObjectId &user_id);
00161
00162 virtual ::PortableServer::ServantRetentionPolicyValue type() const;
00163
00164 protected:
00165 TAO_Root_POA *poa_;
00166 };
00167 }
00168 }
00169
00170 TAO_END_VERSIONED_NAMESPACE_DECL
00171
00172 #include "ace/post.h"
00173 #endif