157N/A * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 157N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 157N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 157N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 157N/A * or visit www.oracle.com if you need additional information or have any 0N/A * PICurrent is the implementation of Current as specified in the Portable 0N/A * Interceptors Spec orbos/99-12-02. 0N/A * IMPORTANT: PICurrent is implemented with the assumption that get_slot() 0N/A * or set_slot() will not be called in ORBInitializer.pre_init() and 0N/A // slotCounter is used to keep track of ORBInitInfo.allocate_slot_id() 0N/A // The ORB associated with this PICurrent object. 0N/A // True if the orb is still initialzing and get_slot and set_slot are not 0N/A // ThreadLocal contains a stack of SlotTable which are used 0N/A // for resolve_initial_references( "PICurrent" ); 0N/A * PICurrent constructor which will be called for every ORB 0N/A * This method will be called from ORBInitInfo.allocate_slot_id( ). 0N/A * simply returns a slot id by incrementing slotCounter. 0N/A * This method gets the SlotTable which is on the top of the 0N/A * This method pushes a SlotTable on the SlotTableStack. When there is 0N/A * a resolve_initial_references("PICurrent") after this call. The new 0N/A * PICurrent will be returned. 0N/A * This method pops a SlotTable on the SlotTableStack. 0N/A * This method sets the slot data at the given slot id (index) in the 0N/A * Slot Table which is on the top of the SlotTableStack. 0N/A // As per ptc/00-08-06 if the ORB is still initializing, disallow 0N/A // calls to get_slot and set_slot. If an attempt is made to call, 0N/A // throw a BAD_INV_ORDER. 0N/A * This method gets the slot data at the given slot id (index) from the 0N/A * Slot Table which is on the top of the SlotTableStack. 0N/A // As per ptc/00-08-06 if the ORB is still initializing, disallow 0N/A // calls to get_slot and set_slot. If an attempt is made to call, 0N/A // throw a BAD_INV_ORDER. 0N/A * This method resets all the slot data to null in the 0N/A * Slot Table which is on the top of SlotTableStack. 0N/A * Called from ORB when the ORBInitializers are about to start