Object_Adapter.i

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Object_Adapter.i,v 1.17 2005/11/04 09:26:55 ossama Exp
00004 
00005 #include "tao/SystemException.h"
00006 
00007 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00008 
00009 ACE_INLINE TAO_Policy_Validator &
00010 TAO_Object_Adapter::validator (void)
00011 {
00012   return this->default_validator_;
00013 }
00014 
00015 ACE_INLINE int
00016 TAO_Object_Adapter::enable_locking (void) const
00017 {
00018   return this->enable_locking_;
00019 }
00020 
00021 ACE_INLINE TAO_POA_Policy_Set &
00022 TAO_Object_Adapter::default_poa_policies (void)
00023 {
00024   return this->default_poa_policies_;
00025 }
00026 
00027 ACE_INLINE ACE_Lock &
00028 TAO_Object_Adapter::lock (void)
00029 {
00030   return *this->lock_;
00031 }
00032 
00033 ACE_INLINE TAO_SYNCH_MUTEX &
00034 TAO_Object_Adapter::thread_lock (void)
00035 {
00036   return this->thread_lock_;
00037 }
00038 
00039 ACE_INLINE ACE_Reverse_Lock<ACE_Lock> &
00040 TAO_Object_Adapter::reverse_lock (void)
00041 {
00042   return this->reverse_lock_;
00043 }
00044 
00045 /* static */
00046 ACE_INLINE CORBA::ULong
00047 TAO_Object_Adapter::transient_poa_name_size ()
00048 {
00049   return TAO_Object_Adapter::transient_poa_name_size_;
00050 }
00051 
00052 ACE_INLINE int
00053 TAO_Object_Adapter::locate_servant (const TAO::ObjectKey &key
00054                                     ACE_ENV_ARG_DECL)
00055 {
00056   // Lock access for the duration of this transaction.
00057   TAO_OBJECT_ADAPTER_GUARD_RETURN (-1);
00058 
00059   return this->locate_servant_i (key
00060                                  ACE_ENV_ARG_PARAMETER);
00061 }
00062 
00063 ACE_INLINE TAO_SERVANT_LOCATION
00064 TAO_Object_Adapter::find_servant (const TAO::ObjectKey &key,
00065                                   PortableServer::Servant &servant
00066                                   ACE_ENV_ARG_DECL)
00067 {
00068   // Lock access for the duration of this transaction.
00069   TAO_OBJECT_ADAPTER_GUARD_RETURN (TAO_SERVANT_NOT_FOUND);
00070 
00071   return this->find_servant_i (key,
00072                                servant
00073                                ACE_ENV_ARG_PARAMETER);
00074 }
00075 
00076 ACE_INLINE int
00077 TAO_Object_Adapter::find_persistent_poa (const poa_name &system_name,
00078                                          TAO_Root_POA *&poa
00079                                          ACE_ENV_ARG_DECL)
00080 {
00081   return this->hint_strategy_->find_persistent_poa (system_name,
00082                                                     poa
00083                                                     ACE_ENV_ARG_PARAMETER);
00084 }
00085 
00086 ACE_INLINE int
00087 TAO_Object_Adapter::find_poa (const poa_name &system_name,
00088                               CORBA::Boolean activate_it,
00089                               CORBA::Boolean root,
00090                               const TAO::Portable_Server::Temporary_Creation_Time &poa_creation_time,
00091                               TAO_Root_POA *&poa
00092                               ACE_ENV_ARG_DECL)
00093 {
00094   if (activate_it)
00095     {
00096       return this->find_persistent_poa (system_name,
00097                                         poa
00098                                         ACE_ENV_ARG_PARAMETER);
00099     }
00100   else
00101     {
00102       return this->find_transient_poa (system_name,
00103                                        root,
00104                                        poa_creation_time,
00105                                        poa
00106                                        ACE_ENV_ARG_PARAMETER);
00107     }
00108 }
00109 
00110 ACE_INLINE int
00111 TAO_Object_Adapter::bind_transient_poa (TAO_Root_POA *poa,
00112                                         poa_name_out system_name)
00113 {
00114   poa_name name;
00115   int result = this->transient_poa_map_->bind_create_key (poa,
00116                                                           name);
00117 
00118   if (result == 0)
00119     {
00120       ACE_NEW_RETURN (system_name,
00121                       poa_name (name),
00122                       -1);
00123     }
00124 
00125   return result;
00126 }
00127 
00128 ACE_INLINE int
00129 TAO_Object_Adapter::bind_persistent_poa (const poa_name &folded_name,
00130                                          TAO_Root_POA *poa,
00131                                          poa_name_out system_name)
00132 {
00133   return this->hint_strategy_->bind_persistent_poa (folded_name,
00134                                                     poa,
00135                                                     system_name);
00136 }
00137 
00138 ACE_INLINE int
00139 TAO_Object_Adapter::unbind_transient_poa (const poa_name &system_name)
00140 {
00141   return this->transient_poa_map_->unbind (system_name);
00142 }
00143 
00144 ACE_INLINE int
00145 TAO_Object_Adapter::unbind_persistent_poa (const poa_name &folded_name,
00146                                            const poa_name &system_name)
00147 {
00148   return this->hint_strategy_->unbind_persistent_poa (folded_name,
00149                                                       system_name);
00150 }
00151 
00152 ACE_INLINE TAO_Root_POA *
00153 TAO_Object_Adapter::root_poa (void) const
00154 {
00155   return this->root_;
00156 }
00157 
00158 ACE_INLINE TAO_ORB_Core &
00159 TAO_Object_Adapter::orb_core (void) const
00160 {
00161   return this->orb_core_;
00162 }
00163 
00164 ACE_INLINE TAO::Portable_Server::Non_Servant_Upcall *
00165 TAO_Object_Adapter::non_servant_upcall_in_progress (void) const
00166 {
00167   return this->non_servant_upcall_in_progress_;
00168 }
00169 
00170 TAO_END_VERSIONED_NAMESPACE_DECL

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