Class DefaultThreadContext

java.lang.Object
de.hybris.platform.commerceservices.threadcontext.impl.DefaultThreadContext
All Implemented Interfaces:
ThreadContext

public class DefaultThreadContext extends Object implements ThreadContext
Default implementation of the ThreadContext
  • Constructor Details

    • DefaultThreadContext

      public DefaultThreadContext()
    • DefaultThreadContext

      public DefaultThreadContext(ThreadContext parent)
  • Method Details

    • setAttribute

      public void setAttribute(String name, 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(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(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