ServantRetentionStrategy.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file ServantRetentionStrategy.h
00006  *
00007  *  ServantRetentionStrategy.h,v 1.9 2006/06/20 07:21:21 jwillemsen Exp
00008  *
00009  *  @author  Johnny Willemsen  <jwillemsen@remedy.nl>
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 /* ACE_LACKS_PRAGMA_ONCE */
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                                      int &wait_occurred_restart_call) = 0;
00046 
00047       virtual TAO_SERVANT_LOCATION servant_present (
00048         const PortableServer::ObjectId &system_id,
00049         PortableServer::Servant &servant
00050         ACE_ENV_ARG_DECL) = 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         ACE_ENV_ARG_DECL) = 0;
00057 
00058       virtual int find_servant_priority (
00059         const PortableServer::ObjectId &system_id,
00060         CORBA::Short &priority
00061         ACE_ENV_ARG_DECL) = 0;
00062 
00063       virtual PortableServer::ObjectId *activate_object (
00064         PortableServer::Servant servant,
00065         CORBA::Short priority,
00066         int &wait_occurred_restart_call
00067         ACE_ENV_ARG_DECL)
00068           ACE_THROW_SPEC ((CORBA::SystemException,
00069                            PortableServer::POA::ServantAlreadyActive,
00070                            PortableServer::POA::WrongPolicy)) = 0;
00071 
00072 #if !defined (CORBA_E_MICRO)
00073       virtual void activate_object_with_id (
00074         const PortableServer::ObjectId &id,
00075         PortableServer::Servant servant,
00076         CORBA::Short priority,
00077         int &wait_occurred_restart_call
00078         ACE_ENV_ARG_DECL)
00079           ACE_THROW_SPEC ((CORBA::SystemException,
00080                            PortableServer::POA::ServantAlreadyActive,
00081                            PortableServer::POA::ObjectAlreadyActive,
00082                            PortableServer::POA::WrongPolicy)) = 0;
00083 #endif
00084 
00085       virtual void deactivate_object (const PortableServer::ObjectId &id
00086                                       ACE_ENV_ARG_DECL) = 0;
00087 
00088       virtual PortableServer::Servant find_servant (
00089         const PortableServer::ObjectId &system_id
00090         ACE_ENV_ARG_DECL) = 0;
00091 
00092       virtual PortableServer::ObjectId *system_id_to_object_id (
00093         const PortableServer::ObjectId &system_id
00094         ACE_ENV_ARG_DECL)
00095           ACE_THROW_SPEC ((CORBA::SystemException,
00096                            PortableServer::POA::WrongAdapter,
00097                            PortableServer::POA::WrongPolicy)) = 0;
00098 
00099       virtual PortableServer::Servant user_id_to_servant (
00100         const PortableServer::ObjectId &id
00101         ACE_ENV_ARG_DECL)
00102           ACE_THROW_SPEC ((CORBA::SystemException,
00103                            PortableServer::POA::ObjectNotActive,
00104                            PortableServer::POA::WrongPolicy)) = 0;
00105 
00106       virtual CORBA::Object_ptr id_to_reference (
00107         const PortableServer::ObjectId &id,
00108         bool indirect
00109         ACE_ENV_ARG_DECL)
00110           ACE_THROW_SPEC ((CORBA::SystemException,
00111                            PortableServer::POA::ObjectNotActive,
00112                            PortableServer::POA::WrongPolicy)) = 0;
00113 
00114       virtual void deactivate_all_objects (ACE_ENV_SINGLE_ARG_DECL)
00115           ACE_THROW_SPEC ((CORBA::SystemException,
00116                            PortableServer::POA::WrongPolicy)) = 0;
00117 
00118       virtual PortableServer::ObjectId *servant_to_user_id (
00119         PortableServer::Servant servant
00120         ACE_ENV_ARG_DECL)
00121           ACE_THROW_SPEC ((CORBA::SystemException,
00122                            PortableServer::POA::ServantNotActive,
00123                            PortableServer::POA::WrongPolicy)) = 0;
00124 
00125       virtual CORBA::Object_ptr servant_to_reference (
00126         PortableServer::Servant servant
00127         ACE_ENV_ARG_DECL)
00128           ACE_THROW_SPEC ((CORBA::SystemException,
00129                            PortableServer::POA::ServantNotActive,
00130                            PortableServer::POA::WrongPolicy)) = 0;
00131 
00132       virtual CORBA::Object_ptr create_reference (
00133         const char *intf,
00134         CORBA::Short priority
00135         ACE_ENV_ARG_DECL)
00136           ACE_THROW_SPEC ((CORBA::SystemException,
00137                            PortableServer::POA::WrongPolicy)) = 0;
00138 
00139       virtual CORBA::Object_ptr create_reference_with_id (
00140         const PortableServer::ObjectId &oid,
00141         const char *intf,
00142         CORBA::Short priority
00143         ACE_ENV_ARG_DECL)
00144           ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00145 
00146       virtual int rebind_using_user_id_and_system_id (
00147         PortableServer::Servant servant,
00148         const PortableServer::ObjectId &user_id,
00149         const PortableServer::ObjectId &system_id,
00150         TAO::Portable_Server::Servant_Upcall &servant_upcall) = 0;
00151 
00152       virtual int unbind_using_user_id (
00153         const PortableServer::ObjectId &user_id) = 0;
00154 
00155       virtual CORBA::Boolean servant_has_remaining_activations (
00156         PortableServer::Servant servant) = 0;
00157 
00158       virtual ::PortableServer::ServantRetentionPolicyValue type() const = 0;
00159     };
00160   }
00161 }
00162 
00163 TAO_END_VERSIONED_NAMESPACE_DECL
00164 
00165 #include /**/ "ace/post.h"
00166 #endif /* TAO_SERVANTRETENTIONSTRATEGY_H */

Generated on Thu Nov 9 12:40:44 2006 for TAO_PortableServer by doxygen 1.3.6