org.apache.manifoldcf.core.interfaces
Interface IThreadContext

All Known Implementing Classes:
ThreadContext

public interface IThreadContext

This interface describes the functionality in a thread context. Thread contexts exist as a place to park objects that should exist at most once per thread. While there is no guarantee that this would be enforced, the semantics don't generally fail with multiple instances, but they do become inefficient. But, in any case, an IThreadContext object should NEVER be shared among threads!!!


Field Summary
static java.lang.String _rcsid
           
 
Method Summary
 java.lang.Object get(java.lang.Object key)
          Retrieve a named object from the context.
 void save(java.lang.Object key, java.lang.Object object)
          Set a named object into the context.
 

Field Detail

_rcsid

static final java.lang.String _rcsid
See Also:
Constant Field Values
Method Detail

save

void save(java.lang.Object key,
          java.lang.Object object)
Set a named object into the context.

Parameters:
key - is the name of the object (usually a string)
object - is the object to save, or null if the object is to be destroyed instead.

get

java.lang.Object get(java.lang.Object key)
Retrieve a named object from the context. Use an equivalent key to retrieve what was previously saved. If no such object exists, null will be returned.

Parameters:
key - is the object's key (usually a string)
Returns:
the object, or null.