Object_Adapter.inl

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

Generated on Tue Feb 2 17:40:54 2010 for TAO_PortableServer by  doxygen 1.4.7