RT_POA.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: RT_POA.inl 77155 2007-02-15 15:23:19Z johnnyw $
00004 
00005 // Exception macros
00006 #include "tao/PortableServer/poa_macros.h"
00007 #include "tao/PortableServer/POA_Guard.h"
00008 
00009 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00010 
00011 ACE_INLINE CORBA::Object_ptr
00012 TAO_RT_POA::create_reference_with_priority (const char * intf,
00013                                             RTCORBA::Priority priority)
00014 {
00015   // Check that this method can be used based on this POA's policies.
00016   this->validate_policies ();
00017 
00018   this->validate_priority (priority);
00019 
00020   // Lock access for the duration of this transaction.
00021   TAO_POA_GUARD_RETURN (0);
00022 
00023   return this->create_reference_i (intf, priority);
00024 }
00025 
00026 ACE_INLINE CORBA::Object_ptr
00027 TAO_RT_POA::create_reference_with_id_and_priority (const PortableServer::ObjectId & oid,
00028                                                    const char * intf,
00029                                                    RTCORBA::Priority priority)
00030 {
00031   // Check that this method can be used based on this POA's policies.
00032   this->validate_policies ();
00033 
00034   this->validate_priority (priority);
00035 
00036   // Lock access for the duration of this transaction.
00037   TAO_POA_GUARD_RETURN (0);
00038 
00039   return this->create_reference_with_id_i (oid, intf, priority);
00040 }
00041 
00042 ACE_INLINE PortableServer::ObjectId *
00043 TAO_RT_POA::activate_object_with_priority (PortableServer::Servant servant,
00044                                            RTCORBA::Priority priority)
00045 {
00046   // Check that this method can be used based on this POA's policies.
00047   this->validate_policies ();
00048 
00049   this->validate_priority (priority);
00050 
00051   while (true)
00052     {
00053       bool wait_occurred_restart_call = false;
00054 
00055       // Lock access for the duration of this transaction.
00056       TAO_POA_GUARD_RETURN (0);
00057 
00058       PortableServer::ObjectId *result =
00059         this->activate_object_i (servant, priority, wait_occurred_restart_call);
00060 
00061       // If we ended up waiting on a condition variable, the POA state
00062       // may have changed while we are waiting.  Therefore, we need to
00063       // restart this call.
00064       if (wait_occurred_restart_call)
00065         continue;
00066       else
00067         return result;
00068     }
00069 }
00070 
00071 ACE_INLINE void
00072 TAO_RT_POA::activate_object_with_id_and_priority (const PortableServer::ObjectId & oid,
00073                                                   PortableServer::Servant servant,
00074                                                   RTCORBA::Priority priority)
00075 {
00076   // Check that this method can be used based on this POA's policies.
00077   this->validate_policies ();
00078 
00079   this->validate_priority (priority);
00080 
00081   while (true)
00082     {
00083       bool wait_occurred_restart_call = false;
00084 
00085       // Lock access for the duration of this transaction.
00086       TAO_POA_GUARD;
00087 
00088       this->activate_object_with_id_i (oid,
00089                                        servant,
00090                                        priority,
00091                                        wait_occurred_restart_call);
00092 
00093       // If we ended up waiting on a condition variable, the POA state
00094       // may have changed while we are waiting.  Therefore, we need to
00095       // restart this call.
00096       if (wait_occurred_restart_call)
00097         continue;
00098       else
00099         return;
00100     }
00101 }
00102 
00103 ACE_INLINE void *
00104 TAO_RT_POA::thread_pool (void) const
00105 {
00106   return this->thread_pool_;
00107 }
00108 
00109 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Sun Jan 27 13:31:11 2008 for TAO_RTPortableServer by doxygen 1.3.6