RT_POA.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: RT_POA.inl 79672 2007-09-20 08:39: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 #if !defined (CORBA_E_MICRO)
00027 ACE_INLINE CORBA::Object_ptr
00028 TAO_RT_POA::create_reference_with_id_and_priority (const PortableServer::ObjectId & oid,
00029                                                    const char * intf,
00030                                                    RTCORBA::Priority priority)
00031 {
00032   // Check that this method can be used based on this POA's policies.
00033   this->validate_policies ();
00034 
00035   this->validate_priority (priority);
00036 
00037   // Lock access for the duration of this transaction.
00038   TAO_POA_GUARD_RETURN (0);
00039 
00040   return this->create_reference_with_id_i (oid, intf, priority);
00041 }
00042 #endif
00043 
00044 ACE_INLINE PortableServer::ObjectId *
00045 TAO_RT_POA::activate_object_with_priority (PortableServer::Servant servant,
00046                                            RTCORBA::Priority priority)
00047 {
00048   // Check that this method can be used based on this POA's policies.
00049   this->validate_policies ();
00050 
00051   this->validate_priority (priority);
00052 
00053   while (true)
00054     {
00055       bool wait_occurred_restart_call = false;
00056 
00057       // Lock access for the duration of this transaction.
00058       TAO_POA_GUARD_RETURN (0);
00059 
00060       PortableServer::ObjectId *result =
00061         this->activate_object_i (servant, priority, wait_occurred_restart_call);
00062 
00063       // If we ended up waiting on a condition variable, the POA state
00064       // may have changed while we are waiting.  Therefore, we need to
00065       // restart this call.
00066       if (wait_occurred_restart_call)
00067         continue;
00068       else
00069         return result;
00070     }
00071 }
00072 
00073 #if !defined (CORBA_E_MICRO)
00074 ACE_INLINE void
00075 TAO_RT_POA::activate_object_with_id_and_priority (const PortableServer::ObjectId & oid,
00076                                                   PortableServer::Servant servant,
00077                                                   RTCORBA::Priority priority)
00078 {
00079   // Check that this method can be used based on this POA's policies.
00080   this->validate_policies ();
00081 
00082   this->validate_priority (priority);
00083 
00084   while (true)
00085     {
00086       bool wait_occurred_restart_call = false;
00087 
00088       // Lock access for the duration of this transaction.
00089       TAO_POA_GUARD;
00090 
00091       this->activate_object_with_id_i (oid,
00092                                        servant,
00093                                        priority,
00094                                        wait_occurred_restart_call);
00095 
00096       // If we ended up waiting on a condition variable, the POA state
00097       // may have changed while we are waiting.  Therefore, we need to
00098       // restart this call.
00099       if (wait_occurred_restart_call)
00100         continue;
00101       else
00102         return;
00103     }
00104 }
00105 #endif
00106 
00107 ACE_INLINE void *
00108 TAO_RT_POA::thread_pool (void) const
00109 {
00110   return this->thread_pool_;
00111 }
00112 
00113 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:42:24 2010 for TAO_RTPortableServer by  doxygen 1.4.7