Application.getThreadStorage

Overview | Methods | This Package | All Packages

Application.getThreadStorage

Retrieves an object that has been stored in the specified thread's storage slot.

Syntax

public static Object getThreadStorage( int index )

Parameters

index

The index to the thread's storage slot. This index must have been obtained previously by calling allocThreadStorage.

Return Value

Returns an object that the caller has previously stored in the slot, or returns null if an object is not stored in the slot.

Remarks

To retrieve an object from a specified thread's storage slot, you must have a valid index to the storage slot. This index is provided by calling allocThreadStorage. When retrieving information from the storage slot, ensure that you have the appropriate type cast applied to the call to getThreadStorage. To store information in a specified thread's storage slot, you can call the setThreadStroage method. For an example of how use this method, see allocThreadStorage.

See Also   freeThreadStorage