Session manages injected objects (e.g., Singleton)
- Companion:
- object
Value members
Abstract methods
Reference to the design used for creating this session.
Reference to the design used for creating this session.
Internal method for building an instance of type A. This method does not inject the session to A at first hand.
Internal method for building an instance of type A. This method does not inject the session to A at first hand.
Internal method for building an instance of type A, or if no binding is found, use the given trait instance factory
Internal method for building an instance of type A, or if no binding is found, use the given trait instance factory
Create a child session with an additional design. The created session has its own singleton holder and a lifecycle manager.
Create a child session with an additional design. The created session has its own singleton holder and a lifecycle manager.
- Child sessions tries to delegate the object binding to the parent (or ancestor) session if no corresponding binding is defined in the child design.
- If the parent and ancestors ve no binding for a given type, it will creates a new object in the child session.
- If the parent or an ancestor session already initialized a target binding, lifecycle hooks for that binding will not be called in the child session.
- Value parameters:
- d
Additional design for child session
- inheritParentDesignOptions
if true (default) use the same design options (e.g., production mode, life cycle logging) with the parent design
Concrete methods
Inherited methods
Build an instance of A. In general this method is necessary only when creating an entry point of your application. When feasible avoid using this method so that Airframe can inject objects where bind[X] is used.
Build an instance of A. In general this method is necessary only when creating an entry point of your application. When feasible avoid using this method so that Airframe can inject objects where bind[X] is used.
- Returns:
object
- Inherited from:
- SessionImpl