Class ThreadContext
- java.lang.Object
-
- org.jboss.weld.contexts.AbstractContext
-
- org.jboss.weld.contexts.AbstractManagedContext
-
- org.jboss.weld.contexts.AbstractUnboundContext
-
- org.jboss.weld.environment.se.contexts.ThreadContext
-
- All Implemented Interfaces:
AlterableContext
,Context
,ManagedContext
,WeldAlterableContext
public class ThreadContext extends AbstractUnboundContext
The thread context. Works with @ThreadScoped beans, maintaining a separate context for each thread.- Author:
- Nicklas Karlsson, Peter Royle
-
-
Constructor Summary
Constructors Constructor Description ThreadContext()
ThreadContext(String contextId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate()
Activate the Context.Class<? extends Annotation>
getScope()
Get the scope type of the context object.-
Methods inherited from class org.jboss.weld.contexts.AbstractUnboundContext
cleanup, destroy, getBeanStore, setBeanStore
-
Methods inherited from class org.jboss.weld.contexts.AbstractManagedContext
deactivate, invalidate, isActive, isValid, removeState, setActive
-
Methods inherited from class org.jboss.weld.contexts.AbstractContext
checkContextInitialized, destroy, get, get, getContextual, getId, getServiceRegistry, isMultithreaded
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jakarta.enterprise.context.spi.AlterableContext
destroy
-
Methods inherited from interface org.jboss.weld.context.WeldAlterableContext
clearAndSet, getAllContextualInstances
-
-
-
-
Constructor Detail
-
ThreadContext
public ThreadContext(String contextId)
-
ThreadContext
public ThreadContext()
-
-
Method Detail
-
getScope
public Class<? extends Annotation> getScope()
Description copied from interface:Context
Get the scope type of the context object.- Returns:
- the scope
-
activate
public void activate()
Description copied from interface:ManagedContext
Activate the Context.- Specified by:
activate
in interfaceManagedContext
- Overrides:
activate
in classAbstractManagedContext
-
-