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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getChainPriority()
The factory priority is used to define the order of handles when chained.String
getName()
Retrieves the factory's name.SetupContextHandle
readSetupContextHandle(ObjectInputStream in)
Reads a handle from the specified input stream.SetupContextHandle
saveContext(jakarta.enterprise.concurrent.ContextService contextService, Map<String,String> contextObjectProperties)
void
writeSetupContextHandle(SetupContextHandle contextHandle, ObjectOutputStream out)
Writes the handle to the specified output stream.
-
-
-
Method Detail
-
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:
IOException
ClassNotFoundException
-
-