00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef TAO_RT_ORB_H
00013 #define TAO_RT_ORB_H
00014 #include "ace/pre.h"
00015
00016 #include "tao/orbconf.h"
00017
00018 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #define TAO_RTCORBA_SAFE_INCLUDE
00025 #include "tao/RTCORBA/RTCORBAC.h"
00026 #undef TAO_RTCORBA_SAFE_INCLUDE
00027
00028 #include "tao/LocalObject.h"
00029 #include "ace/Hash_Map_Manager_T.h"
00030
00031 #if (TAO_HAS_NAMED_RT_MUTEXES == 1)
00032 # include "ace/Null_Mutex.h"
00033 #endif
00034
00035 #if defined(_MSC_VER)
00036 #pragma warning(push)
00037 #pragma warning(disable:4250)
00038 #endif
00039
00040 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00041
00042
00043 class TAO_RT_Mutex;
00044 class TAO_Thread_Pool_Manager;
00045
00046
00047
00048
00049
00050
00051
00052
00053 class TAO_RTCORBA_Export TAO_Named_RT_Mutex_Manager
00054 {
00055
00056 public:
00057
00058 TAO_Named_RT_Mutex_Manager (void);
00059
00060
00061 ~TAO_Named_RT_Mutex_Manager (void);
00062
00063 RTCORBA::Mutex_ptr create_mutex (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00064 ACE_THROW_SPEC ((CORBA::SystemException));
00065
00066 void destroy_mutex (RTCORBA::Mutex_ptr the_mutex
00067 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00068 ACE_THROW_SPEC ((CORBA::SystemException));
00069
00070 RTCORBA::Mutex_ptr create_named_mutex (const char *name,
00071 CORBA::Boolean_out created_flag
00072 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00073 ACE_THROW_SPEC ((CORBA::SystemException));
00074
00075 RTCORBA::Mutex_ptr open_named_mutex (const char * name
00076 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00077 ACE_THROW_SPEC ((CORBA::SystemException,
00078 RTCORBA::RTORB::MutexNotFound
00079 ));
00080
00081 private:
00082
00083 #if (TAO_HAS_NAMED_RT_MUTEXES == 1)
00084
00085 ACE_Hash_Map_Manager_Ex<
00086 ACE_CString,
00087 RTCORBA::Mutex_var,
00088 ACE_Hash<ACE_CString>,
00089 ACE_Equal_To<ACE_CString>,
00090 ACE_Null_Mutex> map_;
00091
00092 TAO_SYNCH_MUTEX lock_;
00093 #endif
00094 };
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105 class TAO_RTCORBA_Export TAO_RT_ORB
00106 : public RTCORBA::RTORB,
00107 public TAO_Local_RefCounted_Object
00108 {
00109 public:
00110
00111
00112 TAO_RT_ORB (TAO_ORB_Core *orb_core, ACE_Time_Value const &dynamic_thread_idle_timeout);
00113
00114
00115
00116
00117
00118
00119
00120 virtual RTCORBA::Mutex_ptr create_mutex (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00121 ACE_THROW_SPEC ((CORBA::SystemException));
00122
00123
00124
00125
00126
00127
00128 virtual void destroy_mutex (RTCORBA::Mutex_ptr the_mutex
00129 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00130 ACE_THROW_SPEC ((CORBA::SystemException));
00131
00132
00133
00134
00135
00136
00137 virtual RTCORBA::Mutex_ptr create_named_mutex (const char *name,
00138 CORBA::Boolean_out created_flag
00139 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00140 ACE_THROW_SPEC ((CORBA::SystemException));
00141
00142
00143 virtual RTCORBA::Mutex_ptr open_named_mutex (const char * name
00144 ACE_ENV_ARG_DECL_WITH_DEFAULTS )
00145 ACE_THROW_SPEC ((CORBA::SystemException,
00146 RTCORBA::RTORB::MutexNotFound
00147 ));
00148
00149
00150
00151
00152
00153 RTCORBA::TCPProtocolProperties_ptr
00154 create_tcp_protocol_properties (
00155 CORBA::Long send_buffer_size,
00156 CORBA::Long recv_buffer_size,
00157 CORBA::Boolean keep_alive,
00158 CORBA::Boolean dont_route,
00159 CORBA::Boolean no_delay,
00160 CORBA::Boolean enable_network_priority
00161 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00162 ACE_THROW_SPEC ((CORBA::SystemException ));
00163
00164 RTCORBA::UnixDomainProtocolProperties_ptr
00165 create_unix_domain_protocol_properties (
00166 CORBA::Long send_buffer_size,
00167 CORBA::Long recv_buffer_size
00168 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00169 ACE_THROW_SPEC ((CORBA::SystemException));
00170
00171 RTCORBA::SharedMemoryProtocolProperties_ptr
00172 create_shared_memory_protocol_properties (
00173 CORBA::Long send_buffer_size,
00174 CORBA::Long recv_buffer_size,
00175 CORBA::Boolean keep_alive,
00176 CORBA::Boolean dont_route,
00177 CORBA::Boolean no_delay,
00178 CORBA::Long preallocate_buffer_size,
00179 const char *mmap_filename,
00180 const char *mmap_lockname
00181 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00182 ACE_THROW_SPEC ((CORBA::SystemException));
00183
00184 RTCORBA::UserDatagramProtocolProperties_ptr
00185 create_user_datagram_protocol_properties (
00186 CORBA::Boolean enable_network_priority
00187 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00188 ACE_THROW_SPEC ((CORBA::SystemException));
00189
00190 RTCORBA::StreamControlProtocolProperties_ptr
00191 create_stream_control_protocol_properties (
00192 CORBA::Long send_buffer_size,
00193 CORBA::Long recv_buffer_size,
00194 CORBA::Boolean keep_alive,
00195 CORBA::Boolean dont_route,
00196 CORBA::Boolean no_delay,
00197 CORBA::Boolean enable_network_priority
00198 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00199 ACE_THROW_SPEC ((CORBA::SystemException));
00200
00201
00202 virtual RTCORBA::ThreadpoolId
00203 create_threadpool (CORBA::ULong stacksize,
00204 CORBA::ULong static_threads,
00205 CORBA::ULong dynamic_threads,
00206 RTCORBA::Priority default_priority,
00207 CORBA::Boolean allow_request_buffering,
00208 CORBA::ULong max_buffered_requests,
00209 CORBA::ULong max_request_buffer_size
00210 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00211 ACE_THROW_SPEC ((CORBA::SystemException));
00212
00213
00214
00215
00216
00217 virtual RTCORBA::ThreadpoolId
00218 create_threadpool_with_lanes (CORBA::ULong stacksize,
00219 const RTCORBA::ThreadpoolLanes & lanes,
00220 CORBA::Boolean allow_borrowing,
00221 CORBA::Boolean allow_request_buffering,
00222 CORBA::ULong max_buffered_requests,
00223 CORBA::ULong max_request_buffer_size
00224 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00225 ACE_THROW_SPEC ((CORBA::SystemException));
00226
00227
00228 virtual void destroy_threadpool (RTCORBA::ThreadpoolId threadpool
00229 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00230 ACE_THROW_SPEC ((CORBA::SystemException,
00231 RTCORBA::RTORB::InvalidThreadpool));
00232
00233
00234 virtual RTCORBA::PriorityModelPolicy_ptr
00235 create_priority_model_policy (
00236 RTCORBA::PriorityModel priority_model,
00237 RTCORBA::Priority server_priority
00238 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00239 ACE_THROW_SPEC ((CORBA::SystemException));
00240
00241
00242 virtual RTCORBA::ThreadpoolPolicy_ptr
00243 create_threadpool_policy (RTCORBA::ThreadpoolId threadpool
00244 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00245 ACE_THROW_SPEC ((CORBA::SystemException));
00246
00247
00248
00249
00250
00251 virtual RTCORBA::PriorityBandedConnectionPolicy_ptr
00252 create_priority_banded_connection_policy (const RTCORBA::PriorityBands &
00253 priority_bands
00254 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00255 ACE_THROW_SPEC ((CORBA::SystemException));
00256
00257
00258
00259
00260
00261
00262 virtual RTCORBA::PrivateConnectionPolicy_ptr
00263 create_private_connection_policy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00264 ACE_THROW_SPEC ((CORBA::SystemException));
00265
00266
00267
00268
00269
00270 virtual RTCORBA::ServerProtocolPolicy_ptr
00271 create_server_protocol_policy (const RTCORBA::ProtocolList & protocols
00272 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00273 ACE_THROW_SPEC ((CORBA::SystemException));
00274
00275
00276
00277
00278
00279 virtual RTCORBA::ClientProtocolPolicy_ptr
00280 create_client_protocol_policy (const RTCORBA::ProtocolList & protocols
00281 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00282 ACE_THROW_SPEC ((CORBA::SystemException));
00283
00284
00285 TAO_ORB_Core *orb_core (void) const;
00286
00287
00288 TAO_Thread_Pool_Manager &tp_manager (void) const;
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305 static int modify_thread_scheduling_policy (CORBA::ORB_ptr orb);
00306
00307 protected:
00308
00309
00310
00311 virtual ~TAO_RT_ORB (void);
00312
00313 protected:
00314
00315
00316 TAO_ORB_Core * const orb_core_;
00317
00318
00319 TAO_Named_RT_Mutex_Manager mutex_mgr_;
00320
00321
00322 TAO_Thread_Pool_Manager *tp_manager_;
00323
00324
00325 ACE_Time_Value const dynamic_thread_idle_timeout_;
00326 };
00327
00328 TAO_END_VERSIONED_NAMESPACE_DECL
00329
00330 #if defined(_MSC_VER)
00331 #pragma warning(pop)
00332 #endif
00333
00334 #endif
00335
00336 #include "ace/post.h"
00337 #endif