public interface ContextSetupProvider extends Serializable
Modifier and Type | Method and Description |
---|---|
void |
reset(ContextHandle contextHandle)
Called by ManagedExecutorService after executing a task to clean up and
reset thread context.
|
ContextHandle |
saveContext(javax.enterprise.concurrent.ContextService contextService)
Called by ManagedExecutorService in the same thread that submits a
task to save the execution context of the submitting thread.
|
ContextHandle |
saveContext(javax.enterprise.concurrent.ContextService contextService,
Map<String,String> contextObjectProperties)
Called by ManagedExecutorService in the same thread that submits a
task to save the execution context of the submitting thread.
|
ContextHandle |
setup(ContextHandle contextHandle)
Called by ManagedExecutorService before executing a task to set up thread
context.
|
ContextHandle saveContext(javax.enterprise.concurrent.ContextService contextService)
contextService
- ContextService containing information on what
context should be savedContextHandle saveContext(javax.enterprise.concurrent.ContextService contextService, Map<String,String> contextObjectProperties)
contextService
- ContextService containing information on what
context should be savedcontextObjectProperties
- Additional properties specified for
for a context object when the ContextService object was created.ContextHandle setup(ContextHandle contextHandle) throws IllegalStateException
contextHandle
- The ContextHandle object obtained from the call
to #saveContextIllegalStateException
- if the ContextHandle is no longer valid.
For example, the application component that the ContextHandle was
created for is no longer running or is undeployed.void reset(ContextHandle contextHandle)
contextHandle
- The ContextHandle object obtained from the call
to #setupCopyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.