trait Session extends SessionImpl with AutoCloseable
Session manages injected objects (e.g., Singleton)
- Alphabetic
- By Inheritance
- Session
- AutoCloseable
- SessionImpl
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def design: Design
Reference to the design used for creating this session.
- abstract def get[A](surface: Surface)(implicit sourceCode: SourceCode): A
Internal method for building an instance of type A.
Internal method for building an instance of type A. This method does not inject the session to A at first hand.
- abstract def getInstanceOf(surface: Surface)(implicit sourceCode: SourceCode): Any
- abstract def getOrElse[A](surface: Surface, traitInstanceFactory: => A)(implicit sourceCode: SourceCode): A
Internal method for building an instance of type A, or if no binding is found, use the given trait instance factory
- abstract def lifeCycleManager: LifeCycleManager
Get the object LifeCycleManager of this session.
- abstract def name: String
Name of the session (default: object hash code)
- abstract def newChildSession(d: Design = Design.blanc, inheritParentDesignOptions: Boolean = true): Session
Create a child session with an additional design.
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.
- 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
- abstract def newSharedChildSession(d: Design): Session
Create a child session with an additional design.
Create a child session with an additional design. The created session shares the same singleton holder and the lifecycle manager with this session.
- abstract def register[A](instance: A)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[A]): Unit
Register an instance to the session to control the life cycle of the object under this session.
Register an instance to the session to control the life cycle of the object under this session.
- Definition Classes
- SessionImpl
- abstract def sessionId: Long
Id of the sesion (= object hash id)
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- macro def build[A]: A
Build an instance of A.
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
- Definition Classes
- SessionImpl
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def close(): Unit
- Definition Classes
- Session → AutoCloseable
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def shutdown: Unit
- def start: Unit
- def start[U](body: => U): U
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withChildSession[U](d: Design = Design.blanc)(body: (Session) => U): U
Create a child session and execute the body part.
Create a child session and execute the body part. The created session has its own singleton holder and lifecycle manager.
- d
Additional design for child session.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)