KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > PortableInterceptor > CurrentOperations


1 package org.omg.PortableInterceptor;
2
3
4 /**
5 * org/omg/PortableInterceptor/CurrentOperations.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.2"
7 * from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
8 * Saturday, February 9, 2008 9:40:08 AM GMT
9 */

10
11
12 /**
13    * Portable Interceptors Current (also known as <code>PICurrent</code>)
14    * is merely a slot table, the slots of which are used by each service to
15    * transfer their context data between their context and the request's or
16    * reply's service context. Each service which wishes to use PICurrent
17    * reserves a slot or slots at initialization time and uses those slots
18    * during the processing of requests and replies.
19    * <p>
20    * Before an invocation is made, PICurrent is obtained via a call to
21    * <code>ORB.resolve_initial_references( "PICurrent" )</code>. From within
22    * the interception points, the data on PICurrent that has moved from the
23    * thread scope to the request scope is available via the
24    * <code>get_slot</code> operation on the <code>RequestInfo</code> object.
25    * A PICurrent can still be obtained via
26    * <code>resolve_initial_references</code>, but that is the Interceptor's
27    * thread scope PICurrent.
28    */

29 public interface CurrentOperations extends org.omg.CORBA.CurrentOperations JavaDoc
30 {
31
32   /**
33      * Retrieves the slot data the application set in PICurrent via
34      * <code>get_slot</code>. The data is in the form of an Any.
35      * <p>
36      * If the given slot has not been set, an Any containing a type code
37      * with a <code>TCKind</code> value of <code>tk_null</code> and no value
38      * is returned.
39      *
40      * @param id The <code>SlotId</code> of the slot from which the data will
41      * be returned.
42      * @return The data, in the form of an Any, of the given slot identifier.
43      * @exception InvalidSlot thrown if get_slot is called on a slot that
44      * has not been allocated.
45      * @exception BAD_INV_ORDER thrown if <code>get_slot</code> is called
46      * from within an ORB initializer
47      */

48   org.omg.CORBA.Any JavaDoc get_slot (int id) throws org.omg.PortableInterceptor.InvalidSlot JavaDoc;
49
50   /**
51      * Sets data in a slot. The data is in the form of an Any. If data
52      * already exists in that slot, it is overridden.
53      *
54      * @param id The <code>SlotId</code> of the slot to which the data will
55      * be set.
56      * @param data The data, in the form of an Any, which will be set
57      * to the identified slot.
58      * @exception InvalidSlot thrown if <code>set_slot</code> is called on
59      * a slot that has not been allocated.
60      * @exception BAD_INV_ORDER thrown if <code>set_slot</code> is called
61      * from within an ORB initializer.
62      */

63   void set_slot (int id, org.omg.CORBA.Any JavaDoc data) throws org.omg.PortableInterceptor.InvalidSlot JavaDoc;
64 } // interface CurrentOperations
65
Popular Tags