1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
|
// -*- C++ -*-
// $Id$
// ============================================================================
//
// = LIBRARY
// PortableServer
//
// = FILENAME
// RT_POA.h
//
// = DESCRIPTION
// RT_POA
//
// = AUTHOR
// Irfan Pyarali
//
// ============================================================================
#ifndef TAO_RT_POA_H
#define TAO_RT_POA_H
#include "ace/pre.h"
#include "rtportableserver_export.h"
#include "tao/PortableServer/POA.h"
#define TAO_RT_PORTABLESERVER_SAFE_INCLUDE
#include "RTPortableServerC.h"
#undef TAO_RT_PORTABLESERVER_SAFE_INCLUDE
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
// This is to remove "inherits via dominance" warnings from MSVC.
// MSVC is being a little too paranoid.
#if defined(_MSC_VER)
#if (_MSC_VER >= 1200)
#pragma warning(push)
#endif /* _MSC_VER >= 1200 */
#pragma warning(disable:4250)
#endif /* _MSC_VER */
class TAO_Thread_Pool;
class TAO_Thread_Lane;
class TAO_PriorityBandedConnectionPolicy;
class TAO_RTPortableServer_Export TAO_RT_POA :
public virtual RTPortableServer::POA,
public virtual TAO_POA
{
public:
// RTCORBA specific methods
CORBA::Object_ptr create_reference_with_priority (const char * intf,
RTCORBA::Priority priority
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::WrongPolicy));
CORBA::Object_ptr create_reference_with_id_and_priority (const PortableServer::ObjectId & oid,
const char * intf,
RTCORBA::Priority priority
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::WrongPolicy));
PortableServer::ObjectId * activate_object_with_priority (PortableServer::Servant p_servant,
RTCORBA::Priority priority
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::ServantAlreadyActive,
PortableServer::POA::WrongPolicy));
void activate_object_with_id_and_priority (const PortableServer::ObjectId & oid,
PortableServer::Servant p_servant,
RTCORBA::Priority priority
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::ServantAlreadyActive,
PortableServer::POA::ObjectAlreadyActive,
PortableServer::POA::WrongPolicy));
// End RTCORBA specific methods
// Standard POA interface methods
PortableServer::POA_ptr create_POA (const char *adapter_name,
PortableServer::POAManager_ptr poa_manager,
const CORBA::PolicyList &policies
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::AdapterAlreadyExists,
PortableServer::POA::InvalidPolicy));
PortableServer::POA_ptr find_POA (const char *adapter_name,
CORBA::Boolean activate_it
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::AdapterNonExistent));
void destroy (CORBA::Boolean etherealize_objects,
CORBA::Boolean wait_for_completion
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
#if (TAO_HAS_MINIMUM_POA == 0)
PortableServer::ThreadPolicy_ptr create_thread_policy (PortableServer::ThreadPolicyValue value
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
#endif /* TAO_HAS_MINIMUM_POA == 0 */
PortableServer::LifespanPolicy_ptr create_lifespan_policy (PortableServer::LifespanPolicyValue value
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
PortableServer::IdUniquenessPolicy_ptr create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
PortableServer::IdAssignmentPolicy_ptr create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
#if (TAO_HAS_MINIMUM_POA == 0)
PortableServer::ImplicitActivationPolicy_ptr create_implicit_activation_policy (PortableServer::ImplicitActivationPolicyValue value
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
PortableServer::ServantRetentionPolicy_ptr create_servant_retention_policy (PortableServer::ServantRetentionPolicyValue value
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
PortableServer::RequestProcessingPolicy_ptr create_request_processing_policy (PortableServer::RequestProcessingPolicyValue value
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
#endif /* TAO_HAS_MINIMUM_POA == 0 */
char * the_name (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
PortableServer::POA_ptr the_parent (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
PortableServer::POAList *the_children (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
PortableServer::POAManager_ptr the_POAManager (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
#if (TAO_HAS_MINIMUM_POA == 0)
PortableServer::AdapterActivator_ptr the_activator (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
void the_activator (PortableServer::AdapterActivator_ptr adapter_activator
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
PortableServer::ServantManager_ptr get_servant_manager (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::WrongPolicy));
void set_servant_manager (PortableServer::ServantManager_ptr imgr
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::WrongPolicy));
PortableServer::Servant get_servant (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::NoServant,
PortableServer::POA::WrongPolicy));
void set_servant (PortableServer::Servant servant
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::WrongPolicy));
#endif /* TAO_HAS_MINIMUM_POA == 0 */
PortableServer::ObjectId *activate_object (PortableServer::Servant p_servant
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::ServantAlreadyActive,
PortableServer::POA::WrongPolicy));
void activate_object_with_id (const PortableServer::ObjectId &id,
PortableServer::Servant p_servant
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::ServantAlreadyActive,
PortableServer::POA::ObjectAlreadyActive,
PortableServer::POA::WrongPolicy));
void deactivate_object (const PortableServer::ObjectId &oid
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::ObjectNotActive,
PortableServer::POA::WrongPolicy));
CORBA::Object_ptr create_reference (const char *intf
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::WrongPolicy));
CORBA::Object_ptr create_reference_with_id (const PortableServer::ObjectId &oid,
const char *intf
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::WrongPolicy));
PortableServer::ObjectId *servant_to_id (PortableServer::Servant p_servant
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::ServantNotActive,
PortableServer::POA::WrongPolicy));
CORBA::Object_ptr servant_to_reference (PortableServer::Servant p_servant
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::ServantNotActive,
PortableServer::POA::WrongPolicy));
PortableServer::Servant reference_to_servant (CORBA::Object_ptr reference
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::ObjectNotActive,
PortableServer::POA::WrongAdapter,
PortableServer::POA::WrongPolicy));
PortableServer::ObjectId *reference_to_id (CORBA::Object_ptr reference
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::WrongAdapter,
PortableServer::POA::WrongPolicy));
PortableServer::Servant id_to_servant (const PortableServer::ObjectId &oid
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::ObjectNotActive,
PortableServer::POA::WrongPolicy));
CORBA::Object_ptr id_to_reference (const PortableServer::ObjectId &oid
TAO_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::POA::ObjectNotActive,
PortableServer::POA::WrongPolicy));
CORBA::OctetSeq *id (TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
// End standard POA interface methods.
virtual CORBA::PolicyList *client_exposed_policies (CORBA::Short object_priority
TAO_ENV_ARG_DECL);
TAO_RT_POA (const String &name,
TAO_POA_Manager &poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_POA *parent,
ACE_Lock &lock,
TAO_SYNCH_MUTEX &thread_lock,
TAO_ORB_Core &orb_core,
TAO_Object_Adapter *object_adapter
TAO_ENV_ARG_DECL);
virtual ~TAO_RT_POA (void);
void *thread_pool (void) const;
protected:
/// Template method for creating new POA's of this type.
virtual TAO_POA *new_POA (const String &name,
TAO_POA_Manager &poa_manager,
const TAO_POA_Policy_Set &policies,
TAO_POA *parent,
ACE_Lock &lock,
TAO_SYNCH_MUTEX &thread_lock,
TAO_ORB_Core &orb_core,
TAO_Object_Adapter *object_adapter
TAO_ENV_ARG_DECL);
virtual TAO_Stub *key_to_stub_i (const TAO_ObjectKey &key,
const char *type_id,
CORBA::Short priority
TAO_ENV_ARG_DECL);
void validate_priority (RTCORBA::Priority priority
TAO_ENV_ARG_DECL);
void validate_policies (TAO_ENV_SINGLE_ARG_DECL);
// Parse the policy list for RT policies and update our
// cached policy instance.
void parse_rt_policies (TAO_POA_Policy_Set &policies
TAO_ENV_ARG_DECL);
size_t endpoint_count (void);
TAO_Stub *create_stub_object (const TAO_ObjectKey &object_key,
const char *type_id,
CORBA::PolicyList *policy_list,
TAO_Acceptor_Filter *filter,
TAO_PriorityBandedConnectionPolicy *priority_bands
TAO_ENV_ARG_DECL);
int lane_required (TAO_Thread_Lane *lane,
TAO_PriorityBandedConnectionPolicy *priority_bands);
TAO_Thread_Pool *thread_pool_;
};
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
#pragma warning(pop)
#endif /* _MSC_VER */
#if defined (__ACE_INLINE__)
# include "RT_POA.i"
#endif /* __ACE_INLINE__ */
#include "ace/post.h"
#endif /* TAO_POA_H */
|