1 /* 2 * Copyright (c) 2000, 2017, 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 */ 25 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" 42 43 #pragma prefix "omg.org" 44 45 #ifndef CORBA3 46 #define local 47 #endif 48 49 module Dynamic { 50 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 }; 60 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; 67 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; 74 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; 81 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 }; 94 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; 113 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 }; 134 135 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 }; 161 162 /** Reply status, represented as an int */ 163 typedef short ReplyStatus; 164 165 // Valid reply_status values: 166 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; 177 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; 188 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; 199 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; 210 211 // Changes in ptc/00-08-06 212 // const ReplyStatus LOCATION_FORWARD_PERMANENT = 4; 213 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; 224 225 /** 226 * XXX 227 */ 228 const ReplyStatus UNKNOWN = 5; 229 230 /** Slot id, represented as an int */ 231 typedef unsigned long SlotId; 232 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 {}; 238 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 { 257 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); 275 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 }; 291 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; 317 318 /** 319 * Returns the name of the operation being invoked. 320 */ 321 readonly attribute string operation; 322 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; 342 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; 363 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; 383 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; 402 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; 423 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; 436 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; 468 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; 518 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; 525 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); 544 545 /** 546 * Returns a copy of the service context with the given ID that 547 * is associated with the request. 548 * 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); 558 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 }; 573 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 * 583 * <table class="plain"> 584 * <caption style="display:none">Shows the validity of each attribute or operation</caption> 585 * <thead> 586 * <tr> 587 * <td></td> 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 style="text-align:left"> 596 * 597 * <tr> 598 * <th id="ri" colspan=6><i>Inherited from RequestInfo:</i></th> 599 * </tr> 600 * 601 * <tr><th id="req_id">request_id</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">operation</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">arguments</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">exceptions</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">contexts</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">operation_context</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></tr> 642 * 643 * <tr><th id="result">result</th> 644 * <td headers="ri result send_req">no </td> 645 * <td headers="ri result send_poll">no </td> 646 * <td headers="ri result rec_reply">yes</td> 647 * <td headers="ri result rec_ex">no </td> 648 * <td headers="ri result rec_oth">no </td></tr> 649 * 650 * <tr><th id="res_exp">response_expected</th> 651 * <td headers="ri res_exp send_req">yes</td> 652 * <td headers="ri res_exp send_poll">yes</td> 653 * <td headers="ri res_exp rec_reply">yes</td> 654 * <td headers="ri res_exp rec_ex">yes</td> 655 * <td headers="ri res_exp rec_oth">yes</td></tr> 656 * 657 * <tr><th id="sync_sco">sync_scope</th> 658 * <td headers="ri sync_sco send_req">yes</td> 659 * <td headers="ri sync_sco send_poll">no </td> 660 * <td headers="ri sync_sco rec_reply">yes</td> 661 * <td headers="ri sync_sco rec_ex">yes</td> 662 * <td headers="ri sync_sco rec_oth">yes</td></tr> 663 * 664 * <tr><th id="rep_stat">reply_status</th> 665 * <td headers="ri rep_stat send_req">no </td> 666 * <td headers="ri rep_stat send_poll">no </td> 667 * <td headers="ri rep_stat rec_reply">yes</td> 668 * <td headers="ri rep_stat rec_ex">yes</td> 669 * <td headers="ri rep_stat rec_oth">yes</td></tr> 670 * 671 * <tr><th id="for_ref">forward_reference</th> 672 * <td headers="ri for_ref send_req">no </td> 673 * <td headers="ri for_ref send_poll">no </td> 674 * <td headers="ri for_ref rec_reply">no </td> 675 * <td headers="ri for_ref rec_ex">no </td> 676 * <td headers="ri for_ref rec_oth">yes<sub>2</sub></td></tr> 677 * 678 * <tr><th id="get_slot">get_slot</th> 679 * <td headers="ri get_slot send_req">yes</td> 680 * <td headers="ri get_slot send_poll">yes</td> 681 * <td headers="ri get_slot rec_reply">yes</td> 682 * <td headers="ri get_slot rec_ex">yes</td> 683 * <td headers="ri get_slot rec_oth">yes</td></tr> 684 * 685 * <tr><th id="grsc">get_request_service_context</th> 686 * <td headers="ri grsc send_req">yes</td> 687 * <td headers="ri grsc send_poll">no </td> 688 * <td headers="ri grsc rec_reply">yes</td> 689 * <td headers="ri grsc rec_ex">yes</td> 690 * <td headers="ri grsc rec_oth">yes</td></tr> 691 * 692 * <tr><th id="gpsc">get_reply_service_context</th> 693 * <td headers="ri gpsc send_req">no </td> 694 * <td headers="ri gpsc send_poll">no </td> 695 * <td headers="ri gpsc rec_reply">yes</td> 696 * <td headers="ri gpsc rec_ex">yes</td> 697 * <td headers="ri gpsc rec_oth">yes</td></tr> 698 * 699 * <tr> 700 * <th id="cri" colspan=6><i>ClientRequestInfo-specific:</i></th> 701 * </tr> 702 * 703 * <tr><th id="target">target</th> 704 * <td headers="cri target send_req">yes</td> 705 * <td headers="cri target send_poll">yes</td> 706 * <td headers="cri target rec_reply">yes</td> 707 * <td headers="cri target rec_ex">yes</td> 708 * <td headers="cri target rec_oth">yes</td></tr> 709 * 710 * <tr><th id="eftarget">effective_target</th> 711 * <td headers="cri eftarget send_req">yes</td> 712 * <td headers="cri eftarget send_poll">yes</td> 713 * <td headers="cri eftarget rec_reply">yes</td> 714 * <td headers="cri eftarget rec_ex">yes</td> 715 * <td headers="cri eftarget rec_oth">yes</td></tr> 716 * 717 * <tr><th id="efprof">effective_profile</th> 718 * <td headers="cri efprof send_req">yes</td> 719 * <td headers="cri efprof send_poll">yes</td> 720 * <td headers="cri efprof rec_reply">yes</td> 721 * <td headers="cri efprof rec_ex">yes</td> 722 * <td headers="cri efprof rec_oth">yes</td></tr> 723 * 724 * <tr><th id="rxp">received_exception</th> 725 * <td headers="cri rxp send_req">no </td> 726 * <td headers="cri rxp send_poll">no </td> 727 * <td headers="cri rxp rec_reply">no </td> 728 * <td headers="cri rxp rec_ex">yes</td> 729 * <td headers="cri rxp rec_oth">no </td></tr> 730 * 731 * <tr><th id="rei">received_exception_id</th> 732 * <td headers="cri rei send_req">no </td> 733 * <td headers="cri rei send_poll">no </td> 734 * <td headers="cri rei rec_reply">no </td> 735 * <td headers="cri rei rec_ex">yes</td> 736 * <td headers="cri rei rec_oth">no </td></tr> 737 * 738 * <tr><th id="gec">get_effective_component</th> 739 * <td headers="cri gec send_req">yes</td> 740 * <td headers="cri gec send_poll">no </td> 741 * <td headers="cri gec rec_reply">yes</td> 742 * <td headers="cri gec rec_ex">yes</td> 743 * <td headers="cri gec rec_oth">yes</td></tr> 744 * 745 * <tr><th id="gecs">get_effective_components</th> 746 * <td headers="cri gecs send_req">yes</td> 747 * <td headers="cri gecs send_poll">no </td> 748 * <td headers="cri gecs rec_reply">yes</td> 749 * <td headers="cri gecs rec_ex">yes</td> 750 * <td headers="cri gecs rec_oth">yes</td></tr> 751 * 752 * <tr><th id="grpcy">get_request_policy</th> 753 * <td headers="cri grpcy send_req">yes</td> 754 * <td headers="cri grpcy send_poll">no </td> 755 * <td headers="cri grpcy rec_reply">yes</td> 756 * <td headers="cri grpcy rec_ex">yes</td> 757 * <td headers="cri grpcy rec_oth">yes</td></tr> 758 * 759 * <tr><th id="arsc">add_request_service_context</th> 760 * <td headers="cri arsc send_req">yes</td> 761 * <td headers="cri arsc send_poll">no </td> 762 * <td headers="cri arsc rec_reply">no </td> 763 * <td headers="cri arsc rec_ex">no </td> 764 * <td headers="cri arsc rec_oth">no </td></tr> 765 * 766 * </tbody> 767 * </table> 768 * 769 * <ol> 770 * <li>When <code>ClientRequestInfo</code> is passed to 771 * <code>send_request</code>, there is an entry in the list for every 772 * argument, whether in, inout, or out. But only the in and inout 773 * arguments will be available.</li> 774 * <li>If the <code>reply_status</code> atribute is not 775 * <code>LOCATION_FORWARD</code>, accessing this attribute will 776 * throw <code>BAD_INV_ORDER</code> with a standard minor code of 777 * 14.</li> 778 * </ol> 779 * 780 * @see ClientRequestInterceptor 781 */ 782 local interface ClientRequestInfo : RequestInfo { 783 784 /** 785 * Returns the object which the client called to perform the 786 * operation. 787 * 788 * @see #effective_target 789 */ 790 readonly attribute Object target; 791 792 /** 793 * Returns the actual object on which the operation will be invoked. 794 * If the <code>reply_status</code> is <code>LOCATION_FORWARD</code>, 795 * then on subsequent requests, <code>effective_target</code> will 796 * contain the forwarded IOR while target will remain unchanged. 797 * 798 * @see #target 799 */ 800 readonly attribute Object effective_target; 801 802 /** 803 * Returns the profile that will be used to send the request. If a 804 * location forward has occurred for this operation's object and 805 * that object's profile changed accordingly, then this profile will 806 * be that located profile. 807 */ 808 readonly attribute IOP::TaggedProfile effective_profile; 809 810 /** 811 * Returns an any which contains the exception to be returned to 812 * the client. 813 * <p> 814 * If the exception is a user exception which cannot be inserted 815 * into an any (e.g., it is unknown or the bindings don t provide 816 * the <code>TypeCode</code>), then this attribute will be an any 817 * containing the system exception <code>UNKNOWN</code> with a 818 * standard minor code of 1. However, the repository id of 819 * the exception is available in the <code>received_exception_id</code> 820 * attribute. 821 * 822 * @see #received_exception_id 823 */ 824 readonly attribute any received_exception; 825 826 /** 827 * Returns the repository id of the exception to be returned to 828 * the client. 829 * 830 * @see #received_exception 831 * @see <a href="package-summary.html#unimpl"> 832 * <code>PortableInterceptor</code> package comments for 833 * limitations / unimplemented features</a> 834 */ 835 readonly attribute CORBA::RepositoryId received_exception_id; 836 837 /** 838 * Returns the <code>IOP.TaggedComponent</code> with the given ID from 839 * the profile selected for this request. 840 * <p> 841 * If there is more than one component for a given component ID, it 842 * is undefined which component this operation returns. If there is 843 * more than one component for a given component ID, 844 * <code>get_effective_components</code> should be called instead. 845 * 846 * @param id The component id of the component which 847 * is to be returned. 848 * @return The <code>IOP.TaggedComponent</code> obtained with the 849 * given identifier. 850 * @exception BAD_PARAM thrown, with a standard minor code of 28, if 851 * no component exists for the given component ID. 852 * @see #get_effective_components 853 */ 854 IOP::TaggedComponent get_effective_component 855 (in IOP::ComponentId id); 856 857 /** 858 * Returns an array of all tagged components with the given ID from the 859 * profile selected for this request. 860 * 861 * @param id The component id of the components which are to be returned. 862 * @return An array of <code>TaggedComponent</code> objects, each of 863 * which contains the given identifier. 864 * @exception BAD_PARAM thrown, with a standard minor code of 28, if 865 * no component exists for the given component ID. 866 * @see #get_effective_component 867 */ 868 IOP::TaggedComponentSeq get_effective_components 869 (in IOP::ComponentId id); 870 871 /** 872 * Returns the given policy in effect for this operation. 873 * 874 * @exception INV_POLICY thrown, with a standard minor code of 1, if the 875 * policy type is not valid either because the specified type is 876 * not supported by this ORB or because a policy object of that type 877 * is not associated with this Object 878 * @param type The policy type which specifies the policy to be 879 * returned. 880 * @return The <code>CORBA.Policy</code> obtained with the given type. 881 * @see <a href="package-summary.html#unimpl"> 882 * <code>PortableInterceptor</code> package comments for 883 * limitations / unimplemented features</a> 884 */ 885 CORBA::Policy get_request_policy 886 (in CORBA::PolicyType type); 887 888 /** 889 * Allows Interceptors to add service contexts to the request. 890 * <p> 891 * There is no declaration of the order of the service contexts. 892 * They may or may not appear in the order that they are added. 893 * 894 * @param service_context The <code>IOP.ServiceContext</code> to be 895 * added to the request. 896 * @param replace Indicates the behavior of this operation when a 897 * service context already exists with the given ID. If false, 898 * then <code>BAD_INV_ORDER</code> with a standard minor code of 15 899 * is thrown. If true, then the existing service context is 900 * replaced by the new one. 901 */ 902 void add_request_service_context ( 903 in IOP::ServiceContext service_context, 904 in boolean replace); 905 }; 906 907 // Should be type string 908 typedef string ServerId ; 909 910 // This should actually be the CORBA::ORBid type once that is available 911 typedef string ORBId ; 912 913 /** The name of an object adapter. This is unique only within 914 * the scope of the ORB that created the object adapter. 915 */ 916 typedef org::omg::CORBA::StringSeq AdapterName ; 917 918 /** Type of an object id. This provides the identity of a particular 919 * object that was created by an object adapter. 920 */ 921 typedef org::omg::CORBA::OctetSeq ObjectId ; 922 923 /** 924 * Request Information, accessible to server-side request interceptors. 925 * <p> 926 * Some attributes and operations on <code>ServerRequestInfo</code> are not 927 * valid at all interception points. The following table shows the validity 928 * of each attribute or operation. If it is not valid, attempting to access 929 * it will result in a <code>BAD_INV_ORDER</code> being thrown with a 930 * standard minor code of 14. 931 * 932 * 933 * <table class="plain"> 934 * <caption style="display:none">Shows the validity of each attribute or operation</caption> 935 * <thead> 936 * <tr> 937 * <td></td> 938 * <th id="rec_req_ser_con" valign="bottom">receive_request_<br>service_contexts</th> 939 * <th id="rec_req" valign="bottom">receive_request</th> 940 * <th id="send_rep" valign="bottom">send_reply</th> 941 * <th id="send_exc" valign="bottom">send_exception</th> 942 * <th id="send_oth" valign="bottom">send_other</th> 943 * </tr> 944 * </thead> 945 * <tbody style="text-align:left"> 946 * 947 * 948 * <tr> 949 * <th id="ri" colspan=6><i>Inherited from RequestInfo:</i></th> 950 * </tr> 951 * 952 * <tr><th id="req_id">request_id</th> 953 * <td headers="ri req_id rec_req_ser_con">yes</td> 954 * <td headers="ri req_id rec_req">yes</td> 955 * <td headers="ri req_id send_rep">yes</td> 956 * <td headers="ri req_id send_exc">yes</td> 957 * <td headers="ri req_id send_oth">yes</td></tr> 958 * 959 * <tr><th id="op">operation</th> 960 * <td headers="ri op rec_req_ser_con">yes</td> 961 * <td headers="ri op rec_req">yes</td> 962 * <td headers="ri op send_rep">yes</td> 963 * <td headers="ri op send_exc">yes</td> 964 * <td headers="ri op send_oth">yes</td></tr> 965 * 966 * <tr><th id="args">arguments</th> 967 * <td headers="ri args rec_req_ser_con">no </td> 968 * <td headers="ri args rec_req">yes<sub>1</sub></td> 969 * <td headers="ri args send_rep">yes</td> 970 * <td headers="ri args send_exc">no<sub>2</sub></td> 971 * <td headers="ri args send_oth">no<sub>2</sub> 972 * </td></tr> 973 * 974 * <tr><th id="exps">exceptions</th> 975 * <td headers="ri exps rec_req_ser_con">no </td> 976 * <td headers="ri exps rec_req">yes</td> 977 * <td headers="ri exps send_rep">yes</td> 978 * <td headers="ri exps send_exc">yes</td> 979 * <td headers="ri exps send_oth">yes</td></tr> 980 * 981 * <tr><th id="contexts">contexts</th> 982 * <td headers="ri contexts rec_req_ser_con">no </td> 983 * <td headers="ri contexts rec_req">yes</td> 984 * <td headers="ri contexts send_rep">yes</td> 985 * <td headers="ri contexts send_exc">yes</td> 986 * <td headers="ri contexts send_oth">yes</td></tr> 987 * 988 * <tr><th id="op_con">operation_context</th> 989 * <td headers="ri op_con rec_req_ser_con">no </td> 990 * <td headers="ri op_con rec_req">yes</td> 991 * <td headers="ri op_con send_rep">yes</td> 992 * <td headers="ri op_con send_exc">no </td> 993 * <td headers="ri op_con send_oth">no </td> 994 * </tr> 995 * 996 * <tr><th id="result">result</th> 997 * <td headers="ri result rec_req_ser_con">no </td> 998 * <td headers="ri result rec_req">no </td> 999 * <td headers="ri result send_rep">yes</td> 1000 * <td headers="ri result send_exc">no </td> 1001 * <td headers="ri result send_oth">no </td> 1002 * </tr> 1003 * 1004 * <tr><th id="res_ex">response_expected</th> 1005 * <td headers="ri res_ex rec_req_ser_con">yes</td> 1006 * <td headers="ri res_ex rec_req">yes</td> 1007 * <td headers="ri res_ex send_rep">yes</td> 1008 * <td headers="ri res_ex send_exc">yes</td> 1009 * <td headers="ri res_ex send_oth">yes</td></tr> 1010 * 1011 * <tr><th id="syn_scp">sync_scope</th> 1012 * <td headers="ri syn_scp rec_req_ser_con">yes</td> 1013 * <td headers="ri syn_scp rec_req">yes</td> 1014 * <td headers="ri syn_scp send_rep">yes</td> 1015 * <td headers="ri syn_scp send_exc">yes</td> 1016 * <td headers="ri syn_scp send_oth">yes</td></tr> 1017 * 1018 * <tr><th id="rep_status">reply_status</th> 1019 * <td headers="ri rep_status rec_req_ser_con">no </td> 1020 * <td headers="ri rep_status rec_req">no </td> 1021 * <td headers="ri rep_status send_rep">yes</td> 1022 * <td headers="ri rep_status send_exc">yes</td> 1023 * <td headers="ri rep_status send_oth">yes</td></tr> 1024 * 1025 * <tr><th id="fwd_ref">forward_reference</th> 1026 * <td headers="ri fwd_ref rec_req_ser_con">no </td> 1027 * <td headers="ri fwd_ref rec_req">no </td> 1028 * <td headers="ri fwd_ref send_rep">no </td> 1029 * <td headers="ri fwd_ref send_exc">no </td> 1030 * <td headers="ri fwd_ref send_oth">yes<sub>2</sub></td></tr> 1031 * 1032 * <tr><th id="get_slt">get_slot</th> 1033 * <td headers="ri get_slt rec_req_ser_con">yes</td> 1034 * <td headers="ri get_slt rec_req">yes</td> 1035 * <td headers="ri get_slt send_rep">yes</td> 1036 * <td headers="ri get_slt send_exc">yes</td> 1037 * <td headers="ri get_slt send_oth">yes</td></tr> 1038 * 1039 * <tr><th id="get_req_sc">get_request_service_context</th> 1040 * <td headers="ri get_req_sc rec_req_ser_con">yes</td> 1041 * <td headers="ri get_req_sc rec_req">no </td> 1042 * <td headers="ri get_req_sc send_rep">yes</td> 1043 * <td headers="ri get_req_sc send_exc">yes</td> 1044 * <td headers="ri get_req_sc send_oth">yes</td></tr> 1045 * 1046 * <tr><th id="get_rep_sc">get_reply_service_context</th> 1047 * <td headers="ri get_rep_sc rec_req_ser_con">no </td> 1048 * <td headers="ri get_rep_sc rec_req">no </td> 1049 * <td headers="ri get_rep_sc send_rep">yes</td> 1050 * <td headers="ri get_rep_sc send_exc">yes</td> 1051 * <td headers="ri get_rep_sc send_oth">yes</td></tr> 1052 * 1053 * <tr> 1054 * <th id="sri" colspan=6><i>ServerRequestInfo-specific:</i></th> 1055 * </tr> 1056 * 1057 * <tr><th id="sndg_exc">sending_exception</th> 1058 * <td headers="sri sndg_exc rec_req_ser_con">no </td> 1059 * <td headers="sri sndg_exc rec_req">no </td> 1060 * <td headers="sri sndg_exc send_rep">no </td> 1061 * <td headers="sri sndg_exc send_exc">yes</td> 1062 * <td headers="sri sndg_exc send_oth">no </td></tr> 1063 * 1064 * <tr><th id="obj_id">object_id</th> 1065 * <td headers="sri obj_id rec_req_ser_con">no </td> 1066 * <td headers="sri obj_id rec_req">yes</td> 1067 * <td headers="sri obj_id send_rep">yes</td> 1068 * <td headers="sri obj_id send_exc">yes<sub>3</sub></td> 1069 * <td headers="sri obj_id send_oth">yes<sub>3</sub></td></tr> 1070 * 1071 * <tr><th id="ada_id">adapter_id</th> 1072 * <td headers="sri ada_id rec_req_ser_con">no </td> 1073 * <td headers="sri ada_id rec_req">yes</td> 1074 * <td headers="sri ada_id send_rep">yes</td> 1075 * <td headers="sri ada_id send_exc">yes<sub>3</sub></td> 1076 * <td headers="sri ada_id send_oth">yes<sub>3</sub></td></tr> 1077 * 1078 * <tr><th id="srv_id">server_id</th> 1079 * <td headers="sri srv_id rec_req_ser_con">no </td> 1080 * <td headers="sri srv_id rec_req">yes</td> 1081 * <td headers="sri srv_id send_rep">yes</td> 1082 * <td headers="sri srv_id send_exc">yes</td> 1083 * <td headers="sri srv_id send_oth">yes</td></tr> 1084 * 1085 * <tr><th id="orb_id">orb_id</th> 1086 * <td headers="sri orb_id rec_req_ser_con">no </td> 1087 * <td headers="sri orb_id rec_req">yes</td> 1088 * <td headers="sri orb_id send_rep">yes</td> 1089 * <td headers="sri orb_id send_exc">yes</td> 1090 * <td headers="sri orb_id send_oth">yes</td></tr> 1091 * 1092 * <tr><th id="ada_nam">adapter_name</th> 1093 * <td headers="sri ada_nam rec_req_ser_con">no </td> 1094 * <td headers="sri ada_nam rec_req">yes</td> 1095 * <td headers="sri ada_nam send_rep">yes</td> 1096 * <td headers="sri ada_nam send_exc">yes</td> 1097 * <td headers="sri ada_nam send_oth">yes</td></tr> 1098 * 1099 * <tr><th id="tmdi">target_most_derived_interface</th> 1100 * <td headers="sri tmdi rec_req_ser_con">no </td> 1101 * <td headers="sri tmdi rec_req">yes</td> 1102 * <td headers="sri tmdi send_rep">no<sub>4</sub></td> 1103 * <td headers="sri tmdi send_exc">no<sub>4</sub></td> 1104 * <td headers="sri tmdi send_oth">no<sub>4</sub></td></tr> 1105 * 1106 * <tr><th id="gsp">get_server_policy</th> 1107 * <td headers="sri gsp rec_req_ser_con">yes</td> 1108 * <td headers="sri gsp rec_req">yes</td> 1109 * <td headers="sri gsp send_rep">yes</td> 1110 * <td headers="sri gsp send_exc">yes</td> 1111 * <td headers="sri gsp send_oth">yes</td></tr> 1112 * 1113 * <tr><th id="set_slt">set_slot</th> 1114 * <td headers="sri set_slt rec_req_ser_con">yes</td> 1115 * <td headers="sri set_slt rec_req">yes</td> 1116 * <td headers="sri set_slt send_rep">yes</td> 1117 * <td headers="sri set_slt send_exc">yes</td> 1118 * <td headers="sri set_slt send_oth">yes</td></tr> 1119 * 1120 * <tr><th id="tar_isa">target_is_a</th> 1121 * <td headers="sri tar_isa rec_req_ser_con">no </td> 1122 * <td headers="sri tar_isa rec_req">yes</td> 1123 * <td headers="sri tar_isa send_rep">no<sub>4</sub></td> 1124 * <td headers="sri tar_isa send_exc">no<sub>4</sub></td> 1125 * <td headers="sri tar_isa send_oth">no<sub>4</sub></td></tr> 1126 * 1127 * <tr><th id="add_rep_sc">add_reply_service_context</th> 1128 * <td headers="sri add_rep_sc rec_req_ser_con">yes</td> 1129 * <td headers="sri add_rep_sc rec_req">yes</td> 1130 * <td headers="sri add_rep_sc send_rep">yes</td> 1131 * <td headers="sri add_rep_sc send_exc">yes</td> 1132 * <td headers="sri add_rep_sc send_oth">yes</td></tr> 1133 * </tbody> 1134 * </table> 1135 * 1136 * <ol> 1137 * <li>When <code>ServerRequestInfo</code> is passed to 1138 * <code>receive_request</code>, there is an entry in the list for 1139 * every argument, whether in, inout, or out. But only the in and 1140 * inout arguments will be available.</li> 1141 * <li>If the <code>reply_status</code> attribute is not 1142 * <code>LOCATION_FORWARD</code>, accessing this attribute will throw 1143 * <code>BAD_INV_ORDER</code> with a standard minor code of 14.</li> 1144 * <li>If the servant locator caused a location forward, or thrown an 1145 * exception, this attribute/operation may not be available in this 1146 * interception point. <code>NO_RESOURCES</code> with a standard minor 1147 * code of 1 will be thrown if it is not available.</li> 1148 * <li>The operation is not available in this interception point because 1149 * the necessary information requires access to the target object's 1150 * servant, which may no longer be available to the ORB. For example, 1151 * if the object's adapter is a POA that uses a 1152 * <code>ServantLocator</code>, then the ORB invokes the interception 1153 * point after it calls <code>ServantLocator.postinvoke()</code>.</li> 1154 * </ol> 1155 * 1156 * @see ServerRequestInterceptor 1157 */ 1158 local interface ServerRequestInfo : RequestInfo { 1159 1160 /** 1161 * Returns an any which contains the exception to be returned to 1162 * the client. 1163 * <p> 1164 * If the exception is a user exception which cannot be inserted into 1165 * an any (e.g., it is unknown or the bindings don't provide the 1166 * <code>TypeCode</code>), then this attribute will be an any 1167 * containing the system exception <code>UNKNOWN</code> with a 1168 * standard minor code of 1. 1169 * 1170 * @see <a href="package-summary.html#unimpl"> 1171 * <code>PortableInterceptor</code> package comments for 1172 * limitations / unimplemented features</a> 1173 */ 1174 readonly attribute any sending_exception; 1175 1176 /** 1177 * Returns the opaque <code>object_id</code> describing the target of 1178 * the operation invocation. 1179 */ 1180 readonly attribute ObjectId object_id; 1181 1182 /** 1183 * Returns the opaque identifier for the object adapter. 1184 */ 1185 readonly attribute CORBA::OctetSeq adapter_id; 1186 1187 /** 1188 * Returns the server ID that was specified on ORB::init using the -ORBServerId 1189 * argument. 1190 */ 1191 readonly attribute ServerId server_id ; 1192 1193 /** 1194 * Returns the ID that was used to create the ORB. 1195 */ 1196 readonly attribute ORBId orb_id ; 1197 1198 /** 1199 * Returns the sequence of strings that identifies the object 1200 * adapter instance that is handling this request. 1201 */ 1202 readonly attribute AdapterName adapter_name ; 1203 1204 /** 1205 * Returns the repository id for the most derived interface of the 1206 * servant. 1207 */ 1208 readonly attribute CORBA::RepositoryId 1209 target_most_derived_interface; 1210 1211 /** 1212 * Returns the policy in effect for this operation for the given 1213 * policy type. The returned <code>CORBA.Policy</code> object shall 1214 * only be a policy whose type was registered via 1215 * <code>register_policy_factory</code>. 1216 * 1217 * @param type The <code>CORBA.PolicyType</code> which specifies the 1218 * policy to be returned. 1219 * @return The <code>CORBA.Policy</code> obtained with the given 1220 * policy type. 1221 * @exception INV_POLICY thrown, with a standard minor code of 2, if 1222 * a policy for the given type was not registered via 1223 * <code>register_policy_factory</code>. 1224 * @see ORBInitInfo#register_policy_factory 1225 */ 1226 CORBA::Policy get_server_policy 1227 (in CORBA::PolicyType type); 1228 1229 /** 1230 * Allows an Interceptor to set a slot in the 1231 * <code>PortableInterceptor.Current</code> that is in the scope of 1232 * the request. If data already exists in that slot, it will be 1233 * overwritten. 1234 * 1235 * @param id The id of the slot. 1236 * @param data The data, in the form of an any, to store in that slot. 1237 * @exception InvalidSlot thrown if the ID does not define an allocated 1238 * slot. 1239 * @see Current 1240 */ 1241 void set_slot (in SlotId id, in any data) raises (InvalidSlot); 1242 1243 /** 1244 * Returns true if the servant is the given repository id, 1245 * false if it is not. 1246 * 1247 * @param id The caller wants to know if the servant is this 1248 * repository id. 1249 * @return Is the servant the given RepositoryId? 1250 */ 1251 boolean target_is_a (in CORBA::RepositoryId id); 1252 1253 /** 1254 * Allows Interceptors to add service contexts to the request. 1255 * <p> 1256 * There is no declaration of the order of the service contexts. 1257 * They may or may not appear in the order that they are added. 1258 * 1259 * @param service_context The <code>IOP.ServiceContext</code> to add to 1260 * the reply. 1261 * @param replace Indicates the behavior of this operation when a 1262 * service context already exists with the given ID. If false, 1263 * then <code>BAD_INV_ORDER</code> with a standard minor code of 15 1264 * is thrown. If true, then the existing service context is 1265 * replaced by the new one. 1266 * @exception BAD_INV_ORDER thrown, with a standard minor code of 15, if 1267 * replace is false and a service context already exists with the 1268 * given ID. 1269 */ 1270 void add_reply_service_context ( 1271 in IOP::ServiceContext service_context, 1272 in boolean replace); 1273 }; 1274 1275 /** 1276 * Client-side request interceptor. 1277 * <p> 1278 * A request Interceptor is designed to intercept the flow of a 1279 * request/reply sequence through the ORB at specific points so that 1280 * services can query the request information and manipulate the service 1281 * contexts which are propagated between clients and servers. The primary 1282 * use of request Interceptors is to enable ORB services to transfer 1283 * context information between clients and servers. There are two types 1284 * of request Interceptors: client-side and server-side. 1285 * <p> 1286 * To write a client-side Interceptor, implement the 1287 * <code>ClientRequestInterceptor</code> interface. 1288 * 1289 * @see ClientRequestInfo 1290 */ 1291 local interface ClientRequestInterceptor : Interceptor { 1292 /** 1293 * Allows an Interceptor to query request information and modify the 1294 * service context before the request is sent to the server. 1295 * <p> 1296 * This interception point may throw a system exception. If it does, 1297 * no other Interceptors' <code>send_request</code> operations are called. 1298 * Those Interceptors on the Flow Stack are popped and their 1299 * <code>receive_exception</code> interception points are called. This 1300 * interception point may also throw a <code>ForwardRequest</code> 1301 * exception. If an Interceptor throws this exception, no other 1302 * Interceptors' <code>send_request</code> operations are 1303 * called. Those Interceptors on the Flow Stack are popped and their 1304 * <code>receive_other</code> interception points are called. 1305 * <p> 1306 * Compliant Interceptors shall properly follow completion_status 1307 * semantics if they throw a system exception from this interception 1308 * point. The <code>completion_status</code> shall be 1309 * <code>COMPLETED_NO</code>. 1310 * 1311 * @param ri Information about the current request being intercepted. 1312 * @exception ForwardRequest If thrown, indicates to the ORB that a 1313 * retry of the request should occur with the new object given in 1314 * the exception. 1315 */ 1316 void send_request (in ClientRequestInfo ri) raises (ForwardRequest); 1317 1318 /** 1319 * Allows an Interceptor to query information during a Time-Independent 1320 * Invocation (TII) polling get reply sequence. 1321 * <p> 1322 * With TII, an application may poll for a response to a request sent 1323 * previously by the polling client or some other client. This poll is 1324 * reported to Interceptors through the <code>send_poll</code> 1325 * interception point and the response is returned through the 1326 * <code>receive_reply</code> or <code>receive_exception</code> 1327 * interception points. If the response is not available before the 1328 * poll time-out expires, the system exception <code>TIMEOUT</code> is 1329 * thrown and <code>receive_exception</code> is called with this 1330 * exception. 1331 * <p> 1332 * This interception point may throw a system exception. If it does, 1333 * no other Interceptors' <code>send_poll</code> operations are 1334 * called. Those Interceptors on the Flow Stack are popped and their 1335 * <code>receive_exception</code> interception points are called. 1336 * <p> 1337 * Compliant Interceptors shall properly follow 1338 * <code>completion_status</code> semantics if they throw a system 1339 * exception from this interception point. The completion_status shall be 1340 * <code>COMPLETED_NO</code>. 1341 * 1342 * @param ri Information about the current request being intercepted. 1343 * @exception TIMEOUT thrown if the response is not available before 1344 * the poll time-out expires 1345 */ 1346 void send_poll (in ClientRequestInfo ri); 1347 1348 /** 1349 * Allows an Interceptor to query the information on a reply after it 1350 * is returned from the server and before control is returned to the 1351 * client. 1352 * <p> 1353 * This interception point may throw a system exception. If it does, 1354 * no other Interceptors' <code>receive_reply</code> operations are 1355 * called. The remaining Interceptors in the Flow Stack shall have 1356 * their <code>receive_exception</code> interception point called. 1357 * <p> 1358 * Compliant Interceptors shall properly follow 1359 * <code>completion_status</code> semantics if they throw a system 1360 * exception from this interception point. The 1361 * <code>completion_status</code> shall be <code>COMPLETED_YES</code>. 1362 * 1363 * @param ri Information about the current request being intercepted. 1364 */ 1365 void receive_reply (in ClientRequestInfo ri); 1366 1367 /** 1368 * Indicates to the interceptor that an exception occurred. Allows 1369 * an Interceptor to query the exception's information before it is 1370 * thrown to the client. 1371 * <p> 1372 * This interception point may throw a system exception. This has the 1373 * effect of changing the exception which successive Interceptors 1374 * popped from the Flow Stack receive on their calls to 1375 * <code>receive_exception</code>. The exception thrown to the client 1376 * will be the last exception thrown by an Interceptor, or the original 1377 * exception if no Interceptor changes the exception. 1378 * <p> 1379 * This interception point may also throw a <code>ForwardRequest</code> 1380 * exception. If an Interceptor throws this exception, no other 1381 * Interceptors' <code>receive_exception</code> operations are called. 1382 * The remaining Interceptors in the Flow Stack are popped and have their 1383 * <code>receive_other</code> interception point called. 1384 * <p> 1385 * If the <code>completion_status</code> of the exception is not 1386 * <code>COMPLETED_NO</code>, then it is inappropriate for this 1387 * interception point to throw a <code>ForwardRequest</code> exception. 1388 * The request s at-most-once semantics would be lost. 1389 * <p> 1390 * Compliant Interceptors shall properly follow 1391 * <code>completion_status</code> semantics if they throw a system 1392 * exception from this interception point. If the original exception is 1393 * a system exception, the <code>completion_status</code> of the new 1394 * exception shall be the same as on the original. If the original 1395 * exception is a user exception, then the <code>completion_status</code> 1396 * of the new exception shall be <code>COMPLETED_YES</code>. 1397 * <p> 1398 * Under some conditions, depending on what policies are in effect, an 1399 * exception (such as <code>COMM_FAILURE</code>) may result in a retry 1400 * of the request. While this retry is a new request with respect to 1401 * Interceptors, there is one point of correlation between the original 1402 * request and the retry: because control has not returned to the 1403 * client, the <code>PortableInterceptor.Current</code> for both the 1404 * original request and the retrying request is the same. 1405 * 1406 * @param ri Information about the current request being intercepted. 1407 * @exception ForwardRequest If thrown, indicates to the ORB that a 1408 * retry of the request should occur with the new object given in 1409 * the exception. 1410 */ 1411 void receive_exception (in ClientRequestInfo ri) raises (ForwardRequest); 1412 1413 /** 1414 * Allows an Interceptor to query the information available when a 1415 * request results in something other than a normal reply or an 1416 * exception. For example, a request could result in a retry 1417 * (e.g., a GIOP Reply with a <code>LOCATION_FORWARD</code> status was 1418 * received); or on asynchronous calls, the reply does not immediately 1419 * follow the request, but control shall return to the client and an 1420 * ending interception point shall be called. 1421 * <p> 1422 * For retries, depending on the policies in effect, a new request may or 1423 * may not follow when a retry has been indicated. If a new request does 1424 * follow, while this request is a new request, with respect to 1425 * Interceptors, there is one point of correlation between the original 1426 * request and the retry: because control has not returned to the client, 1427 * the request scoped <code>PortableInterceptor.Current</code> for both 1428 * the original request and the retrying request is the same. 1429 * <p> 1430 * This interception point may throw a system exception. If it does, no 1431 * other Interceptors' <code>receive_other</code> operations are called. 1432 * The remaining Interceptors in the Flow Stack are popped and have 1433 * their <code>receive_exception</code> interception point called. 1434 * <p> 1435 * This interception point may also throw a <code>ForwardRequest</code> 1436 * exception. If an Interceptor throws this exception, successive 1437 * Interceptors' <code>receive_other</code> operations are called with 1438 * the new information provided by the <code>ForwardRequest</code> 1439 * exception. 1440 * <p> 1441 * Compliant Interceptors shall properly follow 1442 * <code>completion_status</code> semantics if they throw a system 1443 * exception from this interception point. The 1444 * <code>completion_status</code> shall be <code>COMPLETED_NO</code>. 1445 * If the target invocation had completed, this interception point 1446 * would not be called. 1447 * 1448 * @param ri Information about the current request being intercepted. 1449 * @exception ForwardRequest If thrown, indicates to the ORB that a 1450 * retry of the request should occur with the new object given in 1451 * the exception. 1452 */ 1453 void receive_other (in ClientRequestInfo ri) raises (ForwardRequest); 1454 }; 1455 1456 /** 1457 * Server-side request interceptor. 1458 * <p> 1459 * A request Interceptor is designed to intercept the flow of a 1460 * request/reply sequence through the ORB at specific points so that 1461 * services can query the request information and manipulate the service 1462 * contexts which are propagated between clients and servers. The primary 1463 * use of request Interceptors is to enable ORB services to transfer 1464 * context information between clients and servers. There are two types 1465 * of request Interceptors: client-side and server-side. 1466 * <p> 1467 * To write a server-side Interceptor, implement the 1468 * ServerRequestInterceptor interface. 1469 * 1470 * @see ServerRequestInfo 1471 */ 1472 local interface ServerRequestInterceptor : Interceptor { 1473 /** 1474 * Allows the interceptor to process service context information. 1475 * <p> 1476 * At this interception point, Interceptors must get their service 1477 * context information from the incoming request transfer it to 1478 * <code>PortableInterceptor.Current</code>'s slots. 1479 * <p> 1480 * This interception point is called before the servant manager is called. 1481 * Operation parameters are not yet available at this point. This 1482 * interception point may or may not execute in the same thread as 1483 * the target invocation. 1484 * <p> 1485 * This interception point may throw a system exception. If it does, 1486 * no other Interceptors' <code>receive_request_service_contexts</code> 1487 * operations are called. Those Interceptors on the Flow Stack are 1488 * popped and their <code>send_exception</code> interception points are 1489 * called. 1490 * <p> 1491 * This interception point may also throw a <code>ForwardRequest</code> 1492 * exception. If an Interceptor throws this exception, no other 1493 * Interceptors' <code>receive_request_service_contexts</code> operations 1494 * are called. Those Interceptors on the Flow Stack are popped and 1495 * their <code>send_other</code> interception points are called. 1496 * <p> 1497 * Compliant Interceptors shall properly follow 1498 * <code>completion_status</code> semantics if they throw a system 1499 * exception from this interception point. The 1500 * <code>completion_status</code> shall be COMPLETED_NO. 1501 * 1502 * @param ri Information about the current request being intercepted. 1503 * @exception ForwardRequest If thrown, indicates to the ORB that a 1504 * retry of the request should occur with the new object given in 1505 * the exception. 1506 */ 1507 void receive_request_service_contexts (in ServerRequestInfo ri) 1508 raises (ForwardRequest); 1509 1510 /** 1511 * Allows an Interceptor to query request information after all the 1512 * information, including operation parameters, are available. This 1513 * interception point shall execute in the same thread as the target 1514 * invocation. 1515 * <p> 1516 * In the DSI model, since the parameters are first available when 1517 * the user code calls <code>arguments</code>, <code>receive_request</code> 1518 * is called from within <code>arguments</code>. It is possible that 1519 * <code>arguments</code> is not called in the DSI model. The target 1520 * may call <code>set_exception</code> before calling 1521 * <code>arguments</code>. The ORB shall guarantee that 1522 * <code>receive_request</code> is called once, either through 1523 * <code>arguments</code> or through <code>set_exception</code>. If it 1524 * is called through <code>set_exception</code>, requesting the 1525 * arguments will result in <code>NO_RESOURCES</code> being thrown with 1526 * a standard minor code of 1. 1527 * <p> 1528 * This interception point may throw a system exception. If it does, no 1529 * other Interceptors' <code>receive_request</code> operations are 1530 * called. Those Interceptors on the Flow Stack are popped and their 1531 * <code>send_exception</code> interception points are called. 1532 * <p> 1533 * This interception point may also throw a <code>ForwardRequest</code> 1534 * exception. If an Interceptor throws this exception, no other 1535 * Interceptors' <code>receive_request</code> operations are called. 1536 * Those Interceptors on the Flow Stack are popped and their 1537 * <code>send_other</code> interception points are called. 1538 * <p> 1539 * Compliant Interceptors shall properly follow 1540 * <code>completion_status</code> semantics if they throw a system 1541 * exception from this interception point. The 1542 * <code>completion_status</code> shall be <code>COMPLETED_NO</code>. 1543 * 1544 * @param ri Information about the current request being intercepted. 1545 * @exception ForwardRequest If thrown, indicates to the ORB that a 1546 * retry of the request should occur with the new object given in 1547 * the exception. 1548 */ 1549 void receive_request (in ServerRequestInfo ri) raises (ForwardRequest); 1550 1551 /** 1552 * Allows an Interceptor to query reply information and modify the 1553 * reply service context after the target operation has been invoked 1554 * and before the reply is returned to the client. This interception 1555 * point shall execute in the same thread as the target invocation. 1556 * <p> 1557 * This interception point may throw a system exception. If it does, 1558 * no other Interceptors' <code>send_reply</code> operations are called. 1559 * The remaining Interceptors in the Flow Stack shall have their 1560 * <code>send_exception</code> interception point called. 1561 * <p> 1562 * Compliant Interceptors shall properly follow 1563 * <code>completion_status</code> semantics if they throw a 1564 * system exception from this interception point. The 1565 * <code>completion_status</code> shall be <code>COMPLETED_YES</code>. 1566 * 1567 * @param ri Information about the current request being intercepted. 1568 */ 1569 void send_reply (in ServerRequestInfo ri); 1570 1571 /** 1572 * Allows an Interceptor to query the exception information and modify 1573 * the reply service context before the exception is thrown to the client. 1574 * When an exception occurs, this interception point is called. This 1575 * interception point shall execute in the same thread as the target 1576 * invocation. 1577 * <p> 1578 * This interception point may throw a system exception. This has the 1579 * effect of changing the exception which successive Interceptors 1580 * popped from the Flow Stack receive on their calls to 1581 * <code>send_exception</code>. The exception thrown to the client will 1582 * be the last exception thrown by an Interceptor, or the original 1583 * exception if no Interceptor changes the exception. 1584 * <p> 1585 * This interception point may also throw a <code>ForwardRequest</code> 1586 * exception. If an Interceptor throws this exception, no other 1587 * Interceptors' <code>send_exception</code> operations are called. The 1588 * remaining Interceptors in the Flow Stack shall have their 1589 * <code>send_other</code> interception points called. 1590 * <p> 1591 * If the <code>completion_status</code> of the exception is not 1592 * <code>COMPLETED_NO</code>, then it is inappropriate for this 1593 * interception point to throw a <code>ForwardRequest</code> exception. 1594 * The request's at-most-once semantics would be lost. 1595 * <p> 1596 * Compliant Interceptors shall properly follow 1597 * <code>completion_status</code> semantics if they throw a system 1598 * exception from this interception point. If the original exception 1599 * is a system exception, the <code>completion_status</code> of the new 1600 * exception shall be the same as on the original. If the original 1601 * exception is a user exception, then the <code>completion_status</code> 1602 * of the new exception shall be <code>COMPLETED_YES</code>. 1603 * 1604 * @param ri Information about the current request being intercepted. 1605 * @exception ForwardRequest If thrown, indicates to the ORB that a 1606 * retry of the request should occur with the new object given in 1607 * the exception. 1608 */ 1609 void send_exception (in ServerRequestInfo ri) raises (ForwardRequest); 1610 1611 /** 1612 * Allows an Interceptor to query the information available when a 1613 * request results in something other than a normal reply or an 1614 * exception. For example, a request could result in a retry 1615 * (e.g., a GIOP Reply with a <code>LOCATION_FORWARD</code> status was 1616 * received). This interception point shall execute in the same thread 1617 * as the target invocation. 1618 * <p> 1619 * This interception point may throw a system exception. If it does, 1620 * no other Interceptors' <code>send_other</code> operations are called. 1621 * The remaining Interceptors in the Flow Stack shall have their 1622 * <code>send_exception</code> interception points called. 1623 * <p> 1624 * This interception point may also throw a <code>ForwardRequest</code> 1625 * exception. If an Interceptor throws this exception, successive 1626 * Interceptors' <code>send_other</code> operations are called with 1627 * the new information provided by the <code>ForwardRequest</code> 1628 * exception. 1629 * <p> 1630 * Compliant Interceptors shall properly follow 1631 * <code>completion_status</code> semantics if they throw a system 1632 * exception from this interception point. The 1633 * <code>completion_status</code> shall be <code>COMPLETED_NO</code>. 1634 * 1635 * @param ri Information about the current request being intercepted. 1636 * @exception ForwardRequest If thrown, indicates to the ORB that a 1637 * retry of the request should occur with the new object given in 1638 * the exception. 1639 */ 1640 void send_other (in ServerRequestInfo ri) raises (ForwardRequest); 1641 }; 1642 1643 /** The object reference factory. This provides the capability of 1644 * creating an object reference. 1645 */ 1646 abstract valuetype ObjectReferenceFactory { 1647 /** make_object creates a CORBA object reference according 1648 * to the data in this template, with the given repository ID and 1649 * object ID. 1650 */ 1651 Object make_object( in string repositoryId, in ObjectId object_id ) ; 1652 } ; 1653 1654 /** The object reference template. An instance of this must 1655 * exist for each object adapter created in an ORB. The server_id, 1656 * orb_id, and adapter_name attributes uniquely identify this template 1657 * within the scope of an IMR. Note that adapter_id is similarly unique 1658 * within the same scope, but it is opaque, and less useful in many 1659 * cases. 1660 */ 1661 abstract valuetype ObjectReferenceTemplate : ObjectReferenceFactory { 1662 1663 readonly attribute ServerId server_id ; 1664 1665 readonly attribute ORBId orb_id ; 1666 1667 readonly attribute AdapterName adapter_name ; 1668 } ; 1669 1670 /** Sequence of object reference templates is used for reporting state 1671 * changes that do not occur on the adapter manager. 1672 */ 1673 typedef sequence<ObjectReferenceTemplate> ObjectReferenceTemplateSeq ; 1674 1675 /** Adapter manager identifier. Every object adapter has an adapter manager, 1676 * indicated in this API only through the ID. A group of object adapter 1677 * instances may share the same adapter manager, in which case state transitions 1678 * reported for the adapter manager are observed by all object adapters with the 1679 * same adapter manager ID. 1680 */ 1681 typedef long AdapterManagerId ; 1682 1683 /** Type of object adapter state. State changes are reported either to 1684 * the object adapter or to the adapter manager. 1685 */ 1686 typedef short AdapterState ; 1687 1688 /** Object adapter state that holds requests temporarily until the 1689 * state is changed. 1690 */ 1691 const AdapterState HOLDING = 0 ; 1692 1693 /** Object adapter state that indicates normal request processing. 1694 */ 1695 const AdapterState ACTIVE = 1 ; 1696 1697 /** Object adapter state that causes all requests to be discarded. 1698 */ 1699 const AdapterState DISCARDING = 2 ; 1700 1701 /** Object adapter state that causes all requests to be discarded. 1702 * This state indicates that the adapter is shutting down. 1703 */ 1704 const AdapterState INACTIVE = 3 ; 1705 1706 /** Object adapter state indicating that the adapter has been destroyed. 1707 */ 1708 const AdapterState NON_EXISTENT = 4 ; 1709 1710 /** 1711 * Provides the server-side ORB service with access to the applicable 1712 * policies during IOR construction and the ability to add components. 1713 * The ORB passes an instance of its implementation of this interface as 1714 * a parameter to <code>IORInterceptor.establish_components</code>. 1715 * 1716 * @see IORInterceptor 1717 */ 1718 local interface IORInfo { 1719 1720 /** 1721 * Allows an ORB service implementation to determine what server side 1722 * policy of a particular type is in effect for an IOR being 1723 * constructed. When the IOR being constructed is for an object 1724 * implemented using a POA, all Policy objects passed to the 1725 * <code>PortableServer.POA.create_POA</code> call that created that 1726 * POA are accessable via <code>get_effective_policy</code>. 1727 * <p> 1728 * If a policy for the given type is not known to the ORB, then this 1729 * operation will throw <code>INV_POLICY</code> with a standard minor 1730 * code of 2. 1731 * 1732 * @param type an int specifying the type of policy to return. 1733 * @return The effective <code>CORBA.Policy</code> object of the 1734 * requested type. If the given policy type is known, but no policy 1735 * of that type is in effect, then this operation will return a 1736 * nil object reference. 1737 */ 1738 CORBA::Policy get_effective_policy 1739 (in CORBA::PolicyType type); 1740 1741 /** 1742 * A portable ORB service implementation calls 1743 * <code>add_ior_component</code> from its implementation of 1744 * <code>establish_components</code> to add a tagged component to the 1745 * set which will be included when constructing IORs. The components in 1746 * this set will be included in all profiles. 1747 * <p> 1748 * Any number of components may exist with the same component ID. 1749 * 1750 * @param tagged_component The IOP.TaggedComponent to add. 1751 */ 1752 void add_ior_component 1753 (in IOP::TaggedComponent tagged_component); 1754 1755 /** 1756 * A portable ORB service implementation calls 1757 * <code>add_ior_component_to_profile</code> from its implementation of 1758 * <code>establish_components</code> to add a tagged component to the 1759 * set which will be included when constructing IORs. The components in 1760 * this set will be included in the specified profile. 1761 * <p> 1762 * Any number of components may exist with the same component ID. 1763 * 1764 * @param tagged_component The <code>IOP.TaggedComponent</code> to add. 1765 * @param profile_id The profile id of the profile to 1766 * which this component will be added. 1767 * @exception BAD_PARAM thrown, with a standard minor code of 29, if the 1768 * given profile ID does not define a known profile or it is 1769 * impossible to add components to that profile. 1770 */ 1771 void add_ior_component_to_profile ( 1772 in IOP::TaggedComponent tagged_component, 1773 in IOP::ProfileId profile_id); 1774 1775 /** Return the adapter manager id of the object adapter 1776 * that was just created and is running IOR interceptors. 1777 */ 1778 readonly attribute AdapterManagerId manager_id ; 1779 1780 /** Return the adapter state of the object adapter 1781 * that was just created and is running IOR interceptors. 1782 */ 1783 readonly attribute AdapterState state ; 1784 1785 /** Return the object reference template of the object adapter 1786 * that was just created and is running IOR interceptors. 1787 */ 1788 readonly attribute ObjectReferenceTemplate adapter_template ; 1789 1790 /** On read, returns the current factory that will be used to create 1791 * object references for the object adapter that was just created 1792 * and is running IOR interceptors. By default, this factory is the same 1793 * as the value of the adapter_template attribute. The current_factory 1794 * may also be set to another object reference template inside an 1795 * IORInterceptor_3_0. 1796 */ 1797 attribute ObjectReferenceFactory current_factory ; 1798 }; 1799 1800 /** 1801 * Interceptor used to establish tagged components in the profiles within 1802 * an IOR. 1803 * <p> 1804 * In some cases, a portable ORB service implementation may need to add 1805 * information describing the server's or object's ORB service related 1806 * capabilities to object references in order to enable the ORB service 1807 * implementation in the client to function properly. 1808 * <p> 1809 * This is supported through the <code>IORInterceptor</code> and 1810 * <code>IORInfo</code> interfaces. 1811 * 1812 * @see IORInfo 1813 */ 1814 local interface IORInterceptor : Interceptor { 1815 /** 1816 * A server side ORB calls the <code>establish_components</code> 1817 * operation on all registered <code>IORInterceptor</code> instances 1818 * when it is assembling the list of components that will be included 1819 * in the profile or profiles of an object reference. This operation 1820 * is not necessarily called for each individual object reference. 1821 * In the case of the POA, this operation is called each time POA::create_POA 1822 * is called. In any case, <code>establish_components</code> is 1823 * guaranteed to be called at least once for each distinct set of 1824 * server policies. 1825 * <p> 1826 * An implementation of <code>establish_components</code> must not 1827 * throw exceptions. If it does, the ORB shall ignore the exception 1828 * and proceed to call the next IOR Interceptor's 1829 * <code>establish_components</code> operation. 1830 * 1831 * @param info The <code>IORInfo</code> instance used by the ORB 1832 * service to query applicable policies and add components to be 1833 * included in the generated IORs. 1834 */ 1835 void establish_components (in IORInfo info); 1836 }; 1837 1838 local interface IORInterceptor_3_0 : IORInterceptor { 1839 /** The components_established method is invoked on all registered 1840 * IORInterceptor_3_0 instances after establish_components 1841 * has been invoked on all registered IORInterceptor instances. 1842 * The adapter_template is available in info during this call. 1843 * The current_factory may be get or set in info during this call. 1844 * <p> 1845 * Any exception thrown from this method is handled by the Object 1846 * Adapter that called this interceptor. In the case of the POA, 1847 * an exception results in a OBJ_ADAPTER exception with an OMG 1848 * standard minor code of 6. 1849 * @param info The IORInfo for the object adapter being created. 1850 */ 1851 void components_established( in IORInfo info ) ; 1852 1853 /** Called whenever the state of an adapter manager changes. 1854 * For the POA, that is the POAManager. If the state change 1855 * is reported through <code>adapter_manager_state_changed</code>, 1856 * it is not reported through <code>adapter_state_changed</code>. 1857 * @param id the adapter manager id of the adapter manager that 1858 * changed state 1859 * @param state the new state of the adapter manager 1860 */ 1861 void adapter_manager_state_changed( in AdapterManagerId id, 1862 in AdapterState state ) ; 1863 1864 /** Called whenever the state of an object adapter changes, and 1865 * the state change is not caused by an adapter manager. Such 1866 * changes are reported to all registered <code>IORInterceptor_3_0</code> 1867 * instances. 1868 * @param templates the sequence of <code>ObjectReferenceTemplate</code> instances 1869 * on which this state change occurred. 1870 * @param state the new <code>AdapterState</code> shared by all of the templates. 1871 */ 1872 void adapter_state_changed( in ObjectReferenceTemplateSeq templates, 1873 in AdapterState state ) ; 1874 }; 1875 1876 /** 1877 * Enables policy types to be constructed using 1878 * <code>CORBA.ORB.create_policy</code>. 1879 * <p> 1880 * A portable ORB service implementation registers an instance of the 1881 * <code>PolicyFactory</code> interface during ORB initialization in order 1882 * to enable its policy types to be constructed using 1883 * <code>CORBA.ORB.create_policy</code>. The POA is required to preserve 1884 * any policy which is registered with <code>ORBInitInfo</code> in this 1885 * manner. 1886 * 1887 * @see ORBInitInfo#register_policy_factory 1888 */ 1889 local interface PolicyFactory 1890 { 1891 /** 1892 * Returns an instance of the appropriate interface derived from 1893 * <code>CORBA.Policy</code> whose value corresponds to the 1894 * specified any. 1895 * <p> 1896 * The ORB calls <code>create_policy</code> on a registered 1897 * <code>PolicyFactory</code> instance when 1898 * <code>CORBA.ORB.create_policy</code> is called for the 1899 * <code>PolicyType</code> under which the <code>PolicyFactory</code> has 1900 * been registered. The <code>create_policy</code> operation then 1901 * returns an instance of the appropriate interface derived from 1902 * <code>CORBA.Policy</code> whose value corresponds to the specified 1903 * any. If it cannot, it shall throw an exception as described for 1904 * <code>CORBA.ORB.create_policy</code>. 1905 * 1906 * @param type An int specifying the type of policy being created. 1907 * @param value An any containing data with which to construct the 1908 * <code>CORBA.Policy</code>. 1909 * @return A <code>CORBA.Policy</code> object of the specified type and 1910 * value. 1911 */ 1912 CORBA::Policy create_policy 1913 (in CORBA::PolicyType type, in any value) 1914 raises (CORBA::PolicyError); 1915 }; 1916 1917 /** 1918 * Passed to each <code>ORBInitializer</code>, allowing it to 1919 * to register interceptors and perform other duties while the ORB is 1920 * initializing. 1921 * <p> 1922 * The <code>ORBInitInfo</code> object is only valid during 1923 * <code>ORB.init</code>. If a service keeps a reference to its 1924 * <code>ORBInitInfo</code> object and tries to use it after 1925 * <code>ORB.init</code> returns, the object no longer exists and an 1926 * <code>OBJECT_NOT_EXIST</code> exception shall be thrown. 1927 * 1928 * @see ORBInitializer 1929 */ 1930 local interface ORBInitInfo { 1931 1932 /** Object id, represented as a String */ 1933 typedef string ObjectId; 1934 1935 /** 1936 * Only one Interceptor of a given name can be registered with the 1937 * ORB for each Interceptor type. If an attempt is made to register a 1938 * second Interceptor with the same name, DuplicateName is thrown. 1939 * <p> 1940 * An Interceptor may be anonymous, i.e., have an empty string as the 1941 * name attribute. Any number of anonymous Interceptors may be 1942 * registered with the ORB so, if the Interceptor being registered 1943 * is anonymous, the registration operation will not throw 1944 * <code>DuplicateName</code>. 1945 */ 1946 exception DuplicateName { 1947 /** 1948 * The name for which there was already an interceptor registered. 1949 */ 1950 string name; 1951 }; 1952 1953 /** 1954 * This exception is thrown by 1955 * <code>register_initial_reference</code> and 1956 * <code>resolve_initial_references</code>. 1957 * <code>register_initial_reference</code> throws <code>InvalidName</code> 1958 * if: 1959 * <ul> 1960 * <li>this operation is called with an empty string id; or</li> 1961 * <li>this operation is called with an id that is already registered, 1962 * including the default names defined by OMG.</li> 1963 * </ul> 1964 * <code>resolve_initial_references</code> throws 1965 * <code>InvalidName</code> if the name to be resolved is invalid. 1966 */ 1967 exception InvalidName {}; 1968 1969 /** 1970 * Returns the arguments passed to <code>ORB.init</code>. They may or 1971 * may not contain the ORB's arguments. 1972 */ 1973 readonly attribute CORBA::StringSeq arguments; 1974 1975 /** 1976 * Returns the ID of the ORB being initialized. 1977 */ 1978 readonly attribute string orb_id; 1979 1980 /** 1981 * Returns the <code>IOP.CodecFactory</code>. The 1982 * <code>CodecFactory</code> is normally obtained via a call to 1983 * <code>ORB.resolve_initial_references( "CodecFactory" )</code>, but 1984 * since the ORB is not yet available and Interceptors, particularly when 1985 * processing service contexts, will require a <code>Codec</code>, a 1986 * means of obtaining a <code>Codec</code> is necessary during ORB 1987 * initialization. 1988 */ 1989 readonly attribute IOP::CodecFactory codec_factory; 1990 1991 /** 1992 * Identical to <code>ORB.register_initial_reference</code>. This same 1993 * functionality exists here because the ORB, not yet fully initialized, 1994 * is not yet available but initial references may need to be 1995 * registered as part of Interceptor registration. The only difference 1996 * is that the version of this operation on the ORB uses PIDL 1997 * (<code>CORBA.ORB.ObjectId</code>) and 1998 * (<code>CORBA.ORB.InvalidName</code>) whereas the version in this 1999 * interface uses IDL defined in this interface; the semantics are 2000 * identical. 2001 */ 2002 void register_initial_reference (in ObjectId id, in Object obj) 2003 raises (InvalidName); 2004 2005 // This was incorrectly returning void in orbos/99-12-02, correction 2006 // from errata in orbos/00-01-01 2007 /** 2008 * Identical to <code>ORB.resolve_initial_references</code>. This same 2009 * functionality exists here because the ORB, not yet fully initialized, 2010 * is not yet available but initial references may be required from the 2011 * ORB as part of Interceptor registration. The only difference is that 2012 * the version of this operation on the ORB uses PIDL 2013 * (<code>CORBA::ORB::ObjectId</code> and 2014 * <code>CORBA::ORB::InvalidName</code>) whereas the version in this 2015 * interface uses IDL defined in this interface; the semantics 2016 * are identical. 2017 * <p> 2018 * This operation is only valid during post_init. 2019 */ 2020 Object resolve_initial_references (in ObjectId id) raises (InvalidName); 2021 2022 /** 2023 * Used to add a client-side request Interceptor to the list of 2024 * client-side request Interceptors. 2025 * 2026 * @param interceptor The <code>ClientRequestInterceptor</code> to be 2027 * added. 2028 * @exception DuplicateName thrown if a client-side request Interceptor 2029 * has already been registered with this Interceptor's name. 2030 */ 2031 void add_client_request_interceptor 2032 (in ClientRequestInterceptor interceptor) 2033 raises (DuplicateName); 2034 2035 /** 2036 * Used to add a server-side request Interceptor to the list of 2037 * server-side request Interceptors. 2038 * 2039 * @param interceptor The ServerRequestInterceptor to be added. 2040 * @exception DuplicateName thrown if a server-side request Interceptor 2041 * has already been registered with this Interceptor's name 2042 */ 2043 void add_server_request_interceptor ( 2044 in ServerRequestInterceptor interceptor) 2045 raises (DuplicateName); 2046 2047 /** 2048 * Used to add an IOR Interceptor to the list of IOR Interceptors. 2049 * 2050 * @param interceptor The IORInterceptor to be added. 2051 * @exception DuplicateName thrown if an IOR Interceptor has already 2052 * been registered with this Interceptor's name. 2053 */ 2054 void add_ior_interceptor (in IORInterceptor interceptor) 2055 raises (DuplicateName); 2056 2057 /** 2058 * Called to allocate a slot on <code>PortableInterceptor.Current</code>. 2059 * <p> 2060 * Note that while slot id's can be allocated within an ORB initializer, 2061 * the slots themselves cannot be initialized. 2062 * 2063 * @return The index to the slot which has been allocated. 2064 * @exception BAD_INV_ORDER thrown, with a standard minor code of 14, if 2065 * <code>set_slot</code> or <code>get_slot</code> is called on the 2066 * <code>PICurrent</code> within an ORB initializer. 2067 * @see Current 2068 */ 2069 SlotId allocate_slot_id (); 2070 2071 /** 2072 * Registers a <code>PolicyFactory</code> for the given 2073 * <code>PolicyType</code>. 2074 * 2075 * @param type The policy type that the given <code>PolicyFactory</code> 2076 * serves. 2077 * @param policy_factory The factory for the given policy type. 2078 * @exception BAD_INV_ORDER thrown, with a standard minor code of 16, if 2079 * a <code>PolicyFactory</code> already exists for the given 2080 * <code>PolicyType</code>. 2081 */ 2082 void register_policy_factory ( 2083 in CORBA::PolicyType type, 2084 in PolicyFactory policy_factory); 2085 }; 2086 2087 /** 2088 * Facilitates interceptor registration and ORB initialization. 2089 * <p> 2090 * Interceptors are intended to be a means by which ORB services gain 2091 * access to ORB processing, effectively becoming part of the ORB. 2092 * Since Interceptors are part of the ORB, when <code>ORB.init</code> 2093 * returns an ORB, the Interceptors shall have been registered. 2094 * Interceptors cannot be registered on an ORB after it has been 2095 * returned by a call to <code>ORB.init</code>. 2096 * <p> 2097 * An Interceptor is registered by registering an associated 2098 * <code>ORBInitializer</code> object which implements the 2099 * <code>ORBInitializer</code> interface. When an ORB is initializing, 2100 * it shall call each registered <code>ORBInitializer</code>, passing it 2101 * an <code>ORBInitInfo</code> object which is used to register its 2102 * Interceptor. 2103 * <p> 2104 * <b>Registering ORB Initializers in Java</b> 2105 * <p> 2106 * ORBInitializers are registered via Java ORB properties. 2107 * <p> 2108 * The property names are of the form: 2109 * <blockquote><code> 2110 * org.omg.PortableInterceptor.ORBInitializerClass.<Service> 2111 * </code></blockquote> 2112 * where <code><Service></code> is the string name of a class 2113 * which implements 2114 * <blockquote><code> 2115 * org.omg.PortableInterceptor.ORBInitializer 2116 * </code></blockquote> 2117 * To avoid name collisions, the reverse DNS name convention should be 2118 * used. For example, if company X has three initializers, it could define 2119 * the following properties: 2120 * <ul> 2121 * <li><code> 2122 * org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init1 2123 * </code></li> 2124 * <li><code> 2125 * org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init2 2126 * </code></li> 2127 * <li><code> 2128 * org.omg.PortableInterceptor.ORBInitializerClass.com.x.Init3 2129 * </code></li> 2130 * </ul> 2131 * During ORB.init, these ORB properties which begin with 2132 * <code>org.omg.PortableInterceptor.ORBInitializerClass</code> shall be 2133 * collected, the <code><Service></code> portion of each property 2134 * shall be extracted, an object shall be instantiated with the 2135 * <code><Service></code> string as its class name, and the 2136 * <code>pre_init</code> and <code>post_init</code> methods shall be 2137 * called on that object. If there are any exceptions, the ORB shall 2138 * ignore them and proceed. 2139 * <p> 2140 * <b><i>Example</i></b> 2141 * <p> 2142 * A client-side logging service written by company X, for example, may 2143 * have the following ORBInitializer implementation: 2144 * <pre><code> 2145 * package com.x.logging; 2146 * 2147 * import org.omg.PortableInterceptor.Interceptor; 2148 * import org.omg.PortableInterceptor.ORBInitializer; 2149 * import org.omg.PortableInterceptor.ORBInitInfo; 2150 * 2151 * public class LoggingService implements ORBInitializer { 2152 * void pre_init( ORBInitInfo info ) { 2153 * // Instantiate the Logging Service s Interceptor. 2154 * Interceptor interceptor = new LoggingInterceptor(); 2155 * 2156 * // Register the Logging Service s Interceptor. 2157 * info.add_client_request_interceptor( interceptor ); 2158 * } 2159 * 2160 * void post_init( ORBInitInfo info ) { 2161 * // This service does not need two init points. 2162 * } 2163 * } 2164 * </code></pre> 2165 * To run a program called <code>MyApp</code> using this logging 2166 * service, the user could type: 2167 * <blockquote><code> 2168 * java 2169 *-Dorg.omg.PortableInterceptor.ORBInitializerClass.com.x.Logging.LoggingService 2170 * MyApp 2171 * </code></blockquote> 2172 * <p> 2173 * <b>Notes about Registering Interceptors</b> 2174 * <p> 2175 * Request Interceptors are registered on a per-ORB basis. 2176 * <p> 2177 * To achieve virtual per-object Interceptors, query the policies on the 2178 * target from within the interception points to determine whether they 2179 * should do any work. 2180 * <p> 2181 * To achieve virtual per-POA Interceptors, instantiate each POA with a 2182 * different ORB. While Interceptors may be ordered administratively, 2183 * there is no concept of order with respect to the registration of 2184 * Interceptors. Request Interceptors are concerned with service contexts. 2185 * Service contexts have no order, so there is no purpose for request 2186 * Interceptors to have an order. IOR Interceptors are concerned with 2187 * tagged components. Tagged components also have no order, so there 2188 * is no purpose for IOR Interceptors to have an order. 2189 * <p> 2190 * Registration code should avoid using the ORB (i.e., calling 2191 * <code>ORB.init</code> with the provided <code>orb_id</code>). Since 2192 * registration occurs during ORB initialization, results of invocations 2193 * on this ORB while it is in this state are undefined. 2194 * 2195 * @see ORBInitInfo 2196 */ 2197 local interface ORBInitializer { 2198 2199 /** 2200 * Called during ORB initialization. If it is expected that initial 2201 * services registered by an interceptor will be used by other 2202 * interceptors, then those initial services shall be registered at 2203 * this point via calls to 2204 * <code>ORBInitInfo.register_initial_reference</code>. 2205 * 2206 * @param info provides initialization attributes and operations by 2207 * which Interceptors can be registered. 2208 */ 2209 void pre_init (in ORBInitInfo info); 2210 2211 /** 2212 * Called during ORB initialization. If a service must resolve initial 2213 * references as part of its initialization, it can assume that all 2214 * initial references will be available at this point. 2215 * <p> 2216 * Calling the <code>post_init</code> operations is not the final 2217 * task of ORB initialization. The final task, following the 2218 * <code>post_init</code> calls, is attaching the lists of registered 2219 * interceptors to the ORB. Therefore, the ORB does not contain the 2220 * interceptors during calls to <code>post_init</code>. If an 2221 * ORB-mediated call is made from within <code>post_init</code>, no 2222 * request interceptors will be invoked on that call. 2223 * Likewise, if an operation is performed which causes an IOR to be 2224 * created, no IOR interceptors will be invoked. 2225 * 2226 * @param info provides initialization attributes and 2227 * operations by which Interceptors can be registered. 2228 */ 2229 void post_init (in ORBInitInfo info); 2230 }; 2231 };