VisiBroker for Java

org.omg.PortableInterceptor
Interface CurrentOperations

All Superinterfaces:
CurrentOperations
All Known Subinterfaces:
Current

public interface CurrentOperations
extends CurrentOperations

Portable Interceptor Current (also known as PICurrent) is 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 which wishes to use PICurrent reserves a slot or slots at initialization time and uses those slots during the processing of requests and replies.

Before an invocation is made, PICurrent is obtained via a call to ORB.resolve_initial_references( "PICurrent" ).From within the interception points, the data on PICurrent that has moved from the thread scope to the request scope is available via the get_slot operation on the RequestInfo object. A PICurrent can still be obtained via resolve_initial_references, but that is the interceptor's thread scope PICurrent.


Method Summary
 Any get_slot(int id)
          This method returns the data, in the form of a CORBA::Any, from the given slot of the Current that is in the scope of the request.
 void set_slot(int id, Any data)
          A service sets data in a slot with set_slot().
 

Method Detail

set_slot

void set_slot(int id,
              Any data)
              throws InvalidSlot
A service sets data in a slot with set_slot(). The data is in the form of a CORBA::Any object.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,BAD_INV_ORDER with a minor code of 14 is raised.

Parameters:
id - The SlotId of the slot in which the data will be set.
data - The data, in the form of a CORBA::Any object, which will be set to the identified slot.
Throws:
InvalidSlot - The supplied SlotId is invalid

get_slot

Any get_slot(int id)
             throws InvalidSlot
This method returns the data, in the form of a CORBA::Any, from the given slot of the Current that is in the scope of the request. If the given slot has not been set, then an CORBA::Any containing a type code with a TCKind value of tk_null is returned. If the ID does not define an allocated slot,InvalidSlot is raised.

Parameters:
id - The SlotId of the slot from which the data will be returned.
Returns:
The slot data, in the form of an any, obtained with the given identifier.
Throws:
InvalidSlot - The supplied SlotId is invalid

Borland Software Corporation
http://www.borland.com
100 Enterprise Way
Scotts Valley, CA 95066
Voice: (831) 431-1000
pubsweb@borland.com

Read the latest documentation online