trait Session extends AutoCloseable
Session manages injected objects (e.g., Singleton)
- Alphabetic
- By Inheritance
- Session
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
design: Design
Reference to the design used for creating this session.
- abstract def getInstanceOf(surface: Surface)(implicit sourceCode: SourceCode): Any
-
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.
-
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
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
close(): Unit
- Definition Classes
- Session → AutoCloseable
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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
- Deprecated
(Since version ) see corresponding Javadoc for more information.