本文整理汇总了Java中org.omg.PortableInterceptor.InvalidSlot类的典型用法代码示例。如果您正苦于以下问题:Java InvalidSlot类的具体用法?Java InvalidSlot怎么用?Java InvalidSlot使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InvalidSlot类属于org.omg.PortableInterceptor包,在下文中一共展示了InvalidSlot类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: set_slot
import org.omg.PortableInterceptor.InvalidSlot; //导入依赖的package包/类
/**
* Allows an Interceptor to set a slot in the Current that is in the scope
* of the request. If data already exists in that slot, it will be
* overwritten. If the ID does not define an allocated slot, InvalidSlot
* is raised.
*/
public void set_slot (int id, Any data) throws InvalidSlot {
// access is currently valid for all states:
//checkAccess( MID_SET_SLOT );
slotTable.set_slot( id, data );
}
示例2: set_slot
import org.omg.PortableInterceptor.InvalidSlot; //导入依赖的package包/类
/**
* This method sets the slot data at the given slot id (index).
*/
public void set_slot( int id, Any data ) throws InvalidSlot
{
// First check whether the slot is allocated
// If not, raise the invalid slot exception
if( id >= theSlotData.length ) {
throw new InvalidSlot();
}
dirtyFlag = true;
theSlotData[id] = data;
}
示例3: get_slot
import org.omg.PortableInterceptor.InvalidSlot; //导入依赖的package包/类
/**
* This method get the slot data for the given slot id (index).
*/
public Any get_slot( int id ) throws InvalidSlot
{
// First check whether the slot is allocated
// If not, raise the invalid slot exception
if( id >= theSlotData.length ) {
throw new InvalidSlot();
}
if( theSlotData[id] == null ) {
theSlotData [id] = new AnyImpl(orb);
}
return theSlotData[ id ];
}
示例4: set_slot
import org.omg.PortableInterceptor.InvalidSlot; //导入依赖的package包/类
/**
* This method sets the slot data at the given slot id (index) in the
* Slot Table which is on the top of the SlotTableStack.
*/
public void set_slot( int id, Any data ) throws InvalidSlot
{
if( orbInitializing ) {
// As per ptc/00-08-06 if the ORB is still initializing, disallow
// calls to get_slot and set_slot. If an attempt is made to call,
// throw a BAD_INV_ORDER.
throw wrapper.invalidPiCall3() ;
}
getSlotTable().set_slot( id, data );
}
示例5: get_slot
import org.omg.PortableInterceptor.InvalidSlot; //导入依赖的package包/类
/**
* This method gets the slot data at the given slot id (index) from the
* Slot Table which is on the top of the SlotTableStack.
*/
public Any get_slot( int id ) throws InvalidSlot
{
if( orbInitializing ) {
// As per ptc/00-08-06 if the ORB is still initializing, disallow
// calls to get_slot and set_slot. If an attempt is made to call,
// throw a BAD_INV_ORDER.
throw wrapper.invalidPiCall4() ;
}
return getSlotTable().get_slot( id );
}
示例6: get_slot
import org.omg.PortableInterceptor.InvalidSlot; //导入依赖的package包/类
/**
* Returns the data from the given slot of the PortableInterceptor::Current
* that is in the scope of the request.
* <p>
* If the given slot has not been set, then an any containing a type code
* with a TCKind value of tk_null is returned.
* <p>
* If the ID does not define an allocated slot, InvalidSlot is raised.
*/
public Any get_slot (int id)
throws InvalidSlot
{
// access is currently valid for all states:
//checkAccess( MID_GET_SLOT );
// Delegate the call to the slotTable which was set when RequestInfo was
// created.
return slotTable.get_slot( id );
}
示例7: set_slot
import org.omg.PortableInterceptor.InvalidSlot; //导入依赖的package包/类
/**
* Set the give slot.
*/
public void set_slot(int id, Any data) throws InvalidSlot
{
try
{
m_slots [ id ] = data;
}
catch (Exception e)
{
InvalidSlot ex = new InvalidSlot("Cannot set slot " + id);
ex.initCause(e);
throw ex;
}
}
示例8: get_slot
import org.omg.PortableInterceptor.InvalidSlot; //导入依赖的package包/类
/**
* Get the given slot.
*/
public Any get_slot(int id) throws InvalidSlot
{
try
{
return m_slots [ id ];
}
catch (Exception e)
{
InvalidSlot ex = new InvalidSlot("Cannot get slot " + id);
ex.initCause(e);
throw ex;
}
}
示例9: get_slot
import org.omg.PortableInterceptor.InvalidSlot; //导入依赖的package包/类
/**
* Get value for the slot with the given id. If the array of Currents has not
* been yet allocated for the current thread, it is allocated during the
* invocation of this method.
*/
public Any get_slot(int slot_id) throws InvalidSlot, BAD_INV_ORDER
{
try
{
return get_slots() [ slot_id ];
}
catch (ArrayIndexOutOfBoundsException e)
{
throw new InvalidSlot("Slot " + slot_id);
}
}
示例10: set_slot
import org.omg.PortableInterceptor.InvalidSlot; //导入依赖的package包/类
/**
* Set value for the slot with the given id. If the array of Currents has not
* been yet allocated for the current thread, it is allocated during the
* invocation of this method.
*/
public void set_slot(int slot_id, Any data)
throws InvalidSlot, BAD_INV_ORDER
{
try
{
get_slots() [ slot_id ] = data;
}
catch (ArrayIndexOutOfBoundsException e)
{
throw new InvalidSlot("Slot " + slot_id);
}
}
示例11: get_slot
import org.omg.PortableInterceptor.InvalidSlot; //导入依赖的package包/类
/**
* Get the slot from the slot array inside this request.
*/
public Any get_slot(int id) throws InvalidSlot
{
try
{
return m_slots [ id ];
}
catch (Exception e)
{
throw new InvalidSlot("slot id " + id + ":" + e);
}
}