AppContext
Application context is a way, to resolve components dependencies. Each component should provide an AppContextProvider, and AppContext[Component] will instantiate this components with dependencies.
Attributes
- Source
- AppContext.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
AppContext.type
Members list
Type members
Types
Type for component cache. By convention, if component depends from cache then it's AppContextProvider should check if this component is already in cache and instantiate new (and update cache) only if it's not found.
Type for component cache. By convention, if component depends from cache then it's AppContextProvider should check if this component is already in cache and instantiate new (and update cache) only if it's not found.
Attributes
- Source
- AppContext.scala
Type for cache key. By convention, usually this is a type.show.
Value members
Concrete methods
Get component from application context. For this component should have an implicit AppContextProvider.
Get component from application context. For this component should have an implicit AppContextProvider.
Type parameters
- T
-
- component to instantiate
Attributes
- See also
-
AppContextProvider
- Source
- AppContext.scala
Attributes
- Source
- AppContext.scala
Attributes
- Source
- AppContext.scala
Create empty cache.
Extensions
Extensions
Get component from cache.
Get component from cache.
Type parameters
- T
-
- component type
Attributes
- Returns
-
Some(component) or None if component is not found.
- Source
- AppContext.scala
Get component from cache or create new one and update cache.
Get component from cache or create new one and update cache.
Type parameters
- T
-
- component type
Value parameters
- value
-
- function to create new component
Attributes
- Returns
-
just created or cached component
- Source
- AppContext.scala
Modify component in cache.
Modify component in cache.
Type parameters
- T
-
- component type
Value parameters
- f
-
- function to remap
Attributes
- Source
- AppContext.scala
Put component to cache, replacing old if needed
Remove component from cache.