Class ThreadContext

  • All Implemented Interfaces:
    IThreadContext

    public class ThreadContext
    extends java.lang.Object
    implements IThreadContext
    Thread context implementation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String _rcsid  
      protected java.util.Hashtable hashtable  
    • Constructor Summary

      Constructors 
      Constructor Description
      ThreadContext()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • hashtable

        protected java.util.Hashtable hashtable
    • Constructor Detail

      • ThreadContext

        public ThreadContext()
    • Method Detail

      • save

        public void save​(java.lang.Object key,
                         java.lang.Object object)
        Set a named object into the context.
        Specified by:
        save in interface IThreadContext
        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

        public 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.
        Specified by:
        get in interface IThreadContext
        Parameters:
        key - is the object's key (usually a string)
        Returns:
        the object, or null.