Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef TAO_RT_POA_H
00016 #define TAO_RT_POA_H
00017
00018 #include "ace/pre.h"
00019
00020 #include "tao/RTPortableServer/rtportableserver_export.h"
00021
00022 #include "tao/PortableServer/Regular_POA.h"
00023 #include "tao/orbconf.h"
00024
00025 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
00026
00027 #define TAO_RT_PORTABLESERVER_SAFE_INCLUDE
00028 #include "tao/RTPortableServer/RTPortableServerC.h"
00029 #undef TAO_RT_PORTABLESERVER_SAFE_INCLUDE
00030
00031 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00032 # pragma once
00033 #endif
00034
00035
00036
00037 #if defined(_MSC_VER)
00038 #pragma warning(push)
00039 #pragma warning(disable:4250)
00040 #endif
00041
00042 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00043
00044 class TAO_Thread_Pool;
00045 class TAO_Thread_Lane;
00046 class TAO_PriorityBandedConnectionPolicy;
00047
00048 class TAO_RTPortableServer_Export TAO_RT_POA
00049 : public virtual RTPortableServer::POA
00050 , public virtual TAO_Regular_POA
00051 {
00052 public:
00053
00054
00055 CORBA::Object_ptr create_reference_with_priority (const char * intf,
00056 RTCORBA::Priority priority);
00057
00058 #if !defined (CORBA_E_MICRO)
00059 CORBA::Object_ptr create_reference_with_id_and_priority (const PortableServer::ObjectId & oid,
00060 const char * intf,
00061 RTCORBA::Priority priority);
00062 #endif
00063
00064 PortableServer::ObjectId * activate_object_with_priority (PortableServer::Servant p_servant,
00065 RTCORBA::Priority priority);
00066
00067 #if !defined (CORBA_E_MICRO)
00068 void activate_object_with_id_and_priority (const PortableServer::ObjectId & oid,
00069 PortableServer::Servant p_servant,
00070 RTCORBA::Priority priority);
00071 #endif
00072
00073
00074
00075 PortableServer::POA_ptr create_POA (const char *adapter_name,
00076 PortableServer::POAManager_ptr poa_manager,
00077 const CORBA::PolicyList &policies);
00078
00079 PortableServer::POA_ptr find_POA (const char *adapter_name,
00080 CORBA::Boolean activate_it);
00081
00082 void destroy (CORBA::Boolean etherealize_objects,
00083 CORBA::Boolean wait_for_completion);
00084
00085 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00086
00087 PortableServer::ThreadPolicy_ptr create_thread_policy (
00088 PortableServer::ThreadPolicyValue value);
00089
00090 #endif
00091
00092 #if !defined (CORBA_E_MICRO)
00093 PortableServer::LifespanPolicy_ptr create_lifespan_policy (
00094 PortableServer::LifespanPolicyValue value);
00095 #endif
00096
00097 #if !defined (CORBA_E_MICRO)
00098 PortableServer::IdUniquenessPolicy_ptr create_id_uniqueness_policy (
00099 PortableServer::IdUniquenessPolicyValue value);
00100 #endif
00101
00102 #if !defined (CORBA_E_MICRO)
00103 PortableServer::IdAssignmentPolicy_ptr create_id_assignment_policy (
00104 PortableServer::IdAssignmentPolicyValue value);
00105 #endif
00106
00107 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00108 PortableServer::ImplicitActivationPolicy_ptr
00109 create_implicit_activation_policy (
00110 PortableServer::ImplicitActivationPolicyValue value);
00111
00112 PortableServer::ServantRetentionPolicy_ptr
00113 create_servant_retention_policy (
00114 PortableServer::ServantRetentionPolicyValue value);
00115
00116 PortableServer::RequestProcessingPolicy_ptr
00117 create_request_processing_policy (
00118 PortableServer::RequestProcessingPolicyValue value);
00119
00120 #endif
00121
00122 char * the_name (void);
00123
00124 PortableServer::POA_ptr the_parent (void);
00125
00126 PortableServer::POAList *the_children (void);
00127
00128 PortableServer::POAManager_ptr the_POAManager (void);
00129
00130 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00131
00132 PortableServer::AdapterActivator_ptr the_activator (void);
00133
00134 void the_activator (PortableServer::AdapterActivator_ptr adapter_activator);
00135
00136 PortableServer::ServantManager_ptr get_servant_manager (void);
00137
00138 void set_servant_manager (PortableServer::ServantManager_ptr imgr);
00139
00140 PortableServer::Servant get_servant (void);
00141
00142 void set_servant (PortableServer::Servant servant);
00143
00144 #endif
00145
00146 PortableServer::ObjectId *activate_object (PortableServer::Servant p_servant);
00147
00148 #if !defined (CORBA_E_MICRO)
00149 void activate_object_with_id (const PortableServer::ObjectId &id,
00150 PortableServer::Servant p_servant);
00151 #endif
00152
00153 void deactivate_object (const PortableServer::ObjectId &oid);
00154
00155 CORBA::Object_ptr create_reference (const char *intf);
00156
00157 #if !defined (CORBA_E_MICRO)
00158 CORBA::Object_ptr create_reference_with_id (const PortableServer::ObjectId &oid,
00159 const char *intf);
00160 #endif
00161
00162 PortableServer::ObjectId *servant_to_id (PortableServer::Servant p_servant);
00163
00164 CORBA::Object_ptr servant_to_reference (PortableServer::Servant p_servant);
00165
00166 PortableServer::Servant reference_to_servant (CORBA::Object_ptr reference);
00167
00168 PortableServer::ObjectId *reference_to_id (CORBA::Object_ptr reference);
00169
00170 PortableServer::Servant id_to_servant (const PortableServer::ObjectId &oid);
00171
00172 CORBA::Object_ptr id_to_reference (const PortableServer::ObjectId &oid);
00173
00174 CORBA::OctetSeq *id (void);
00175
00176
00177
00178 virtual CORBA::PolicyList *client_exposed_policies (CORBA::Short object_priority);
00179
00180 TAO_RT_POA (const String &name,
00181 PortableServer::POAManager_ptr poa_manager,
00182 const TAO_POA_Policy_Set &policies,
00183 TAO_Root_POA *parent,
00184 ACE_Lock &lock,
00185 TAO_SYNCH_MUTEX &thread_lock,
00186 TAO_ORB_Core &orb_core,
00187 TAO_Object_Adapter *object_adapter);
00188
00189 virtual ~TAO_RT_POA (void);
00190
00191 void *thread_pool (void) const;
00192
00193 protected:
00194
00195
00196 virtual TAO_Root_POA *new_POA (const String &name,
00197 PortableServer::POAManager_ptr poa_manager,
00198 const TAO_POA_Policy_Set &policies,
00199 TAO_Root_POA *parent,
00200 ACE_Lock &lock,
00201 TAO_SYNCH_MUTEX &thread_lock,
00202 TAO_ORB_Core &orb_core,
00203 TAO_Object_Adapter *object_adapter);
00204
00205 virtual TAO_Stub *key_to_stub_i (const TAO::ObjectKey &key,
00206 const char *type_id,
00207 CORBA::Short priority);
00208
00209 void validate_priority (RTCORBA::Priority priority);
00210
00211 void validate_policies (void);
00212
00213
00214
00215 void parse_rt_policies (TAO_POA_Policy_Set &policies);
00216
00217 size_t endpoint_count (void);
00218
00219 TAO_Stub *create_stub_object (const TAO::ObjectKey &object_key,
00220 const char *type_id,
00221 CORBA::PolicyList *policy_list,
00222 TAO_Acceptor_Filter *filter,
00223 TAO_PriorityBandedConnectionPolicy *priority_bands
00224 );
00225
00226 int lane_required (TAO_Thread_Lane *lane,
00227 TAO_PriorityBandedConnectionPolicy *priority_bands);
00228
00229 TAO_Thread_Pool *thread_pool_;
00230 };
00231
00232 TAO_END_VERSIONED_NAMESPACE_DECL
00233
00234 #if defined(_MSC_VER)
00235 #pragma warning(pop)
00236 #endif
00237
00238 #if defined (__ACE_INLINE__)
00239 # include "tao/RTPortableServer/RT_POA.inl"
00240 #endif
00241
00242 #endif
00243
00244 #include "ace/post.h"
00245
00246 #endif