Trait/Object

wvlet.airframe

Session

Related Docs: object Session | package airframe

Permalink

trait Session extends AutoCloseable

Session manages injected objects (e.g., Singleton)

Linear Supertypes
AutoCloseable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Session
  2. AutoCloseable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def design: Design

    Permalink

    Reference to the design used for creating this session.

  2. abstract def getInstanceOf(surface: Surface)(implicit sourceCode: SourceCode): Any

    Permalink
  3. abstract def lifeCycleManager: LifeCycleManager

    Permalink

    Get the object LifeCycleManager of this session.

  4. abstract def name: String

    Permalink

    Name of the session (default: object hash code)

  5. abstract def newChildSession(d: Design = Design.blanc, inheritParentDesignOptions: Boolean = true): Session

    Permalink

    Create a child session with an additional design.

    Create a child session with an additional design. The created session has its own singleton hodler and a lifecycle manager.

    - Child sessions tries to delegate the object binding to the parent (or ansector) 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

  6. abstract def newSharedChildSession(d: Design): Session

    Permalink

    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.

  7. abstract def register[A](instance: A)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[A]): Unit

    Permalink

    Register an instance to the session to control the life cycle of the object under this session.

  8. abstract def sessionId: Long

    Permalink

    Id of the sesion (= object hash id)

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. macro def build[A]: A

    Permalink

    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

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def close(): Unit

    Permalink
    Definition Classes
    Session → AutoCloseable
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. def shutdown: Unit

    Permalink
  18. def start: Unit

    Permalink
  19. def start[U](body: ⇒ U): U

    Permalink
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. def withChildSession[U](d: Design = Design.blanc)(body: (Session) ⇒ U): U

    Permalink

    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.

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped