Package org.jboss.as.ee.concurrent
Class ConcurrentContext
- java.lang.Object
-
- org.jboss.as.ee.concurrent.ConcurrentContext
-
public class ConcurrentContext extends Object
Manages context handle factories, it is used by EE Context Services to save the invocation context.- Author:
- Eduardo Martins
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTEXT_HANDLE_FACTORY_NAMEthe name of the factory used by the chained context handles
-
Constructor Summary
Constructors Constructor Description ConcurrentContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFactory(ContextHandleFactory factory)Adds a new factory.static ConcurrentContextcurrent()Retrieves the current context in the current thread.static ConcurrentContextpopCurrent()Pops the current context in the current thread.static voidpushCurrent(ConcurrentContext context)Sets the specified context as the current one, in the current thread.SetupContextHandlesaveContext(jakarta.enterprise.concurrent.ContextService contextService, Map<String,String> contextObjectProperties)Saves the current invocation context on a chained context handle.voidsetServiceName(org.jboss.msc.service.ServiceName serviceName)
-
-
-
Field Detail
-
CONTEXT_HANDLE_FACTORY_NAME
public static final String CONTEXT_HANDLE_FACTORY_NAME
the name of the factory used by the chained context handles- See Also:
- Constant Field Values
-
-
Method Detail
-
pushCurrent
public static void pushCurrent(ConcurrentContext context)
Sets the specified context as the current one, in the current thread.- Parameters:
context- The current context
-
popCurrent
public static ConcurrentContext popCurrent()
Pops the current context in the current thread.- Returns:
-
current
public static ConcurrentContext current()
Retrieves the current context in the current thread.- Returns:
-
setServiceName
public void setServiceName(org.jboss.msc.service.ServiceName serviceName)
- Parameters:
serviceName-
-
addFactory
public void addFactory(ContextHandleFactory factory)
Adds a new factory.- Parameters:
factory-
-
saveContext
public SetupContextHandle saveContext(jakarta.enterprise.concurrent.ContextService contextService, Map<String,String> contextObjectProperties)
Saves the current invocation context on a chained context handle.- Parameters:
contextService-contextObjectProperties-- Returns:
-
-