Interface ContextHandleFactory
- All Known Subinterfaces:
EE10ContextHandleFactory
- All Known Implementing Classes:
ClassLoaderContextHandleFactory,NamingContextHandleFactory,OtherEESetupActionsContextHandleFactory,ThreadContextProviderContextHandleFactory,TransactionContextHandleFactory,TransactionLeakContextHandleFactory
public interface ContextHandleFactory
The factory responsible for creating the context handles with the current context saved
- Author:
- Eduardo Martins
-
Method Summary
Modifier and TypeMethodDescriptionintThe factory priority is used to define the order of handles when chained.getName()Retrieves the factory's name.Reads a handle from the specified input stream.saveContext(jakarta.enterprise.concurrent.ContextService contextService, Map<String, String> contextObjectProperties) voidwriteSetupContextHandle(SetupContextHandle contextHandle, ObjectOutputStream out) Writes the handle to the specified output stream.
-
Method Details
-
saveContext
SetupContextHandle saveContext(jakarta.enterprise.concurrent.ContextService contextService, Map<String, String> contextObjectProperties) - Parameters:
contextService-contextObjectProperties-- Returns:
- See Also:
-
ContextSetupProvider.saveContext(jakarta.enterprise.concurrent.ContextService, java.util.Map)
-
getChainPriority
int getChainPriority()The factory priority is used to define the order of handles when chained. The handle with the lowest priority is the first in the chain.- Returns:
-
getName
String getName()Retrieves the factory's name.- Returns:
-
writeSetupContextHandle
void writeSetupContextHandle(SetupContextHandle contextHandle, ObjectOutputStream out) throws IOException Writes the handle to the specified output stream.- Parameters:
contextHandle-out-- Throws:
IOException
-
readSetupContextHandle
SetupContextHandle readSetupContextHandle(ObjectInputStream in) throws IOException, ClassNotFoundException Reads a handle from the specified input stream.- Parameters:
in-- Returns:
- Throws:
IOExceptionClassNotFoundException
-