Class GlobalContextHolderStrategy
-
- All Implemented Interfaces:
-
io.github.funofprograming.context.ApplicationContextHolderStrategy
public final class GlobalContextHolderStrategy extends AbstractApplicationContextHolderStrategy
-
-
Constructor Summary
Constructors Constructor Description GlobalContextHolderStrategy()
-
Method Summary
Modifier and Type Method Description <T extends ApplicationContext> KClass<T>supportedApplicationContextType()Get type of context supported by this holder strategy CoroutineScopeinitCoroutineScope(CoroutineScope coroutineScope)Initialize a new CoroutineScope which can hold ApplicationContext for all coroutines that use this scope -
Methods inherited from class io.github.funofprograming.context.impl.AbstractApplicationContextHolderStrategy
clearContext, existsContext, getContext, getContext, setContext -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
supportedApplicationContextType
<T extends ApplicationContext> KClass<T> supportedApplicationContextType()
Get type of context supported by this holder strategy
- Returns:
- </T>
-
initCoroutineScope
CoroutineScope initCoroutineScope(CoroutineScope coroutineScope)
Initialize a new CoroutineScope which can hold ApplicationContext for all coroutines that use this scope
- Parameters:
coroutineScope- if any existing coroutineScope passed then a new coroutineScope is created from that param and init for holding ApplicationContext
-
-
-
-