Class DefaultThreadContext

  • All Implemented Interfaces:
    ThreadContext

    public class DefaultThreadContext
    extends java.lang.Object
    implements ThreadContext
    Default implementation of the ThreadContext
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T getAttribute​(java.lang.String name)
      Returns for the given session attribute name the value
      void removeAttribute​(java.lang.String name)
      Removes the given attribute from the current session.
      void setAttribute​(java.lang.String name, java.lang.Object value)
      Sets the given value Object to the Session as attribute with the given name
      • Methods inherited from class java.lang.Object

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

      • DefaultThreadContext

        public DefaultThreadContext()
      • DefaultThreadContext

        public DefaultThreadContext​(ThreadContext parent)
    • Method Detail

      • setAttribute

        public void setAttribute​(java.lang.String name,
                                 java.lang.Object value)
        Description copied from interface: ThreadContext
        Sets the given value Object to the Session as attribute with the given name
        Specified by:
        setAttribute in interface ThreadContext
        Parameters:
        name - the name of the attribute
        value - the value to be set
      • getAttribute

        public <T> T getAttribute​(java.lang.String name)
        Description copied from interface: ThreadContext
        Returns for the given session attribute name the value
        Specified by:
        getAttribute in interface ThreadContext
        Parameters:
        name - the attribute name
        Returns:
        null if no attribute with the given name is stored in the session
      • removeAttribute

        public void removeAttribute​(java.lang.String name)
        Description copied from interface: ThreadContext
        Removes the given attribute from the current session. Do nothing if the attribute doesn't exists in the session.
        Specified by:
        removeAttribute in interface ThreadContext
        Parameters:
        name - the attribute name