Package org.jboss.as.ee.concurrent
Class ConcurrentContext
java.lang.Object
org.jboss.as.ee.concurrent.ConcurrentContext
Manages context handle factories, it is used by EE Context Services to save the invocation context.
- Author:
- Eduardo Martins
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringthe name of the factory used by the chained context handles -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFactory(ContextHandleFactory factory) Adds a new factory.static ConcurrentContextcurrent()Retrieves the current context in the current thread.static ConcurrentContextPops the current context in the current thread.static voidpushCurrent(ConcurrentContext context) Sets the specified context as the current one, in the current thread.saveContext(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 Details
-
CONTEXT_HANDLE_FACTORY_NAME
the name of the factory used by the chained context handles- See Also:
-
-
Constructor Details
-
ConcurrentContext
public ConcurrentContext()
-
-
Method Details
-
pushCurrent
Sets the specified context as the current one, in the current thread.- Parameters:
context- The current context
-
popCurrent
Pops the current context in the current thread.- Returns:
-
current
Retrieves the current context in the current thread.- Returns:
-
setServiceName
public void setServiceName(org.jboss.msc.service.ServiceName serviceName) - Parameters:
serviceName-
-
addFactory
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:
-