Fri, 24 Sep 2010 22:42:14 -0700
6891766: Vulnerabilities in use of reflection in CORBA
Reviewed-by: hawtin
1 /*
2 * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
26 /*
27 * Differences from original:
28 *
29 * - do not include orb.idl
30 * - include IOP.idl, Messaging.idl and CORBAX.idl
31 * - renamed component parameter names to tagged_component (so that they
32 * do not conflict with the CORBA 3.0 "component" keyword).
33 * - javadocs added (synchronized with orbos/00-08-06)
34 *
35 * NOTE: After compilation of this IDL file, all Helper and Holder classes
36 * that are not needed are removed.
37 */
38 #include "IOP.idl"
39 #include "Messaging.idl"
40 #include "CORBAX.idl"
41 #include "corba.idl"
43 #pragma prefix "omg.org"
45 #ifndef CORBA3
46 #define local
47 #endif
49 module Dynamic {
51 /**
52 * <code>NVList</code> PIDL represented by <code>ParameterList</code> IDL.
53 * This exists in order to keep the Portable Interceptor IDL from becoming
54 * PIDL.
55 */
56 struct Parameter {
57 any argument;
58 CORBA::ParameterMode mode;
59 };
61 /**
62 * <code>NVList</code> PIDL represented by <code>ParameterList</code> IDL.
63 * This exists in order to keep the Portable Interceptor IDL from becoming
64 * PIDL.
65 */
66 typedef sequence<Parameter> ParameterList;
68 /**
69 * <code>ContextList</code> PIDL represented by <code>ContextList</code>
70 * IDL. This exists in order to keep the Portable Interceptor IDL from
71 * becoming PIDL.
72 */
73 typedef CORBA::StringSeq ContextList;
75 /**
76 * <code>ExceptionList</code> PIDL represented by <code>ExceptionList</code>
77 * IDL. This exists in order to keep the Portable Interceptor IDL from
78 * becoming PIDL.
79 */
80 typedef sequence<CORBA::TypeCode> ExceptionList;
82 /**
83 * <code>Context</code> PIDL represented by <code>RequestContext</code>
84 * IDL. This exists in order to keep the Portable Interceptor IDL from o
85 * becoming PIDL.
86 * <p>
87 * <code>Context</code> objects are encoded as <code>String[]</code>. The
88 * <code>Strings</code> occur in pairs. The first <code>String</code> in
89 * each pair is the context property name and the second <code>String</code>
90 * in each pair is the associated value.
91 */
92 typedef CORBA::StringSeq RequestContext;
93 };
95 module PortableInterceptor {
96 /**
97 * All Portable Interceptors implement Interceptor.
98 */
99 local interface Interceptor {
100 /**
101 * Returns the name of the interceptor.
102 * <p>
103 * Each Interceptor may have a name that may be used administratively
104 * to order the lists of Interceptors. Only one Interceptor of a given
105 * name can be registered with the ORB for each Interceptor type. An
106 * Interceptor may be anonymous, i.e., have an empty string as the name
107 * attribute. Any number of anonymous Interceptors may be registered with
108 * the ORB.
109 *
110 * @return the name of the interceptor.
111 */
112 readonly attribute string name;
114 // Added in ptc/00-08-06
115 /**
116 * Provides an opportunity to destroy this interceptor.
117 * The destroy method is called during <code>ORB.destroy</code>. When an
118 * application calls <code>ORB.destroy</code>, the ORB:
119 * <ol>
120 * <li>waits for all requests in progress to complete</li>
121 * <li>calls the <code>Interceptor.destroy</code> operation for each
122 * interceptor</li>
123 * <li>completes destruction of the ORB</li>
124 * </ol>
125 * Method invocations from within <code>Interceptor.destroy</code> on
126 * object references for objects implemented on the ORB being destroyed
127 * result in undefined behavior. However, method invocations on objects
128 * implemented on an ORB other than the one being destroyed are
129 * permitted. (This means that the ORB being destroyed is still capable
130 * of acting as a client, but not as a server.)
131 */
132 void destroy();
133 };
136 /**
137 * The <code>ForwardRequest</code> exception is the means by which an
138 * Interceptor can indicate to the ORB that a retry of the request should
139 * occur with the new object given in the exception. This behavior of
140 * causing a retry only occurs if the ORB receives a ForwardRequest from
141 * an interceptor. If <code>ForwardRequest</code> is thrown anywhere else
142 * it is passed through the ORB as is normal for a user exception.
143 * <p>
144 * If an Interceptor throws a <code>ForwardRequest</code> exception in
145 * response to a call of an interceptor, no other Interceptors are called
146 * for that interception point. The remaining Interceptors in the Flow Stack
147 * shall have their appropriate ending interception point called:
148 * <code>receive_other</code> on the client, or <code>send_other</code> on
149 * the server. The <code>reply_status</code> in the
150 * <code>receive_other</code> or <code>send_other</code> would be
151 * <code>LOCATION_FORWARD</code>.
152 */
153 exception ForwardRequest {
154 /**
155 * The new object to forward the request to.
156 */
157 Object forward;
158 // Change in ptc/00-08-06
159 // boolean permanent;
160 };
162 /** Reply status, represented as an int */
163 typedef short ReplyStatus;
165 // Valid reply_status values:
167 /**
168 * Indicates a successful Reply Status. One possible value for
169 * <code>RequestInfo.reply_status</code>.
170 * @see RequestInfo#reply_status
171 * @see SYSTEM_EXCEPTION
172 * @see USER_EXCEPTION
173 * @see LOCATION_FORWARD
174 * @see TRANSPORT_RETRY
175 */
176 const ReplyStatus SUCCESSFUL = 0;
178 /**
179 * Indicates a SystemException reply status. One possible value for
180 * <code>RequestInfo.reply_status</code>.
181 * @see RequestInfo#reply_status
182 * @see SUCCESSFUL
183 * @see USER_EXCEPTION
184 * @see LOCATION_FORWARD
185 * @see TRANSPORT_RETRY
186 */
187 const ReplyStatus SYSTEM_EXCEPTION = 1;
189 /**
190 * Indicates a UserException reply status. One possible value for
191 * <code>RequestInfo.reply_status</code>.
192 * @see RequestInfo#reply_status
193 * @see SUCCESSFUL
194 * @see SYSTEM_EXCEPTION
195 * @see LOCATION_FORWARD
196 * @see TRANSPORT_RETRY
197 */
198 const ReplyStatus USER_EXCEPTION = 2;
200 /**
201 * Indicates a LocationForward reply status. One possible value for
202 * <code>RequestInfo.reply_status</code>.
203 * @see RequestInfo#reply_status
204 * @see SUCCESSFUL
205 * @see SYSTEM_EXCEPTION
206 * @see USER_EXCEPTION
207 * @see TRANSPORT_RETRY
208 */
209 const ReplyStatus LOCATION_FORWARD = 3;
211 // Changes in ptc/00-08-06
212 // const ReplyStatus LOCATION_FORWARD_PERMANENT = 4;
214 /**
215 * Indicates a Transport Retry reply status. One possible value for
216 * <code>RequestInfo.reply_status</code>.
217 * @see RequestInfo#reply_status
218 * @see SUCCESSFUL
219 * @see SYSTEM_EXCEPTION
220 * @see USER_EXCEPTION
221 * @see LOCATION_FORWARD
222 */
223 const ReplyStatus TRANSPORT_RETRY = 4;
225 /**
226 * XXX
227 */
228 const ReplyStatus UNKNOWN = 5;
230 /** Slot id, represented as an int */
231 typedef unsigned long SlotId;
233 /**
234 * This exception is thrown when <code>get_slot</code> or
235 * <code>set_slot</code> is called on a slot that has not been allocated.
236 */
237 exception InvalidSlot {};
239 /**
240 * Portable Interceptors Current (also known as <code>PICurrent</code>)
241 * is merely a slot table, the slots of which are used by each service to
242 * transfer their context data between their context and the request's or
243 * reply's service context. Each service which wishes to use PICurrent
244 * reserves a slot or slots at initialization time and uses those slots
245 * during the processing of requests and replies.
246 * <p>
247 * Before an invocation is made, PICurrent is obtained via a call to
248 * <code>ORB.resolve_initial_references( "PICurrent" )</code>. From within
249 * the interception points, the data on PICurrent that has moved from the
250 * thread scope to the request scope is available via the
251 * <code>get_slot</code> operation on the <code>RequestInfo</code> object.
252 * A PICurrent can still be obtained via
253 * <code>resolve_initial_references</code>, but that is the Interceptor's
254 * thread scope PICurrent.
255 */
256 local interface Current : CORBA::Current {
258 /**
259 * Retrieves the slot data the application set in PICurrent via
260 * <code>get_slot</code>. The data is in the form of an Any.
261 * <p>
262 * If the given slot has not been set, an Any containing a type code
263 * with a <code>TCKind</code> value of <code>tk_null</code> and no value
264 * is returned.
265 *
266 * @param id The <code>SlotId</code> of the slot from which the data will
267 * be returned.
268 * @return The data, in the form of an Any, of the given slot identifier.
269 * @exception InvalidSlot thrown if get_slot is called on a slot that
270 * has not been allocated.
271 * @exception BAD_INV_ORDER thrown if <code>get_slot</code> is called
272 * from within an ORB initializer
273 */
274 any get_slot (in SlotId id) raises (InvalidSlot);
276 /**
277 * Sets data in a slot. The data is in the form of an Any. If data
278 * already exists in that slot, it is overridden.
279 *
280 * @param id The <code>SlotId</code> of the slot to which the data will
281 * be set.
282 * @param data The data, in the form of an Any, which will be set
283 * to the identified slot.
284 * @exception InvalidSlot thrown if <code>set_slot</code> is called on
285 * a slot that has not been allocated.
286 * @exception BAD_INV_ORDER thrown if <code>set_slot</code> is called
287 * from within an ORB initializer.
288 */
289 void set_slot (in SlotId id, in any data) raises (InvalidSlot);
290 };
292 /**
293 * Request Information, accessible to Interceptors.
294 * <p>
295 * Each interception point is given an object through which the
296 * Interceptor can access request information. Client-side and server-side
297 * interception points are concerned with different information, so there
298 * are two information objects: <code>ClientRequestInfo</code> is passed
299 * to the client-side interception points and <code>ServerRequestInfo</code>
300 * is passed to the server-side interception points. But there is
301 * information that is common to both, so they both inherit from a common
302 * interface: <code>RequestInfo</code>.
303 *
304 * @see ClientRequestInfo
305 * @see ServerRequestInfo
306 */
307 local interface RequestInfo {
308 /**
309 * Returns an id that uniquely identifies an active request/reply
310 * sequence. Once a request/reply sequence is concluded this ID may be
311 * reused. Note that this id is not the same as the GIOP
312 * <code>request_id</code>. If GIOP is the transport mechanism used,
313 * then these IDs may very well be the same, but this is not guaranteed
314 * nor required.
315 */
316 readonly attribute unsigned long request_id;
318 /**
319 * Returns the name of the operation being invoked.
320 */
321 readonly attribute string operation;
323 /**
324 * Returns an array of <code>Parameter</code> objects, containing the
325 * arguments on the operation being invoked. If there are no arguments,
326 * this attribute will be a zero length array.
327 * <p>
328 * Not all environments provide access to the arguments. With the Java
329 * portable bindings, for example, the arguments are not available.
330 * In these environments, when this attribute is accessed,
331 * <code>NO_RESOURCES</code> will be thrown with a standard minor code
332 * of 1.
333 * <p>
334 * <i>Note: Arguments are available for DSI/DII calls.</i>
335 *
336 * @exception NO_RESOURCES thrown if arguments are not available.
337 * @see <a href="package-summary.html#unimpl">
338 * <code>PortableInterceptor</code> package comments for
339 * limitations / unimplemented features</a>
340 */
341 readonly attribute Dynamic::ParameterList arguments;
343 /**
344 * Returns an array of <code>TypeCode</code> objects describing the
345 * <code>TypeCode</code>s of the user exceptions that this operation
346 * invocation may throw. If there are no user exceptions, this
347 * will return a zero length array.
348 * <p>
349 * Not all environments provide access to the exception list. With
350 * the Java portable bindings, for example, the exception list is
351 * not available. In these environments, when this attribute is
352 * accessed, <code>NO_RESOURCES</code> will be thrown with a
353 * standard minor code of 1.
354 * <p>
355 * <i>Note: Exceptions are available for DSI/DII calls.</i>
356 *
357 * @exception NO_RESOURCES thrown if exceptions are not available.
358 * @see <a href="package-summary.html#unimpl">
359 * <code>PortableInterceptor</code> package comments for
360 * limitations / unimplemented features</a>
361 */
362 readonly attribute Dynamic::ExceptionList exceptions;
364 /**
365 * Returns an array of <code>String</code> objects describing the
366 * contexts that may be passed on this operation invocation. If there
367 * are no contexts, this will return a zero length array.
368 * <p>
369 * Not all environments provide access to the context list. With the
370 * Java portable bindings, for example, the context list is not
371 * available. In these environments, when this attribute is accessed,
372 * <code>NO_RESOURCES</code> will be thrown with a standard minor code
373 * of 1.
374 * <p>
375 * <i>Note: Contexts are available for DSI/DII calls.</i>
376 *
377 * @exception NO_RESOURCES thrown if contexts are not available.
378 * @see <a href="package-summary.html#unimpl">
379 * <code>PortableInterceptor</code> package comments for
380 * limitations / unimplemented features</a>
381 */
382 readonly attribute Dynamic::ContextList contexts;
384 /**
385 * Returns an array of <code>String</code> objects containing the
386 * contexts being sent on the request.
387 * <p>
388 * Not all environments provide access to the context. With the Java
389 * portable bindings, for example, the context is not available. In
390 * these environments, when this attribute is accessed, NO_RESOURCES will
391 * be thrown with standard minor code of 1.
392 * <p>
393 * <i>Note: <code>operation_context</code> is available for
394 * DSI/DII calls.</i>
395 *
396 * @exception NO_RESOURCES thrown if operation context is not available.
397 * @see <a href="package-summary.html#unimpl">
398 * <code>PortableInterceptor</code> package comments for
399 * limitations / unimplemented features</a>
400 */
401 readonly attribute Dynamic::RequestContext operation_context;
403 /**
404 * Returns an any containing the result of the operation invocation.
405 * If the operation return type is void, this attribute will be an any
406 * containing a type code with a <code>TCKind</code> value of
407 * <code>tk_void</code> and no value.
408 * <p>
409 * Not all environments provide access to the result. With the Java
410 * portable bindings, for example, the result is not available. In
411 * these environments, when this attribute is accessed,
412 * <code>NO_RESOURCES</code> will be thrown with a standard minor code of
413 * 1.
414 * <p>
415 * <i>Note: Result is available for DSI/DII calls.</i>
416 *
417 * @exception NO_RESOURCES thrown if result is not available.
418 * @see <a href="package-summary.html#unimpl">
419 * <code>PortableInterceptor</code> package comments for
420 * limitations / unimplemented features</a>
421 */
422 readonly attribute any result;
424 /**
425 * Indicates whether a response is expected.
426 * <p>
427 * On the client, a reply is not returned when
428 * <code>response_expected</code> is false, so <code>receive_reply</code>
429 * cannot be called. <code>receive_other</code> is called unless an
430 * exception occurs, in which case <code>receive_exception</code> is
431 * called.
432 * <p>
433 * On the client, within <code>send_poll</code>, this attribute is true.
434 */
435 readonly attribute boolean response_expected;
437 /**
438 * Defines how far the request shall progress before control is returned
439 * to the client. This is defined in the Messaging specification, and
440 * is pertinent only when <code>response_expected</code> is false. If
441 * <code>response_expected</code> is true, the value of
442 * <code>sync_scope</code> is undefined. This attribute may have one of
443 * the following values:
444 * <ul>
445 * <li><code>Messaging.SYNC_NONE</code></li>
446 * <li><code>Messaging.SYNC_WITH_TRANSPORT</code></li>
447 * <li><code>Messaging.SYNC_WITH_SERVER</code></li>
448 * <li><code>Messaging.SYNC_WITH_TARGET</code></li>
449 * </ul>
450 * On the server, for all scopes, a reply will be created from the
451 * return of the target operation call, but the reply will not return
452 * to the client. Although it does not return to the client, it does
453 * occur, so the normal server-side interception points are
454 * followed (i.e., <code>receive_request_service_contexts</code>,
455 * <code>receive_request</code>, <code>send_reply</code> or
456 * <code>send_exception</code>).
457 * <p>
458 * For <code>SYNC_WITH_SERVER</code> and <code>SYNC_WITH_TARGET</code>,
459 * the server does send an empty reply back to the client before the
460 * target is invoked. This reply is not intercepted by server-side
461 * Interceptors.
462 *
463 * @see <a href="package-summary.html#unimpl">
464 * <code>PortableInterceptor</code> package comments for
465 * limitations / unimplemented features</a>
466 */
467 readonly attribute Messaging::SyncScope sync_scope;
469 /**
470 * Describes the state of the result of the operation invocation. The
471 * return value can be one of the following:
472 * <ul>
473 * <li><code>PortableInterceptor.SUCCESSFUL</code></li>
474 * <li><code>PortableInterceptor.SYSTEM_EXCEPTION</code></li>
475 * <li><code>PortableInterceptor.USER_EXCEPTION</code></li>
476 * <li><code>PortableInterceptor.LOCATION_FORWARD</code></li>
477 * <li><code>PortableInterceptor.TRANSPORT_RETRY</code></li>
478 * </ul>
479 * On the client:
480 * <ul>
481 * <li>Within the <code>receive_reply</code> interception point, this
482 * will only return <code>SUCCESSFUL</code></li>.
483 * <li>Within the <code>receive_exception</code> interception point,
484 * this will be either <code>SYSTEM_EXCEPTION</code> or
485 * <code>USER_EXCEPTION</code>.</li>
486 * <li>Within the <code>receive_other</code> interception point, this
487 * will be any of: <code>SUCCESSFUL</code>,
488 * <code>LOCATION_FORWARD</code>, or <code>TRANSPORT_RETRY</code>.
489 * <code>SUCCESSFUL</code> means an asynchronous request returned
490 * successfully. <code>LOCATION_FORWARD</code> means that a reply
491 * came back with <code>LOCATION_FORWARD</code> as its status.
492 * <code>TRANSPORT_RETRY</code> means that the transport
493 * mechanism indicated a retry - a GIOP reply with a status of
494 * <code>NEEDS_ADDRESSING_MODE</code>, for instance. </li>
495 * </ul>
496 * On the server:
497 * <ul>
498 * <li>Within the <code>send_reply</code> interception point, this
499 * will only be <code>SUCCESSFUL</code>.</li>
500 * <li>Within the <code>send_exception</code> interception point,
501 * this will be either <code>SYSTEM_EXCEPTION</code> or
502 * <code>USER_EXCEPTION</code>.</li>
503 * <li>Within the <code>send_other</code> interception point, this
504 * attribute will be any of: <code>SUCCESSFUL</code>, or
505 * <code>LOCATION_FORWARD</code>. <code>SUCCESSFUL</code> means
506 * an asynchronous request returned successfully.
507 * <code>LOCATION_FORWARD</code> means that a reply came back
508 * with <code>LOCATION_FORWARD</code> as its status.</li>
509 * </ul>
510 *
511 * @see SUCCESSFUL
512 * @see SYSTEM_EXCEPTION
513 * @see USER_EXCEPTION
514 * @see LOCATION_FORWARD
515 * @see TRANSPORT_RETRY
516 */
517 readonly attribute ReplyStatus reply_status;
519 /**
520 * Contains the object to which the request will be forwarded, if the
521 * <code>reply_status</code> attribute is <code>LOCATION_FORWARD</code>.
522 * It is indeterminate whether a forwarded request will actually occur.
523 */
524 readonly attribute Object forward_reference;
526 /**
527 * Returns the data from the given slot of the
528 * <code>PortableInterceptor.Current</code> that is in the scope of
529 * the request.
530 * <p>
531 * If the given slot has not been set, then an any containing a
532 * type code with a <code>TCKind</code> value of <code>tk_null</code> is
533 * returned.
534 *
535 * @param id The <code>SlotId</code> of the slot which is to be
536 * returned.
537 * @return The slot data, in the form of an any, obtained with the
538 * given identifier.
539 * @exception InvalidSlot thrown if the ID does not define an
540 * allocated slot.
541 * @see Current
542 */
543 any get_slot (in SlotId id) raises (InvalidSlot);
545 /**
546 * Returns a copy of the service context with the given ID that
547 * is associated with the request.
548 * <p>
549 * @param id The <code>IOP.ServiceId</code> of the service context
550 * which is to be returned.
551 * @return The <code>IOP.ServiceContext</code> obtained with the
552 * given identifier.
553 * @exception BAD_PARAM thrown with a standard minor code of 26, if the
554 * request's service context does not contain an entry for that ID.
555 */
556 IOP::ServiceContext get_request_service_context
557 (in IOP::ServiceId id);
559 /**
560 * Returns a copy of the service context with the given ID that
561 * is associated with the reply.
562 *
563 * @param id The <code>IOP.ServiceId</code> of the service context
564 * which is to be returned.
565 * @return The <code>IOP.ServiceContext</code> obtained with the given
566 * identifier.
567 * @exception BAD_PARAM thrown with a standard minor code of 26 if the
568 * request's service context does not contain an entry for that ID.
569 */
570 IOP::ServiceContext get_reply_service_context
571 (in IOP::ServiceId id);
572 };
574 /**
575 * Request Information, accessible to client-side request interceptors.
576 * <p>
577 * Some attributes and operations on <code>ClientRequestInfo</code> are
578 * not valid at all interception points. The following table shows the
579 * validity of each attribute or operation. If it is not valid, attempting
580 * to access it will result in a <code>BAD_INV_ORDER</code> being thrown
581 * with a standard minor code of 14.
582 * <p>
583 *
584 * <table border=1 summary="Shows the validity of each attribute or operation">
585 * <thead>
586 * <tr>
587 * <th> </th>
588 * <th id="send_req">send_request</th>
589 * <th id="send_poll">send_poll</th>
590 * <th id="rec_reply">receive_reply</th>
591 * <th id="rec_ex">receive_exception</th>
592 * <th id="rec_oth">receive_other</th>
593 * </tr>
594 * </thead>
595 * <tbody>
596 *
597 * <tr>
598 * <td id="ri" colspan=6><i>Inherited from RequestInfo:</i></td>
599 * </tr>
600 *
601 * <tr><th id="req_id"><p align="left">request_id</p></th>
602 * <td headers="ri req_id send_req">yes</td>
603 * <td headers="ri req_id send_poll">yes</td>
604 * <td headers="ri req_id rec_reply">yes</td>
605 * <td headers="ri req_id rec_ex">yes</td>
606 * <td headers="ri req_id rec_oth">yes</td></tr>
607 *
608 * <tr><th id="op"><p align="left">operation</p></th>
609 * <td headers="ri op send_req">yes</td>
610 * <td headers="ri op send_poll">yes</td>
611 * <td headers="ri op rec_reply">yes</td>
612 * <td headers="ri op rec_ex">yes</td>
613 * <td headers="ri op rec_oth">yes</td></tr>
614 *
615 * <tr><th id="arg"><p align="left">arguments</p></th>
616 * <td headers="ri arg send_req">yes<sub>1</sub></td>
617 * <td headers="ri arg send_poll">no </td>
618 * <td headers="ri arg rec_reply">yes</td>
619 * <td headers="ri arg rec_ex">no </td>
620 * <td headers="ri arg rec_oth">no </td></tr>
621 *
622 * <tr><th id="exc"><p align="left">exceptions</p></th>
623 * <td headers="ri exc send_req">yes</td>
624 * <td headers="ri exc send_poll">no </td>
625 * <td headers="ri exc rec_reply">yes</td>
626 * <td headers="ri exc rec_ex">yes</td>
627 * <td headers="ri exc rec_oth">yes</td></tr>
628 *
629 * <tr><th id="con"><p align="left">contexts</p></th>
630 * <td headers="ri con send_req">yes</td>
631 * <td headers="ri con send_poll">no </td>
632 * <td headers="ri con rec_reply">yes</td>
633 * <td headers="ri con rec_ex">yes</td>
634 * <td headers="ri con rec_oth">yes</td></tr>
635 *
636 * <tr><th id="op_con"><p align="left">operation_context</p></th>
637 * <td headers="ri op_con send_req">yes</td>
638 * <td headers="ri op_con send_poll">no </td>
639 * <td headers="ri op_con rec_reply">yes</td>
640 * <td headers="ri op_con rec_ex">yes</td>
641 * <td headers="ri op_con rec_oth">yes</td>
642 * </tr>
643 *
644 * <tr><th id="result"><p align="left">result</p></th>
645 * <td headers="ri result send_req">no </td>
646 * <td headers="ri result send_poll">no </td>
647 * <td headers="ri result rec_reply">yes</td>
648 * <td headers="ri result rec_ex">no </td>
649 * <td headers="ri result rec_oth">no </td>
650 * </tr>
651 *
652 * <tr><th id="res_exp"><p align="left">response_expected</p></th>
653 * <td headers="ri res_exp send_req">yes</td>
654 * <td headers="ri res_exp send_poll">yes</td>
655 * <td headers="ri res_exp rec_reply">yes</td>
656 * <td headers="ri res_exp rec_ex">yes</td>
657 * <td headers="ri res_exp rec_oth">yes</td></tr>
658 *
659 * <tr><th id="sync_sco"><p align="left">sync_scope</p></th>
660 * <td headers="ri sync_sco send_req">yes</td>
661 * <td headers="ri sync_sco send_poll">no </td>
662 * <td headers="ri sync_sco rec_reply">yes</td>
663 * <td headers="ri sync_sco rec_ex">yes</td>
664 * <td headers="ri sync_sco rec_oth">yes</td>
665 * </tr>
666 *
667 * <tr><th id="rep_stat"><p align="left">reply_status</p></th>
668 * <td headers="ri rep_stat send_req">no </td>
669 * <td headers="ri rep_stat send_poll">no </td>
670 * <td headers="ri rep_stat rec_reply">yes</td>
671 * <td headers="ri rep_stat rec_ex">yes</td>
672 * <td headers="ri rep_stat rec_oth">yes</td></tr>
673 *
674 * <tr><th id="for_ref"><p align="left">forward_reference</p></th>
675 * <td headers="ri for_ref send_req">no </td>
676 * <td headers="ri for_ref send_poll">no </td>
677 * <td headers="ri for_ref rec_reply">no </td>
678 * <td headers="ri for_ref rec_ex">no </td>
679 * <td headers="ri for_ref rec_oth">yes<sub>2</sub>
680 * </td></tr>
681 *
682 * <tr><th id="get_slot"><p align="left">get_slot</p></th>
683 * <td headers="ri get_slot send_req">yes</td>
684 * <td headers="ri get_slot send_poll">yes</td>
685 * <td headers="ri get_slot rec_reply">yes</td>
686 * <td headers="ri get_slot rec_ex">yes</td>
687 * <td headers="ri get_slot rec_oth">yes</td></tr>
688 *
689 * <tr><th id="grsc"><p align="left">get_request_service_context</p></th>
690 * <td headers="ri grsc send_req">yes</td>
691 * <td headers="ri grsc send_poll">no </td>
692 * <td headers="ri grsc rec_reply">yes</td>
693 * <td headers="ri grsc rec_ex">yes</td>
694 * <td headers="ri grsc rec_oth">yes</td></tr>
695 *
696 * <tr><th id="gpsc"><p align="left">get_reply_service_context</p></th>
697 * <td headers="ri gpsc send_req">no </td>
698 * <td headers="ri gpsc send_poll">no </td>
699 * <td headers="ri gpsc rec_reply">yes</td>
700 * <td headers="ri gpsc rec_ex">yes</td>
701 * <td headers="ri gpsc rec_oth">yes</td>
702 * </tr>
703 *
704 * <tr>
705 * <td id="cri" colspan=6><i>ClientRequestInfo-specific:</i></td>
706 * </tr>
707 *
708 * <tr><th id="target"><p align="left">target</p></th>
709 * <td headers="cri target send_req">yes</td>
710 * <td headers="cri target send_poll">yes</td>
711 * <td headers="cri target rec_reply">yes</td>
712 * <td headers="cri target rec_ex">yes</td>
713 * <td headers="cri target rec_oth">yes</td></tr>
714 *
715 * <tr><th id="eftarget"><p align="left">effective_target</p></th>
716 * <td headers="cri eftarget send_req">yes</td>
717 * <td headers="cri eftarget send_poll">yes</td>
718 * <td headers="cri eftarget rec_reply">yes</td>
719 * <td headers="cri eftarget rec_ex">yes</td>
720 * <td headers="cri eftarget rec_oth">yes</td>
721 * </tr>
722 *
723 * <tr><th id="efprof"><p align="left">effective_profile</p></th>
724 * <td headers="cri efprof send_req">yes</td>
725 * <td headers="cri efprof send_poll">yes</td>
726 * <td headers="cri efprof rec_reply">yes</td>
727 * <td headers="cri efprof rec_ex">yes</td>
728 * <td headers="cri efprof rec_oth">yes</td></tr>
729 *
730 * <tr><th id="rxp"><p align="left">received_exception</p></th>
731 * <td headers="cri rxp send_req">no </td>
732 * <td headers="cri rxp send_poll">no </td>
733 * <td headers="cri rxp rec_reply">no </td>
734 * <td headers="cri rxp rec_ex">yes</td>
735 * <td headers="cri rxp rec_oth">no </td></tr>
736 *
737 * <tr><th id="rei"><p align="left">received_exception_id</p></th>
738 * <td headers="cri rei send_req">no </td>
739 * <td headers="cri rei send_poll">no </td>
740 * <td headers="cri rei rec_reply">no </td>
741 * <td headers="cri rei rec_ex">yes</td>
742 * <td headers="cri rei rec_oth">no </td></tr>
743 *
744 * <tr><th id="gec"><p align="left">get_effective_component</p></th>
745 * <td headers="cri gec send_req">yes</td>
746 * <td headers="cri gec send_poll">no </td>
747 * <td headers="cri gec rec_reply">yes</td>
748 * <td headers="cri gec rec_ex">yes</td>
749 * <td headers="cri gec rec_oth">yes</td></tr>
750 *
751 * <tr><th id="gecs"><p align="left">get_effective_components</p></th>
752 * <td headers="cri gecs send_req">yes</td>
753 * <td headers="cri gecs send_poll">no </td>
754 * <td headers="cri gecs rec_reply">yes</td>
755 * <td headers="cri gecs rec_ex">yes</td>
756 * <td headers="cri gecs rec_oth">yes</td></tr>
757 *
758 * <tr><th id="grpcy"><p align="left">get_request_policy</p></th>
759 * <td headers="cri grpcy send_req">yes</td>
760 * <td headers="cri grpcy send_poll">no </td>
761 * <td headers="cri grpcy rec_reply">yes</td>
762 * <td headers="cri grpcy rec_ex">yes</td>
763 * <td headers="cri grpcy rec_oth">yes</td></tr>
764 *
765 * <tr><th id="arsc"><p align="left">add_request_service_context</p></th>
766 * <td headers="cri arsc send_req">yes</td>
767 * <td headers="cri arsc send_poll">no </td>
768 * <td headers="cri arsc rec_reply">no </td>
769 * <td headers="cri arsc rec_ex">no </td>
770 * <td headers="cri arsc rec_oth">no </td></tr>
771 *
772 * </tbody>
773 * </table>
774 *
775 * <ol>
776 * <li>When <code>ClientRequestInfo</code> is passed to
777 * <code>send_request</code>, there is an entry in the list for every
778 * argument, whether in, inout, or out. But only the in and inout
779 * arguments will be available.</li>
780 * <li>If the <code>reply_status</code> atribute is not
781 * <code>LOCATION_FORWARD</code>, accessing this attribute will
782 * throw <code>BAD_INV_ORDER</code> with a standard minor code of
783 * 14.</li>
784 * </ol>
785 *
786 * @see ClientRequestInterceptor
787 */
788 local interface ClientRequestInfo : RequestInfo {
790 /**
791 * Returns the object which the client called to perform the
792 * operation.
793 *
794 * @see #effective_target
795 */
796 readonly attribute Object target;
798 /**
799 * Returns the actual object on which the operation will be invoked.
800 * If the <code>reply_status</code> is <code>LOCATION_FORWARD</code>,
801 * then on subsequent requests, <code>effective_target</code> will
802 * contain the forwarded IOR while target will remain unchanged.
803 *
804 * @see #target
805 */
806 readonly attribute Object effective_target;
808 /**
809 * Returns the profile that will be used to send the request. If a
810 * location forward has occurred for this operation's object and
811 * that object's profile changed accordingly, then this profile will
812 * be that located profile.
813 */
814 readonly attribute IOP::TaggedProfile effective_profile;
816 /**
817 * Returns an any which contains the exception to be returned to
818 * the client.
819 * <p>
820 * If the exception is a user exception which cannot be inserted
821 * into an any (e.g., it is unknown or the bindings don t provide
822 * the <code>TypeCode</code>), then this attribute will be an any
823 * containing the system exception <code>UNKNOWN</code> with a
824 * standard minor code of 1. However, the repository id of
825 * the exception is available in the <code>received_exception_id</code>
826 * attribute.
827 *
828 * @see #received_exception_id
829 */
830 readonly attribute any received_exception;
832 /**
833 * Returns the repository id of the exception to be returned to
834 * the client.
835 *
836 * @see #received_exception
837 * @see <a href="package-summary.html#unimpl">
838 * <code>PortableInterceptor</code> package comments for
839 * limitations / unimplemented features</a>
840 */
841 readonly attribute CORBA::RepositoryId received_exception_id;
843 /**
844 * Returns the <code>IOP.TaggedComponent</code> with the given ID from
845 * the profile selected for this request.
846 * <p>
847 * If there is more than one component for a given component ID, it
848 * is undefined which component this operation returns. If there is
849 * more than one component for a given component ID,
850 * <code>get_effective_components</code> should be called instead.
851 *
852 * @param id The component id of the component which
853 * is to be returned.
854 * @return The <code>IOP.TaggedComponent</code> obtained with the
855 * given identifier.
856 * @exception BAD_PARAM thrown, with a standard minor code of 28, if
857 * no component exists for the given component ID.
858 * @see #get_effective_components
859 */
860 IOP::TaggedComponent get_effective_component
861 (in IOP::ComponentId id);
863 /**
864 * Returns an array of all tagged components with the given ID from the
865 * profile selected for this request.
866 *
867 * @param id The component id of the components which are to be returned.
868 * @return An array of <code>TaggedComponent</code> objects, each of
869 * which contains the given identifier.
870 * @exception BAD_PARAM thrown, with a standard minor code of 28, if
871 * no component exists for the given component ID.
872 * @see #get_effective_component
873 */
874 IOP::TaggedComponentSeq get_effective_components
875 (in IOP::ComponentId id);
877 /**
878 * Returns the given policy in effect for this operation.
879 *
880 * @exception INV_POLICY thrown, with a standard minor code of 1, if the
881 * policy type is not valid either because the specified type is
882 * not supported by this ORB or because a policy object of that type
883 * is not associated with this Object
884 * @param type The policy type which specifies the policy to be
885 * returned.
886 * @return The <code>CORBA.Policy</code> obtained with the given type.
887 * @see <a href="package-summary.html#unimpl">
888 * <code>PortableInterceptor</code> package comments for
889 * limitations / unimplemented features</a>
890 */
891 CORBA::Policy get_request_policy
892 (in CORBA::PolicyType type);
894 /**
895 * Allows Interceptors to add service contexts to the request.
896 * <p>
897 * There is no declaration of the order of the service contexts.
898 * They may or may not appear in the order that they are added.
899 *
900 * @param service_context The <code>IOP.ServiceContext</code> to be
901 * added to the request.
902 * @param replace Indicates the behavior of this operation when a
903 * service context already exists with the given ID. If false,
904 * then <code>BAD_INV_ORDER</code> with a standard minor code of 15
905 * is thrown. If true, then the existing service context is
906 * replaced by the new one.
907 */
908 void add_request_service_context (
909 in IOP::ServiceContext service_context,
910 in boolean replace);
911 };
913 // Should be type string
914 typedef string ServerId ;
916 // This should actually be the CORBA::ORBid type once that is available
917 typedef string ORBId ;
919 /** The name of an object adapter. This is unique only within
920 * the scope of the ORB that created the object adapter.
921 */
922 typedef org::omg::CORBA::StringSeq AdapterName ;
924 /** Type of an object id. This provides the identity of a particular
925 * object that was created by an object adapter.
926 */
927 typedef org::omg::CORBA::OctetSeq ObjectId ;
929 /**
930 * Request Information, accessible to server-side request interceptors.
931 * <p>
932 * Some attributes and operations on <code>ServerRequestInfo</code> are not
933 * valid at all interception points. The following table shows the validity
934 * of each attribute or operation. If it is not valid, attempting to access
935 * it will result in a <code>BAD_INV_ORDER</code> being thrown with a
936 * standard minor code of 14.
937 * <p>
938 *
939 *
940 * <table border=1 summary="Shows the validity of each attribute or operation">
941 * <thead>
942 * <tr>
943 * <th> </th>
944 * <th id="rec_req_ser_con" valign="bottom">receive_request_<br>service_contexts</th>
945 * <th id="rec_req" valign="bottom">receive_request</th>
946 * <th id="send_rep" valign="bottom">send_reply</th>
947 * <th id="send_exc" valign="bottom">send_exception</th>
948 * <th id="send_oth" valign="bottom">send_other</th>
949 * </tr>
950 * </thead>
951 * <tbody>
952 *
953 *
954 * <tr>
955 * <td id="ri" colspan=6><i>Inherited from RequestInfo:</i></td>
956 * </tr>
957 *
958 * <tr><th id="req_id"><p align="left">request_id</p></th>
959 * <td headers="ri req_id rec_req_ser_con">yes</td>
960 * <td headers="ri req_id rec_req">yes</td>
961 * <td headers="ri req_id send_rep">yes</td>
962 * <td headers="ri req_id send_exc">yes</td>
963 * <td headers="ri req_id send_oth">yes</td></tr>
964 *
965 * <tr><th id="op"><p align="left">operation</p></th>
966 * <td headers="ri op rec_req_ser_con">yes</td>
967 * <td headers="ri op rec_req">yes</td>
968 * <td headers="ri op send_rep">yes</td>
969 * <td headers="ri op send_exc">yes</td>
970 * <td headers="ri op send_oth">yes</td></tr>
971 *
972 * <tr><th id="args"><p align="left">arguments</p></th>
973 * <td headers="ri args rec_req_ser_con">no </td>
974 * <td headers="ri args rec_req">yes<sub>1</sub></td>
975 * <td headers="ri args send_rep">yes</td>
976 * <td headers="ri args send_exc">no<sub>2</sub></td>
977 * <td headers="ri args send_oth">no<sub>2</sub>
978 * </td></tr>
979 *
980 * <tr><th id="exps"><p align="left">exceptions</p></th>
981 * <td headers="ri exps rec_req_ser_con">no </td>
982 * <td headers="ri exps rec_req">yes</td>
983 * <td headers="ri exps send_rep">yes</td>
984 * <td headers="ri exps send_exc">yes</td>
985 * <td headers="ri exps send_oth">yes</td></tr>
986 *
987 * <tr><th id="contexts"><p align="left">contexts</p></th>
988 * <td headers="ri contexts rec_req_ser_con">no </td>
989 * <td headers="ri contexts rec_req">yes</td>
990 * <td headers="ri contexts send_rep">yes</td>
991 * <td headers="ri contexts send_exc">yes</td>
992 * <td headers="ri contexts send_oth">yes</td></tr>
993 *
994 * <tr><th id="op_con"><p align="left">operation_context</p></th>
995 * <td headers="ri op_con rec_req_ser_con">no </td>
996 * <td headers="ri op_con rec_req">yes</td>
997 * <td headers="ri op_con send_rep">yes</td>
998 * <td headers="ri op_con send_exc">no </td>
999 * <td headers="ri op_con send_oth">no </td>
1000 * </tr>
1001 *
1002 * <tr><th id="result"><p align="left">result</p></th>
1003 * <td headers="ri result rec_req_ser_con">no </td>
1004 * <td headers="ri result rec_req">no </td>
1005 * <td headers="ri result send_rep">yes</td>
1006 * <td headers="ri result send_exc">no </td>
1007 * <td headers="ri result send_oth">no </td>
1008 * </tr>
1009 *
1010 * <tr><th id="res_ex"><p align="left">response_expected</p></th>
1011 * <td headers="ri res_ex rec_req_ser_con">yes</td>
1012 * <td headers="ri res_ex rec_req">yes</td>
1013 * <td headers="ri res_ex send_rep">yes</td>
1014 * <td headers="ri res_ex send_exc">yes</td>
1015 * <td headers="ri res_ex send_oth">yes</td></tr>
1016 *
1017 * <tr><th id="syn_scp"><p align="left">sync_scope</p></th>
1018 * <td headers="ri syn_scp rec_req_ser_con">yes</td>
1019 * <td headers="ri syn_scp rec_req">yes</td>
1020 * <td headers="ri syn_scp send_rep">yes</td>
1021 * <td headers="ri syn_scp send_exc">yes</td>
1022 * <td headers="ri syn_scp send_oth">yes</td></tr>
1023 *
1024 * <tr><td><b>request_id</b></td>
1025 * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1026 *
1027 * <tr><td><b>operation</b></td>
1028 * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1029 *
1030 * <tr><td><b>arguments</b></td>
1031 * <td>no </td> <td>yes<sub>1</sub</td>
1032 * <td>yes</td> <td>no<sub>2</sub></td>
1033 * <td>no<sub>2</sub>
1034 * </td></tr>
1035 *
1036 * <tr><td><b>exceptions</b></td>
1037 * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1038 *
1039 * <tr><td><b>contexts</b></td>
1040 * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1041 *
1042 * <tr><td><b>operation_context</b></td>
1043 * <td>no </td> <td>yes</td> <td>yes</td> <td>no </td> <td>no </td></tr>
1044 *
1045 * <tr><td><b>result</b></td>
1046 * <td>no </td> <td>no </td> <td>yes</td> <td>no </td> <td>no </td></tr>
1047 *
1048 * <tr><td><b>response_expected</b></td>
1049 * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1050 *
1051 * <tr><td><b>sync_scope</b></td>
1052 * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1053 *
1054 * <tr><td><b>reply_status</b></td>
1055 * <td>no </td> <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1056 *
1057 * <tr><td><b>forward_reference</b></td>
1058 * <td>no </td> <td>no </td> <td>no </td> <td>no </td> <td>yes<sub>2</sub>
1059 * </td></tr>
1060 *
1061 * <tr><td><b>get_slot</b></td>
1062 * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1063 *
1064 * <tr><td><b>get_request_service_context</b></td>
1065 * <td>yes</td> <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1066 *
1067 * <tr><td><b>get_reply_service_context</b></td>
1068 * <td>no </td> <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1069 *
1070 * <tr>
1071 * <td colspan=6><i>ServerRequestInfo-specific:</i></td>
1072 * </tr>
1073 *
1074 * <tr><td><b>sending_exception</b></td>
1075 * <td>no </td> <td>no </td> <td>no </td> <td>yes</td> <td>no </td></tr>
1076 *
1077 * <tr><td><b>object_id</b></td>
1078 * <td>no </td> <td>yes</td> <td>yes</td> <td>yes<sub>3</sub></td>
1079 * <td>yes<sub>3</sub>
1080 * </td></tr>
1081 *
1082 * <tr><td><b>adapter_id</b></td>
1083 * <td>no </td> <td>yes</td> <td>yes</td> <td>yes<sub>3</sub></td>
1084 * <td>yes<sub>3</sub>
1085 * </td></tr>
1086 *
1087 * <tr><td><b>server_id</b></td>
1088 * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1089 *
1090 * <tr><td><b>orb_id</b></td>
1091 * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1092 *
1093 * <tr><td><b>adapter_name</b></td>
1094 * <td>no </td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1095 *
1096 * <tr><td><b>target_most_derived_interface</b></td>
1097 * <td>no </td> <td>yes</td> <td>no<sub>4</sub></td>
1098 * <td>no<sub>4</sub></td>
1099 * <td>no<sub>4</sub>
1100 * </td></tr>
1101 *
1102 * <tr><td><b>get_server_policy</b></td>
1103 * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1104 *
1105 * <tr><td><b>set_slot</b></td>
1106 * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1107 *
1108 * <tr><td><b>target_is_a</b></td>
1109 * <td>no </td> <td>yes</td> <td>no<sub>4</sub></td>
1110 * <td>no<sub>4</sub></td>
1111 * <td>no<sub>4</sub>
1112 * </td></tr>
1113 *
1114 * <tr><td><b>add_reply_service_context</b></td>
1115 * <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td> <td>yes</td></tr>
1116 * </tbody>
1117 * </table>
1118 *
1119 * <ol>
1120 * <li>When <code>ServerRequestInfo</code> is passed to
1121 * <code>receive_request</code>, there is an entry in the list for
1122 * every argument, whether in, inout, or out. But only the in and
1123 * inout arguments will be available.</li>
1124 * <li>If the <code>reply_status</code> attribute is not
1125 * <code>LOCATION_FORWARD</code>, accessing this attribute will throw
1126 * <code>BAD_INV_ORDER</code> with a standard minor code of 14.</li>
1127 * <li>If the servant locator caused a location forward, or thrown an
1128 * exception, this attribute/operation may not be available in this
1129 * interception point. <code>NO_RESOURCES</code> with a standard minor
1130 * code of 1 will be thrown if it is not available.</li>
1131 * <li>The operation is not available in this interception point because
1132 * the necessary information requires access to the target object's
1133 * servant, which may no longer be available to the ORB. For example,
1134 * if the object's adapter is a POA that uses a
1135 * <code>ServantLocator</code>, then the ORB invokes the interception
1136 * point after it calls <code>ServantLocator.postinvoke()</code></li>.
1137 * </ol>
1138 *
1139 * @see ServerRequestInterceptor
1140 */
1141 local interface ServerRequestInfo : RequestInfo {
1143 /**
1144 * Returns an any which contains the exception to be returned to
1145 * the client.
1146 * <p>
1147 * If the exception is a user exception which cannot be inserted into
1148 * an any (e.g., it is unknown or the bindings don't provide the
1149 * <code>TypeCode</code>), then this attribute will be an any
1150 * containing the system exception <code>UNKNOWN</code> with a
1151 * standard minor code of 1.
1152 *
1153 * @see <a href="package-summary.html#unimpl">
1154 * <code>PortableInterceptor</code> package comments for
1155 * limitations / unimplemented features</a>
1156 */
1157 readonly attribute any sending_exception;
1159 /**
1160 * Returns the opaque <code>object_id</code> describing the target of
1161 * the operation invocation.
1162 */
1163 readonly attribute ObjectId object_id;
1165 /**
1166 * Returns the opaque identifier for the object adapter.
1167 */
1168 readonly attribute CORBA::OctetSeq adapter_id;
1170 /**
1171 * Returns the server ID that was specified on ORB::init using the -ORBServerId
1172 * argument.
1173 */
1174 readonly attribute ServerId server_id ;
1176 /**
1177 * Returns the ID that was used to create the ORB.
1178 */
1179 readonly attribute ORBId orb_id ;
1181 /**
1182 * Returns the sequence of strings that identifies the object
1183 * adapter instance that is handling this request.
1184 */
1185 readonly attribute AdapterName adapter_name ;
1187 /**
1188 * Returns the repository id for the most derived interface of the
1189 * servant.
1190 */
1191 readonly attribute CORBA::RepositoryId
1192 target_most_derived_interface;
1194 /**
1195 * Returns the policy in effect for this operation for the given
1196 * policy type. The returned <code>CORBA.Policy</code> object shall
1197 * only be a policy whose type was registered via
1198 * <code>register_policy_factory</code>.
1199 *
1200 * @param type The <code>CORBA.PolicyType</code> which specifies the
1201 * policy to be returned.
1202 * @return The <code>CORBA.Policy</code> obtained with the given
1203 * policy type.
1204 * @exception INV_POLICY thrown, with a standard minor code of 2, if
1205 * a policy for the given type was not registered via
1206 * <code>register_policy_factory</code>.
1207 * @see ORBInitInfo#register_policy_factory
1208 */
1209 CORBA::Policy get_server_policy
1210 (in CORBA::PolicyType type);
1212 /**
1213 * Allows an Interceptor to set a slot in the
1214 * <code>PortableInterceptor.Current</code> that is in the scope of
1215 * the request. If data already exists in that slot, it will be
1216 * overwritten.
1217 *
1218 * @param id The id of the slot.
1219 * @param data The data, in the form of an any, to store in that slot.
1220 * @exception InvalidSlot thrown if the ID does not define an allocated
1221 * slot.
1222 * @see Current
1223 */
1224 void set_slot (in SlotId id, in any data) raises (InvalidSlot);
1226 /**
1227 * Returns true if the servant is the given repository id,
1228 * false if it is not.
1229 *
1230 * @param id The caller wants to know if the servant is this
1231 * repository id.
1232 * @return Is the servant the given RepositoryId?
1233 */
1234 boolean target_is_a (in CORBA::RepositoryId id);
1236 /**
1237 * Allows Interceptors to add service contexts to the request.
1238 * <p>
1239 * There is no declaration of the order of the service contexts.
1240 * They may or may not appear in the order that they are added.
1241 *
1242 * @param service_context The <code>IOP.ServiceContext</code> to add to
1243 * the reply.
1244 * @param replace Indicates the behavior of this operation when a
1245 * service context already exists with the given ID. If false,
1246 * then <code>BAD_INV_ORDER</code> with a standard minor code of 15
1247 * is thrown. If true, then the existing service context is
1248 * replaced by the new one.
1249 * @exception BAD_INV_ORDER thrown, with a standard minor code of 15, if
1250 * replace is false and a service context already exists with the
1251 * given ID.
1252 */
1253 void add_reply_service_context (
1254 in IOP::ServiceContext service_context,
1255 in boolean replace);
1256 };
1258 /**
1259 * Client-side request interceptor.
1260 * <p>
1261 * A request Interceptor is designed to intercept the flow of a
1262 * request/reply sequence through the ORB at specific points so that
1263 * services can query the request information and manipulate the service
1264 * contexts which are propagated between clients and servers. The primary
1265 * use of request Interceptors is to enable ORB services to transfer
1266 * context information between clients and servers. There are two types
1267 * of request Interceptors: client-side and server-side.
1268 * <p>
1269 * To write a client-side Interceptor, implement the
1270 * <code>ClientRequestInterceptor</code> interface.
1271 *
1272 * @see ClientRequestInfo
1273 */
1274 local interface ClientRequestInterceptor : Interceptor {
1275 /**
1276 * Allows an Interceptor to query request information and modify the
1277 * service context before the request is sent to the server.
1278 * <p>
1279 * This interception point may throw a system exception. If it does,
1280 * no other Interceptors' <code>send_request</code> operations are called.
1281 * Those Interceptors on the Flow Stack are popped and their
1282 * <code>receive_exception</code> interception points are called. This
1283 * interception point may also throw a <code>ForwardRequest</code>
1284 * exception. If an Interceptor throws this exception, no other
1285 * Interceptors' <code>send_request</code> operations are
1286 * called. Those Interceptors on the Flow Stack are popped and their
1287 * <code>receive_other</code> interception points are called.
1288 * <p>
1289 * Compliant Interceptors shall properly follow completion_status
1290 * semantics if they throw a system exception from this interception
1291 * point. The <code>completion_status</code> shall be
1292 * <code>COMPLETED_NO</code>.
1293 *
1294 * @param ri Information about the current request being intercepted.
1295 * @exception ForwardRequest If thrown, indicates to the ORB that a
1296 * retry of the request should occur with the new object given in
1297 * the exception.
1298 */
1299 void send_request (in ClientRequestInfo ri) raises (ForwardRequest);
1301 /**
1302 * Allows an Interceptor to query information during a Time-Independent
1303 * Invocation (TII) polling get reply sequence.
1304 * <p>
1305 * With TII, an application may poll for a response to a request sent
1306 * previously by the polling client or some other client. This poll is
1307 * reported to Interceptors through the <code>send_poll</code>
1308 * interception point and the response is returned through the
1309 * <code>receive_reply</code> or <code>receive_exception</code>
1310 * interception points. If the response is not available before the
1311 * poll time-out expires, the system exception <code>TIMEOUT</code> is
1312 * thrown and <code>receive_exception</code> is called with this
1313 * exception.
1314 * <p>
1315 * This interception point may throw a system exception. If it does,
1316 * no other Interceptors' <code>send_poll</code> operations are
1317 * called. Those Interceptors on the Flow Stack are popped and their
1318 * <code>receive_exception</code> interception points are called.
1319 * <p>
1320 * Compliant Interceptors shall properly follow
1321 * <code>completion_status</code> semantics if they throw a system
1322 * exception from this interception point. The completion_status shall be
1323 * <code>COMPLETED_NO</code>.
1324 *
1325 * @param ri Information about the current request being intercepted.
1326 * @exception TIMEOUT thrown if the response is not available before
1327 * the poll time-out expires
1328 */
1329 void send_poll (in ClientRequestInfo ri);
1331 /**
1332 * Allows an Interceptor to query the information on a reply after it
1333 * is returned from the server and before control is returned to the
1334 * client.
1335 * <p>
1336 * This interception point may throw a system exception. If it does,
1337 * no other Interceptors' <code>receive_reply</code> operations are
1338 * called. The remaining Interceptors in the Flow Stack shall have
1339 * their <code>receive_exception</code> interception point called.
1340 * <p>
1341 * Compliant Interceptors shall properly follow
1342 * <code>completion_status</code> semantics if they throw a system
1343 * exception from this interception point. The
1344 * <code>completion_status</code> shall be <code>COMPLETED_YES</code>.
1345 *
1346 * @param ri Information about the current request being intercepted.
1347 */
1348 void receive_reply (in ClientRequestInfo ri);
1350 /**
1351 * Indicates to the interceptor that an exception occurred. Allows
1352 * an Interceptor to query the exception's information before it is
1353 * thrown to the client.
1354 * <p>
1355 * This interception point may throw a system exception. This has the
1356 * effect of changing the exception which successive Interceptors
1357 * popped from the Flow Stack receive on their calls to
1358 * <code>receive_exception</code>. The exception thrown to the client
1359 * will be the last exception thrown by an Interceptor, or the original
1360 * exception if no Interceptor changes the exception.
1361 * <p>
1362 * This interception point may also throw a <code>ForwardRequest</code>
1363 * exception. If an Interceptor throws this exception, no other
1364 * Interceptors' <code>receive_exception</code> operations are called.
1365 * The remaining Interceptors in the Flow Stack are popped and have their
1366 * <code>receive_other</code> interception point called.
1367 * <p>
1368 * If the <code>completion_status</code> of the exception is not
1369 * <code>COMPLETED_NO</code>, then it is inappropriate for this
1370 * interception point to throw a <code>ForwardRequest</code> exception.
1371 * The request s at-most-once semantics would be lost.
1372 * <p>
1373 * Compliant Interceptors shall properly follow
1374 * <code>completion_status</code> semantics if they throw a system
1375 * exception from this interception point. If the original exception is
1376 * a system exception, the <code>completion_status</code> of the new
1377 * exception shall be the same as on the original. If the original
1378 * exception is a user exception, then the <code>completion_status</code>
1379 * of the new exception shall be <code>COMPLETED_YES</code>.
1380 * <p>
1381 * Under some conditions, depending on what policies are in effect, an
1382 * exception (such as <code>COMM_FAILURE</code>) may result in a retry
1383 * of the request. While this retry is a new request with respect to
1384 * Interceptors, there is one point of correlation between the original
1385 * request and the retry: because control has not returned to the
1386 * client, the <code>PortableInterceptor.Current</code> for both the
1387 * original request and the retrying request is the same.
1388 *
1389 * @param ri Information about the current request being intercepted.
1390 * @exception ForwardRequest If thrown, indicates to the ORB that a
1391 * retry of the request should occur with the new object given in
1392 * the exception.
1393 */
1394 void receive_exception (in ClientRequestInfo ri) raises (ForwardRequest);
1396 /**
1397 * Allows an Interceptor to query the information available when a
1398 * request results in something other than a normal reply or an
1399 * exception. For example, a request could result in a retry
1400 * (e.g., a GIOP Reply with a <code>LOCATION_FORWARD</code> status was
1401 * received); or on asynchronous calls, the reply does not immediately
1402 * follow the request, but control shall return to the client and an
1403 * ending interception point shall be called.
1404 * <p>
1405 * For retries, depending on the policies in effect, a new request may or
1406 * may not follow when a retry has been indicated. If a new request does
1407 * follow, while this request is a new request, with respect to
1408 * Interceptors, there is one point of correlation between the original
1409 * request and the retry: because control has not returned to the client,
1410 * the request scoped <code>PortableInterceptor.Current</code> for both
1411 * the original request and the retrying request is the same.
1412 * <p>
1413 * This interception point may throw a system exception. If it does, no
1414 * other Interceptors' <code>receive_other</code> operations are called.
1415 * The remaining Interceptors in the Flow Stack are popped and have
1416 * their <code>receive_exception</code> interception point called.
1417 * <p>
1418 * This interception point may also throw a <code>ForwardRequest</code>
1419 * exception. If an Interceptor throws this exception, successive
1420 * Interceptors' <code>receive_other</code> operations are called with
1421 * the new information provided by the <code>ForwardRequest</code>
1422 * exception.
1423 * <p>
1424 * Compliant Interceptors shall properly follow
1425 * <code>completion_status</code> semantics if they throw a system
1426 * exception from this interception point. The
1427 * <code>completion_status</code> shall be <code>COMPLETED_NO</code>.
1428 * If the target invocation had completed, this interception point
1429 * would not be called.
1430 *
1431 * @param ri Information about the current request being intercepted.
1432 * @exception ForwardRequest If thrown, indicates to the ORB that a
1433 * retry of the request should occur with the new object given in
1434 * the exception.
1435 */
1436 void receive_other (in ClientRequestInfo ri) raises (ForwardRequest);
1437 };
1439 /**
1440 * Server-side request interceptor.
1441 * <p>
1442 * A request Interceptor is designed to intercept the flow of a
1443 * request/reply sequence through the ORB at specific points so that
1444 * services can query the request information and manipulate the service
1445 * contexts which are propagated between clients and servers. The primary
1446 * use of request Interceptors is to enable ORB services to transfer
1447 * context information between clients and servers. There are two types
1448 * of request Interceptors: client-side and server-side.
1449 * <p>
1450 * To write a server-side Interceptor, implement the
1451 * ServerRequestInterceptor interface.
1452 *
1453 * @see ServerRequestInfo
1454 */
1455 local interface ServerRequestInterceptor : Interceptor {
1456 /**
1457 * Allows the interceptor to process service context information.
1458 * <p>
1459 * At this interception point, Interceptors must get their service
1460 * context information from the incoming request transfer it to
1461 * <code>PortableInterceptor.Current</code>'s slots.
1462 * <p>
1463 * This interception point is called before the servant manager is called.
1464 * Operation parameters are not yet available at this point. This
1465 * interception point may or may not execute in the same thread as
1466 * the target invocation.
1467 * <p>
1468 * This interception point may throw a system exception. If it does,
1469 * no other Interceptors' <code>receive_request_service_contexts</code>
1470 * operations are called. Those Interceptors on the Flow Stack are
1471 * popped and their <code>send_exception</code> interception points are
1472 * called.
1473 * <p>
1474 * This interception point may also throw a <code>ForwardRequest</code>
1475 * exception. If an Interceptor throws this exception, no other
1476 * Interceptors' <code>receive_request_service_contexts</code> operations
1477 * are called. Those Interceptors on the Flow Stack are popped and
1478 * their <code>send_other</code> interception points are called.
1479 * <p>
1480 * Compliant Interceptors shall properly follow
1481 * <code>completion_status</code> semantics if they throw a system
1482 * exception from this interception point. The
1483 * <code>completion_status</code> shall be COMPLETED_NO.
1484 *
1485 * @param ri Information about the current request being intercepted.
1486 * @exception ForwardRequest If thrown, indicates to the ORB that a
1487 * retry of the request should occur with the new object given in
1488 * the exception.
1489 */
1490 void receive_request_service_contexts (in ServerRequestInfo ri)
1491 raises (ForwardRequest);
1493 /**
1494 * Allows an Interceptor to query request information after all the
1495 * information, including operation parameters, are available. This
1496 * interception point shall execute in the same thread as the target
1497 * invocation.
1498 * <p>
1499 * In the DSI model, since the parameters are first available when
1500 * the user code calls <code>arguments</code>, <code>receive_request</code>
1501 * is called from within <code>arguments</code>. It is possible that
1502 * <code>arguments</code> is not called in the DSI model. The target
1503 * may call <code>set_exception</code> before calling
1504 * <code>arguments</code>. The ORB shall guarantee that
1505 * <code>receive_request</code> is called once, either through
1506 * <code>arguments</code> or through <code>set_exception</code>. If it
1507 * is called through <code>set_exception</code>, requesting the
1508 * arguments will result in <code>NO_RESOURCES</code> being thrown with
1509 * a standard minor code of 1.
1510 * <p>
1511 * This interception point may throw a system exception. If it does, no
1512 * other Interceptors' <code>receive_request</code> operations are
1513 * called. Those Interceptors on the Flow Stack are popped and their
1514 * <code>send_exception</code> interception points are called.
1515 * <p>
1516 * This interception point may also throw a <code>ForwardRequest</code>
1517 * exception. If an Interceptor throws this exception, no other
1518 * Interceptors' <code>receive_request</code> operations are called.
1519 * Those Interceptors on the Flow Stack are popped and their
1520 * <code>send_other</code> interception points are called.
1521 * <p>
1522 * Compliant Interceptors shall properly follow
1523 * <code>completion_status</code> semantics if they throw a system
1524 * exception from this interception point. The
1525 * <code>completion_status</code> shall be <code>COMPLETED_NO</code>.
1526 *
1527 * @param ri Information about the current request being intercepted.
1528 * @exception ForwardRequest If thrown, indicates to the ORB that a
1529 * retry of the request should occur with the new object given in
1530 * the exception.
1531 */
1532 void receive_request (in ServerRequestInfo ri) raises (ForwardRequest);
1534 /**
1535 * Allows an Interceptor to query reply information and modify the
1536 * reply service context after the target operation has been invoked
1537 * and before the reply is returned to the client. This interception
1538 * point shall execute in the same thread as the target invocation.
1539 * <p>
1540 * This interception point may throw a system exception. If it does,
1541 * no other Interceptors' <code>send_reply</code> operations are called.
1542 * The remaining Interceptors in the Flow Stack shall have their
1543 * <code>send_exception</code> interception point called.
1544 * <p>
1545 * Compliant Interceptors shall properly follow
1546 * <code>completion_status</code> semantics if they throw a
1547 * system exception from this interception point. The
1548 * <code>completion_status</code> shall be <code>COMPLETED_YES</code>.
1549 *
1550 * @param ri Information about the current request being intercepted.
1551 */
1552 void send_reply (in ServerRequestInfo ri);
1554 /**
1555 * Allows an Interceptor to query the exception information and modify
1556 * the reply service context before the exception is thrown to the client.
1557 * When an exception occurs, this interception point is called. This
1558 * interception point shall execute in the same thread as the target
1559 * invocation.
1560 * <p>
1561 * This interception point may throw a system exception. This has the
1562 * effect of changing the exception which successive Interceptors
1563 * popped from the Flow Stack receive on their calls to
1564 * <code>send_exception</code>. The exception thrown to the client will
1565 * be the last exception thrown by an Interceptor, or the original
1566 * exception if no Interceptor changes the exception.
1567 * <p>
1568 * This interception point may also throw a <code>ForwardRequest</code>
1569 * exception. If an Interceptor throws this exception, no other
1570 * Interceptors' <code>send_exception</code> operations are called. The
1571 * remaining Interceptors in the Flow Stack shall have their
1572 * <code>send_other</code> interception points called.
1573 * <p>
1574 * If the <code>completion_status</code> of the exception is not
1575 * <code>COMPLETED_NO</code>, then it is inappropriate for this
1576 * interception point to throw a <code>ForwardRequest</code> exception.
1577 * The request's at-most-once semantics would be lost.
1578 * <p>
1579 * Compliant Interceptors shall properly follow
1580 * <code>completion_status</code> semantics if they throw a system
1581 * exception from this interception point. If the original exception
1582 * is a system exception, the <code>completion_status</code> of the new
1583 * exception shall be the same as on the original. If the original
1584 * exception is a user exception, then the <code>completion_status</code>
1585 * of the new exception shall be <code>COMPLETED_YES</code>.
1586 *
1587 * @param ri Information about the current request being intercepted.
1588 * @exception ForwardRequest If thrown, indicates to the ORB that a
1589 * retry of the request should occur with the new object given in
1590 * the exception.
1591 */
1592 void send_exception (in ServerRequestInfo ri) raises (ForwardRequest);
1594 /**
1595 * Allows an Interceptor to query the information available when a
1596 * request results in something other than a normal reply or an
1597 * exception. For example, a request could result in a retry
1598 * (e.g., a GIOP Reply with a <code>LOCATION_FORWARD</code> status was
1599 * received). This interception point shall execute in the same thread
1600 * as the target invocation.
1601 * <p>
1602 * This interception point may throw a system exception. If it does,
1603 * no other Interceptors' <code>send_other</code> operations are called.
1604 * The remaining Interceptors in the Flow Stack shall have their
1605 * <code>send_exception</code> interception points called.
1606 * <p>
1607 * This interception point may also throw a <code>ForwardRequest</code>
1608 * exception. If an Interceptor throws this exception, successive
1609 * Interceptors' <code>send_other</code> operations are called with
1610 * the new information provided by the <code>ForwardRequest</code>
1611 * exception.
1612 * <p>
1613 * Compliant Interceptors shall properly follow
1614 * <code>completion_status</code> semantics if they throw a system
1615 * exception from this interception point. The
1616 * <code>completion_status</code> shall be <code>COMPLETED_NO</code>.
1617 *
1618 * @param ri Information about the current request being intercepted.
1619 * @exception ForwardRequest If thrown, indicates to the ORB that a
1620 * retry of the request should occur with the new object given in
1621 * the exception.
1622 */
1623 void send_other (in ServerRequestInfo ri) raises (ForwardRequest);
1624 };
1626 /** The object reference factory. This provides the capability of
1627 * creating an object reference.
1628 */
1629 abstract valuetype ObjectReferenceFactory {
1630 /** make_object creates a CORBA object reference according
1631 * to the data in this template, with the given repository ID and
1632 * object ID.
1633 */
1634 Object make_object( in string repositoryId, in ObjectId object_id ) ;
1635 } ;
1637 /** The object reference template. An instance of this must
1638 * exist for each object adapter created in an ORB. The server_id,
1639 * orb_id, and adapter_name attributes uniquely identify this template
1640 * within the scope of an IMR. Note that adapter_id is similarly unique
1641 * within the same scope, but it is opaque, and less useful in many
1642 * cases.
1643 */
1644 abstract valuetype ObjectReferenceTemplate : ObjectReferenceFactory {
1646 readonly attribute ServerId server_id ;
1648 readonly attribute ORBId orb_id ;
1650 readonly attribute AdapterName adapter_name ;
1651 } ;
1653 /** Sequence of object reference templates is used for reporting state
1654 * changes that do not occur on the adapter manager.
1655 */
1656 typedef sequence<ObjectReferenceTemplate> ObjectReferenceTemplateSeq ;
1658 /** Adapter manager identifier. Every object adapter has an adapter manager,
1659 * indicated in this API only through the ID. A group of object adapter
1660 * instances may share the same adapter manager, in which case state transitions
1661 * reported for the adapter manager are observed by all object adapters with the
1662 * same adapter manager ID.
1663 */
1664 typedef long AdapterManagerId ;
1666 /** Type of object adapter state. State changes are reported either to
1667 * the object adapter or to the adapter manager.
1668 */
1669 typedef short AdapterState ;
1671 /** Object adapter state that holds requests temporarily until the
1672 * state is changed.
1673 */
1674 const AdapterState HOLDING = 0 ;
1676 /** Object adapter state that indicates normal request processing.
1677 */
1678 const AdapterState ACTIVE = 1 ;
1680 /** Object adapter state that causes all requests to be discarded.
1681 */
1682 const AdapterState DISCARDING = 2 ;
1684 /** Object adapter state that causes all requests to be discarded.
1685 * This state indicates that the adapter is shutting down.
1686 */
1687 const AdapterState INACTIVE = 3 ;
1689 /** Object adapter state indicating that the adapter has been destroyed.
1690 */
1691 const AdapterState NON_EXISTENT = 4 ;
1693 /**
1694 * Provides the server-side ORB service with access to the applicable
1695 * policies during IOR construction and the ability to add components.
1696 * The ORB passes an instance of its implementation of this interface as
1697 * a parameter to <code>IORInterceptor.establish_components</code>.
1698 *
1699 * @see IORInterceptor
1700 */
1701 local interface IORInfo {
1703 /**
1704 * Allows an ORB service implementation to determine what server side
1705 * policy of a particular type is in effect for an IOR being
1706 * constructed. When the IOR being constructed is for an object
1707 * implemented using a POA, all Policy objects passed to the
1708 * <code>PortableServer.POA.create_POA</code> call that created that
1709 * POA are accessable via <code>get_effective_policy</code>.
1710 * <p>
1711 * If a policy for the given type is not known to the ORB, then this
1712 * operation will throw <code>INV_POLICY</code> with a standard minor
1713 * code of 2.
1714 *
1715 * @param type an int specifying the type of policy to return.
1716 * @return The effective <code>CORBA.Policy</code> object of the
1717 * requested type. If the given policy type is known, but no policy
1718 * of that type is in effect, then this operation will return a
1719 * nil object reference.
1720 */
1721 CORBA::Policy get_effective_policy
1722 (in CORBA::PolicyType type);
1724 /**
1725 * A portable ORB service implementation calls
1726 * <code>add_ior_component</code> from its implementation of
1727 * <code>establish_components</code> to add a tagged component to the
1728 * set which will be included when constructing IORs. The components in
1729 * this set will be included in all profiles.
1730 * <p>
1731 * Any number of components may exist with the same component ID.
1732 *
1733 * @param tagged_component The IOP.TaggedComponent to add.
1734 */
1735 void add_ior_component
1736 (in IOP::TaggedComponent tagged_component);
1738 /**
1739 * A portable ORB service implementation calls
1740 * <code>add_ior_component_to_profile</code> from its implementation of
1741 * <code>establish_components</code> to add a tagged component to the
1742 * set which will be included when constructing IORs. The components in
1743 * this set will be included in the specified profile.
1744 * <p>
1745 * Any number of components may exist with the same component ID.
1746 *
1747 * @param tagged_component The <code>IOP.TaggedComponent</code> to add.
1748 * @param profile_id The profile id of the profile to
1749 * which this component will be added.
1750 * @exception BAD_PARAM thrown, with a standard minor code of 29, if the
1751 * given profile ID does not define a known profile or it is
1752 * impossible to add components to that profile.
1753 */
1754 void add_ior_component_to_profile (
1755 in IOP::TaggedComponent tagged_component,
1756 in IOP::ProfileId profile_id);
1758 /** Return the adapter manager id of the object adapter
1759 * that was just created and is running IOR interceptors.
1760 */
1761 readonly attribute AdapterManagerId manager_id ;
1763 /** Return the adapter state of the object adapter
1764 * that was just created and is running IOR interceptors.
1765 */
1766 readonly attribute AdapterState state ;
1768 /** Return the object reference template of the object adapter
1769 * that was just created and is running IOR interceptors.
1770 */
1771 readonly attribute ObjectReferenceTemplate adapter_template ;
1773 /** On read, returns the current factory that will be used to create
1774 * object references for the object adapter that was just created
1775 * and is running IOR interceptors. By default, this factory is the same
1776 * as the value of the adapter_template attribute. The current_factory
1777 * may also be set to another object reference template inside an
1778 * IORInterceptor_3_0.
1779 */
1780 attribute ObjectReferenceFactory current_factory ;
1781 };
1783 /**
1784 * Interceptor used to establish tagged components in the profiles within
1785 * an IOR.
1786 * <p>
1787 * In some cases, a portable ORB service implementation may need to add
1788 * information describing the server's or object's ORB service related
1789 * capabilities to object references in order to enable the ORB service
1790 * implementation in the client to function properly.
1791 * <p>
1792 * This is supported through the <code>IORInterceptor</code> and
1793 * <code>IORInfo</code> interfaces.
1794 *
1795 * @see IORInfo
1796 */
1797 local interface IORInterceptor : Interceptor {
1798 /**
1799 * A server side ORB calls the <code>establish_components</code>
1800 * operation on all registered <code>IORInterceptor</code> instances
1801 * when it is assembling the list of components that will be included
1802 * in the profile or profiles of an object reference. This operation
1803 * is not necessarily called for each individual object reference.
1804 * In the case of the POA, this operation is called each time POA::create_POA
1805 * is called. In any case, <code>establish_components</code> is
1806 * guaranteed to be called at least once for each distinct set of
1807 * server policies.
1808 * <p>
1809 * An implementation of <code>establish_components</code> must not
1810 * throw exceptions. If it does, the ORB shall ignore the exception
1811 * and proceed to call the next IOR Interceptor's
1812 * <code>establish_components</code> operation.
1813 *
1814 * @param info The <code>IORInfo</code> instance used by the ORB
1815 * service to query applicable policies and add components to be
1816 * included in the generated IORs.
1817 */
1818 void establish_components (in IORInfo info);
1819 };
1821 local interface IORInterceptor_3_0 : IORInterceptor {
1822 /** The components_established method is invoked on all registered
1823 * IORInterceptor_3_0 instances after establish_components
1824 * has been invoked on all registered IORInterceptor instances.
1825 * The adapter_template is available in info during this call.
1826 * The current_factory may be get or set in info during this call.
1827 * <p>
1828 * Any exception thrown from this method is handled by the Object
1829 * Adapter that called this interceptor. In the case of the POA,
1830 * an exception results in a OBJ_ADAPTER exception with an OMG
1831 * standard minor code of 6.
1832 * @param info The IORInfo for the object adapter being created.
1833 */
1834 void components_established( in IORInfo info ) ;
1836 /** Called whenever the state of an adapter manager changes.
1837 * For the POA, that is the POAManager. If the state change
1838 * is reported through <code>adapter_manager_state_changed</code>,
1839 * it is not reported through <code>adapter_state_changed</code>.
1840 * @param id the adapter manager id of the adapter manager that
1841 * changed state
1842 * @param state the new state of the adapter manager
1843 */
1844 void adapter_manager_state_changed( in AdapterManagerId id,
1845 in AdapterState state ) ;
1847 /** Called whenever the state of an object adapter changes, and
1848 * the state change is not caused by an adapter manager. Such
1849 * changes are reported to all registered <code>IORInterceptor_3_0</code>
1850 * instances.
1851 * @param templates the sequence of <code>ObjectReferenceTemplate</code> instances
1852 * on which this state change occurred.
1853 * @param state the new <code>AdapterState</code> shared by all of the templates.
1854 */
1855 void adapter_state_changed( in ObjectReferenceTemplateSeq templates,
1856 in AdapterState state ) ;
1857 };
1859 /**
1860 * Enables policy types to be constructed using
1861 * <code>CORBA.ORB.create_policy</code>.
1862 * <p>
1863 * A portable ORB service implementation registers an instance of the
1864 * <code>PolicyFactory</code> interface during ORB initialization in order
1865 * to enable its policy types to be constructed using
1866 * <code>CORBA.ORB.create_policy</code>. The POA is required to preserve
1867 * any policy which is registered with <code>ORBInitInfo</code> in this
1868 * manner.
1869 *
1870 * @see ORBInitInfo#register_policy_factory
1871 */
1872 local interface PolicyFactory
1873 {
1874 /**
1875 * Returns an instance of the appropriate interface derived from
1876 * <code>CORBA.Policy</code> whose value corresponds to the
1877 * specified any.
1878 * <p>
1879 * The ORB calls <code>create_policy</code> on a registered
1880 * <code>PolicyFactory</code> instance when
1881 * <code>CORBA.ORB.create_policy</code> is called for the
1882 * <code>PolicyType</code> under which the <code>PolicyFactory</code> has
1883 * been registered. The <code>create_policy</code> operation then
1884 * returns an instance of the appropriate interface derived from
1885 * <code>CORBA.Policy</code> whose value corresponds to the specified
1886 * any. If it cannot, it shall throw an exception as described for
1887 * <code>CORBA.ORB.create_policy</code>.
1888 *
1889 * @param type An int specifying the type of policy being created.
1890 * @param value An any containing data with which to construct the
1891 * <code>CORBA.Policy</code>.
1892 * @return A <code>CORBA.Policy<code> object of the specified type and
1893 * value.
1894 */
1895 CORBA::Policy create_policy
1896 (in CORBA::PolicyType type, in any value)
1897 raises (CORBA::PolicyError);
1898 };
1900 /**
1901 * Passed to each <code>ORBInitializer</code>, allowing it to
1902 * to register interceptors and perform other duties while the ORB is
1903 * initializing.
1904 * <p>
1905 * The <code>ORBInitInfo</code> object is only valid during
1906 * <code>ORB.init</code>. If a service keeps a reference to its
1907 * <code>ORBInitInfo</code> object and tries to use it after
1908 * <code>ORB.init</code> returns, the object no longer exists and an
1909 * <code>OBJECT_NOT_EXIST</code> exception shall be thrown.
1910 *
1911 * @see ORBInitializer
1912 */
1913 local interface ORBInitInfo {
1915 /** Object id, represented as a String */
1916 typedef string ObjectId;
1918 /**
1919 * Only one Interceptor of a given name can be registered with the
1920 * ORB for each Interceptor type. If an attempt is made to register a
1921 * second Interceptor with the same name, DuplicateName is thrown.
1922 * <p>
1923 * An Interceptor may be anonymous, i.e., have an empty string as the
1924 * name attribute. Any number of anonymous Interceptors may be
1925 * registered with the ORB so, if the Interceptor being registered
1926 * is anonymous, the registration operation will not throw
1927 * <code>DuplicateName</code>.
1928 */
1929 exception DuplicateName {
1930 /**
1931 * The name for which there was already an interceptor registered.
1932 */
1933 string name;
1934 };
1936 /**
1937 * This exception is thrown by
1938 * <code>register_initial_reference</code> and
1939 * <code>resolve_initial_references</code>.
1940 * <code>register_initial_reference</code> throws <code>InvalidName</code>
1941 * if:
1942 * <ul>
1943 * <li>this operation is called with an empty string id; or</li>
1944 * <li>this operation is called with an id that is already registered,
1945 * including the default names defined by OMG.</li>
1946 * </ul>
1947 * <code>resolve_initial_references</code> throws
1948 * <code>InvalidName</code> if the name to be resolved is invalid.
1949 */
1950 exception InvalidName {};
1952 /**
1953 * Returns the arguments passed to <code>ORB.init</code>. They may or
1954 * may not contain the ORB's arguments.
1955 */
1956 readonly attribute CORBA::StringSeq arguments;
1958 /**
1959 * Returns the ID of the ORB being initialized.
1960 */
1961 readonly attribute string orb_id;
1963 /**
1964 * Returns the <code>IOP.CodecFactory</code>. The
1965 * <code>CodecFactory</code> is normally obtained via a call to
1966 * <code>ORB.resolve_initial_references( "CodecFactory" )</code>, but
1967 * since the ORB is not yet available and Interceptors, particularly when
1968 * processing service contexts, will require a <code>Codec</code>, a
1969 * means of obtaining a <code>Codec</code> is necessary during ORB
1970 * initialization.
1971 */
1972 readonly attribute IOP::CodecFactory codec_factory;
1974 /**
1975 * Identical to <code>ORB.register_initial_reference</code>. This same
1976 * functionality exists here because the ORB, not yet fully initialized,
1977 * is not yet available but initial references may need to be
1978 * registered as part of Interceptor registration. The only difference
1979 * is that the version of this operation on the ORB uses PIDL
1980 * (<code>CORBA.ORB.ObjectId</code>) and
1981 * (<code>CORBA.ORB.InvalidName</code>) whereas the version in this
1982 * interface uses IDL defined in this interface; the semantics are
1983 * identical.
1984 */
1985 void register_initial_reference (in ObjectId id, in Object obj)
1986 raises (InvalidName);
1988 // This was incorrectly returning void in orbos/99-12-02, correction
1989 // from errata in orbos/00-01-01
1990 /**
1991 * Identical to <code>ORB.resolve_initial_references</code>. This same
1992 * functionality exists here because the ORB, not yet fully initialized,
1993 * is not yet available but initial references may be required from the
1994 * ORB as part of Interceptor registration. The only difference is that
1995 * the version of this operation on the ORB uses PIDL
1996 * (<code>CORBA::ORB::ObjectId</code> and
1997 * <code>CORBA::ORB::InvalidName</code>) whereas the version in this
1998 * interface uses IDL defined in this interface; the semantics
1999 * are identical.
2000 * <p>
2001 * This operation is only valid during post_init.
2002 */
2003 Object resolve_initial_references (in ObjectId id) raises (InvalidName);
2005 /**
2006 * Used to add a client-side request Interceptor to the list of
2007 * client-side request Interceptors.
2008 *
2009 * @param interceptor The <code>ClientRequestInterceptor</code> to be
2010 * added.
2011 * @exception DuplicateName thrown if a client-side request Interceptor
2012 * has already been registered with this Interceptor's name.
2013 */
2014 void add_client_request_interceptor
2015 (in ClientRequestInterceptor interceptor)
2016 raises (DuplicateName);
2018 /**
2019 * Used to add a server-side request Interceptor to the list of
2020 * server-side request Interceptors.
2021 *
2022 * @param interceptor The ServerRequestInterceptor to be added.
2023 * @exception DuplicateName thrown if a server-side request Interceptor
2024 * has already been registered with this Interceptor's name
2025 */
2026 void add_server_request_interceptor (
2027 in ServerRequestInterceptor interceptor)
2028 raises (DuplicateName);
2030 /**
2031 * Used to add an IOR Interceptor to the list of IOR Interceptors.
2032 *
2033 * @param interceptor The IORInterceptor to be added.
2034 * @exception DuplicateName thrown if an IOR Interceptor has already
2035 * been registered with this Interceptor's name.
2036 */
2037 void add_ior_interceptor (in IORInterceptor interceptor)
2038 raises (DuplicateName);
2040 /**
2041 * Called to allocate a slot on <code>PortableInterceptor.Current</code>.
2042 * <p>
2043 * Note that while slot id's can be allocated within an ORB initializer,
2044 * the slots themselves cannot be initialized.
2045 *
2046 * @return The index to the slot which has been allocated.
2047 * @exception BAD_INV_ORDER thrown, with a standard minor code of 14, if
2048 * <code>set_slot</code> or <code>get_slot</code> is called on the
2049 * <code>PICurrent</code> within an ORB initializer.
2050 * @see Current
2051 */
2052 SlotId allocate_slot_id ();
2054 /**
2055 * Registers a <code>PolicyFactory</code> for the given
2056 * <code>PolicyType</code>.
2057 *
2058 * @param type The policy type that the given <code>PolicyFactory</code>
2059 * serves.
2060 * @param policy_factory The factory for the given policy type.
2061 * @exception BAD_INV_ORDER thrown, with a standard minor code of 16, if
2062 * a <code>PolicyFactory</code> already exists for the given
2063 * <code>PolicyType</code>.
2064 */
2065 void register_policy_factory (
2066 in CORBA::PolicyType type,
2067 in PolicyFactory policy_factory);
2068 };
2070 /**
2071 * Facilitates interceptor registration and ORB initialization.
2072 * <p>
2073 * Interceptors are intended to be a means by which ORB services gain
2074 * access to ORB processing, effectively becoming part of the ORB.
2075 * Since Interceptors are part of the ORB, when <code>ORB.init</code>
2076 * returns an ORB, the Interceptors shall have been registered.
2077 * Interceptors cannot be registered on an ORB after it has been
2078 * returned by a call to <code>ORB.init</code>.
2079 * <p>
2080 * An Interceptor is registered by registering an associated
2081 * <code>ORBInitializer</code> object which implements the
2082 * <code>ORBInitializer</code> interface. When an ORB is initializing,
2083 * it shall call each registered <code>ORBInitializer</code>, passing it
2084 * an <code>ORBInitInfo</code> object which is used to register its
2085 * Interceptor.
2086 * <p>
2087 * <b>Registering ORB Initializers in Java</b>
2088 * <p>
2089 * ORBInitializers are registered via Java ORB properties.
2090 * <p>
2091 * The property names are of the form:
2092 * <blockquote><code>
2093 * org.omg.PortableInterceptor.ORBInitializerClass.<Service>
2094 * </code></blockquote>
2095 * where <code><Service></code> is the string name of a class
2096 * which implements
2097 * <blockquote><code>
2098 * org.omg.PortableInterceptor.ORBInitializer
2099 * </code></blockquote>
2100 * To avoid name collisions, the reverse DNS name convention should be
2101 * used. For example, if company X has three initializers, it could define
2102 * the following properties:
2103 * <ul>
2104 * <li><code>
2105 * org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init1
2106 * </code></li>
2107 * <li><code>
2108 * org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init2
2109 * </code></li>
2110 * <li><code>
2111 * org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init3
2112 * </code></li>
2113 * </ul>
2114 * During ORB.init, these ORB properties which begin with
2115 * <code>org.omg.PortableInterceptor.ORBInitializerClass</code> shall be
2116 * collected, the <code><Service></code> portion of each property
2117 * shall be extracted, an object shall be instantiated with the
2118 * <code><Service></code> string as its class name, and the
2119 * <code>pre_init</code> and <code>post_init</code> methods shall be
2120 * called on that object. If there are any exceptions, the ORB shall
2121 * ignore them and proceed.
2122 * <p>
2123 * <b><i>Example</i></b>
2124 * <p>
2125 * A client-side logging service written by company X, for example, may
2126 * have the following ORBInitializer implementation:
2127 * <code><pre>
2128 * package com.x.logging;
2129 *
2130 * import org.omg.PortableInterceptor.Interceptor;
2131 * import org.omg.PortableInterceptor.ORBInitializer;
2132 * import org.omg.PortableInterceptor.ORBInitInfo;
2133 *
2134 * public class LoggingService implements ORBInitializer {
2135 * void pre_init( ORBInitInfo info ) {
2136 * // Instantiate the Logging Service s Interceptor.
2137 * Interceptor interceptor = new LoggingInterceptor();
2138 *
2139 * // Register the Logging Service s Interceptor.
2140 * info.add_client_request_interceptor( interceptor );
2141 * }
2142 *
2143 * void post_init( ORBInitInfo info ) {
2144 * // This service does not need two init points.
2145 * }
2146 * }
2147 * </pre></code>
2148 * To run a program called <code>MyApp</code> using this logging
2149 * service, the user could type:
2150 * <blockquote><code>
2151 * java
2152 *-Dorg.omg.PortableInterceptor.ORBInitializerClass.com.x.Logging.LoggingService
2153 * MyApp
2154 * </code></blockquote>
2155 * <p>
2156 * <b>Notes about Registering Interceptors</b>
2157 * <p>
2158 * Request Interceptors are registered on a per-ORB basis.
2159 * <p>
2160 * To achieve virtual per-object Interceptors, query the policies on the
2161 * target from within the interception points to determine whether they
2162 * should do any work.
2163 * <p>
2164 * To achieve virtual per-POA Interceptors, instantiate each POA with a
2165 * different ORB. While Interceptors may be ordered administratively,
2166 * there is no concept of order with respect to the registration of
2167 * Interceptors. Request Interceptors are concerned with service contexts.
2168 * Service contexts have no order, so there is no purpose for request
2169 * Interceptors to have an order. IOR Interceptors are concerned with
2170 * tagged components. Tagged components also have no order, so there
2171 * is no purpose for IOR Interceptors to have an order.
2172 * <p>
2173 * Registration code should avoid using the ORB (i.e., calling
2174 * <code>ORB.init</code> with the provided <code>orb_id</code>). Since
2175 * registration occurs during ORB initialization, results of invocations
2176 * on this ORB while it is in this state are undefined.
2177 *
2178 * @see ORBInitInfo
2179 */
2180 local interface ORBInitializer {
2182 /**
2183 * Called during ORB initialization. If it is expected that initial
2184 * services registered by an interceptor will be used by other
2185 * interceptors, then those initial services shall be registered at
2186 * this point via calls to
2187 * <code>ORBInitInfo.register_initial_reference</code>.
2188 *
2189 * @param info provides initialization attributes and operations by
2190 * which Interceptors can be registered.
2191 */
2192 void pre_init (in ORBInitInfo info);
2194 /**
2195 * Called during ORB initialization. If a service must resolve initial
2196 * references as part of its initialization, it can assume that all
2197 * initial references will be available at this point.
2198 * <p>
2199 * Calling the <code>post_init</code> operations is not the final
2200 * task of ORB initialization. The final task, following the
2201 * <code>post_init</code> calls, is attaching the lists of registered
2202 * interceptors to the ORB. Therefore, the ORB does not contain the
2203 * interceptors during calls to <code>post_init</code>. If an
2204 * ORB-mediated call is made from within <code>post_init</code>, no
2205 * request interceptors will be invoked on that call.
2206 * Likewise, if an operation is performed which causes an IOR to be
2207 * created, no IOR interceptors will be invoked.
2208 *
2209 * @param info provides initialization attributes and
2210 * operations by which Interceptors can be registered.
2211 */
2212 void post_init (in ORBInitInfo info);
2213 };
2214 };