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