org.exoplatform.container.component
Interface ThreadContextHolder
public interface ThreadContextHolder
Defines a component that holds variables of type ThreadLocal
whose value is required by the component to work normally and cannot be recovered.
This component is mainly used when we want to do a task asynchronously, in that case
to ensure that the task will be executed in the same conditions as if it would be
executed synchronously we need to transfer the thread context from the original
thread to the executor thread.
Warning please note that this interface must be used with caution, only
the most important components that have ThreadLocal variables whose value
cannot be recovered should implement this interface.
- Version:
- $Id$
- Author:
- Nicolas Filotto
MANAGE_THREAD_LOCAL
static final Permission MANAGE_THREAD_LOCAL
getThreadContext
ThreadContext getThreadContext()
- Gives the value corresponding to the context of the thread
- Returns:
- a new instance of
ThreadContext if there are some
valuable ThreadLocal variables to share otherwise null
is expected
Copyright © 2013 eXo Platform SAS. All Rights Reserved.