Previous | Table of Contents | Next |
module PortableInterceptor {
typedef unsigned long SlotId;
exception InvalidSlot {};
local interface Current : CORBA::Current { any get_slot (in SlotId id) raises (InvalidSlot); void set_slot (in SlotId id,
in any data) raises (InvalidSlot);
};};
PICurrent is merely a slot table, the slots of which are used by each service to transfer their context data between their
context and the request’s or reply’s service context. Each service that wishes to use PICurrent reserves a slot or slots at
initialization time
(see Section 21.7.2.11, “allocate_slot_id,? on page 21-54) and uses those slots during
the processing of requests and replies.
21.4.3.1 get_slot
A service can get the slot data it set in PICurrent via get_slot. The data is in the form of an any.
If the given slot has not been set, an any containing a type code with a TCKind value of tk_null and no value is returned.
If get_slot is called on a slot that has not been allocated, InvalidSlot is raised.
If get_slot
is called from within an ORB initializer (see Section 21.7, “Registering
Interceptors,? on page 21-50)
BAD_INV_ORDER with a minor code of 10 shall be raised.
Parameters
id The SlotId of the slot from which the data will be returned.
Return Value The data, in the form of an any, of the given slot identifier.
21.4.3.2 set_slot
A service sets data in a slot with set_slot. The data shall be in the form of an any.
If data already exists in that slot, it is overridden.
If set_slot is called on a slot that has not been allocated, InvalidSlot is raised.
If set_slot
is called from within an ORB initializer (see Section 21.7, “Registering
Interceptors,? on page 21-50)
BAD_INV_ORDER with a minor code of 10 shall be raised.
Parameters
id The SlotId of the slot to which the data will be set.
data The data, in the form of an any, which will be set to the identified slot.