Package-level declarations

Types

Link copied to clipboard

Abstract implementation of {@linkplain ApplicationContextMergeStrategy}

Link copied to clipboard
open class ApplicationContextImpl(name: String, permittedKeys: Set<Key<*>>? = null) : ApplicationContext

Plain vanilla implementation of {@linkplain ApplicationContext}

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Clear Global context for given name and return back the context

Link copied to clipboard

Clear ThreadLocal context for given name and return back the context

Link copied to clipboard
fun existsGlobalContext(name: String, permittedKeys: Set<Key<*>>?): Boolean

Check if Global context with given name and permittedKeys exists

Link copied to clipboard
fun existsThreadLocalContext(name: String, permittedKeys: Set<Key<*>>?): Boolean

Check if ThreadLocal context with given name and permittedKeys exists

Link copied to clipboard

Get a Global context for given name. If not available then create one, set in holder and return back.

fun getGlobalContext(name: String, permittedKeys: Set<Key<*>>?): ApplicationContext?

Same as getGlobalContext but with permittedKeys. If context already exist with different set of keys then this method should throw InvalidKeyException

Link copied to clipboard

Get a ThreadLocal context for given name. If not available then create one, set in holder and return back.

fun getThreadLocalContext(name: String, permittedKeys: Set<Key<*>>?): ApplicationContext?

Same as getThreadLocalContext but with permittedKeys. If context already exist with different set of keys then this method should throw InvalidKeyException

Link copied to clipboard
suspend fun initCoroutineScopeForApplicationContext(coroutineScope: CoroutineScope? = null): CoroutineScope

Initialize a new CoroutineScope which can hold ApplicationContext for all coroutines that use this scope

Link copied to clipboard
fun setGlobalContext(applicationContext: ApplicationContext)

Set any externally created Global context into the context holder strategy. If any context with this name already exist then this method should throw InvalidContextException

Link copied to clipboard
fun setThreadLocalContext(applicationContext: ApplicationContext)

Set any externally created ThreadLocal context into the context holder strategy. If any context with this name already exist then this method should throw InvalidContextException