Trait/Object

io.youi.server.session

InMemorySessionManager

Related Docs: object InMemorySessionManager | package session

Permalink

trait InMemorySessionManager[Session] extends SessionManager[Session]

In-Memory session that only lives as long as the server is running

Session

the type of session

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

Abstract Value Members

  1. abstract def create(sessionId: String): Session

    Permalink

    Simple create function used by createBySessionId.

    Simple create function used by createBySessionId. For more advanced usage, extend createBySessionId.

    sessionId

    the session id to create a Session for

    Attributes
    protected
    Definition Classes
    SessionManager

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. def applySessionId(id: String, connection: HttpConnection): HttpConnection

    Permalink

    Applies a new session id to an HttpConnection.

    Applies a new session id to an HttpConnection. Creates a cookie and sets it on the HttpResponse.

    id

    the session id to apply

    connection

    the HttpConnection to use

    returns

    modified HttpConnection

    Attributes
    protected
    Definition Classes
    SessionManager
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def createBySessionId(sessionId: String, connection: HttpConnection): Future[SessionTransaction[Session]]

    Permalink

    Creates a new session by session id

    Creates a new session by session id

    sessionId

    the session id to create from

    connection

    the HttpConnection to work with

    returns

    a future SessionTransaction[Session]

    Attributes
    protected
    Definition Classes
    SessionManager
  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. def generateSessionId: String

    Permalink

    Generates a unique id for use when creating a new session

    Generates a unique id for use when creating a new session

    Attributes
    protected
    Definition Classes
    SessionManager
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def getOrCreateSessionId(connection: HttpConnection): (HttpConnection, String)

    Permalink

    Gets a session id if it already exists or creates a new one (and applies it on the HttpConnection) if it doesn't already exist.

    Gets a session id if it already exists or creates a new one (and applies it on the HttpConnection) if it doesn't already exist.

    connection

    the HttpConnection to use

    returns

    a tuple with the potentially modified HttpConnection and the session id

    Attributes
    protected
    Definition Classes
    SessionManager
  14. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  16. def loadBySessionId(sessionId: String, connection: HttpConnection): Future[Option[SessionTransaction[Session]]]

    Permalink

    Loads a session by id if available and creates a SessionTransaction wrapper

    Loads a session by id if available and creates a SessionTransaction wrapper

    sessionId

    the session id to load from

    connection

    the HttpConnection to work with

    returns

    a future SessionTransaction[Session] if one is persisted for this manager

    Attributes
    protected
    Definition Classes
    InMemorySessionManagerSessionManager
  17. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  20. def save(transaction: SessionTransaction[Session]): Future[SessionTransaction[Session]]

    Permalink

    Saves a potentially modified Session to this manager

    Saves a potentially modified Session to this manager

    transaction

    the transaction to persist from

    returns

    a potentially modified HttpConnection

    Attributes
    protected
    Definition Classes
    InMemorySessionManagerSessionManager
  21. def session(connection: HttpConnection, f: (SessionTransaction[Session]) ⇒ Future[SessionTransaction[Session]], requestModifiable: Boolean): Future[SessionTransaction[Session]]

    Permalink

    Manages the entire transaction process of working with a session

    Manages the entire transaction process of working with a session

    connection

    the HttpConnection to work with

    f

    the transaction handling function to apply

    requestModifiable

    true if the request can be modified

    returns

    the final, modified HttpConnection

    Attributes
    protected
    Definition Classes
    SessionManager
  22. def sessionId(connection: HttpConnection): Option[String]

    Permalink

    Retrieves the session id from the request / response cookies if available.

    Retrieves the session id from the request / response cookies if available.

    connection

    the HttpConnection to look in

    returns

    the session id if found

    Attributes
    protected
    Definition Classes
    SessionManager
  23. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def withConnection(connection: Connection)(f: (SessionTransaction[Session]) ⇒ Future[SessionTransaction[Session]] = t => Future.successful(t)): Future[Session]

    Permalink

    Functional use of a Session via a transaction that is fully managed with the result being updated to the manager

    Functional use of a Session via a transaction that is fully managed with the result being updated to the manager

    connection

    the HttpConnection to work with

    f

    the functionality to work with and potentially modify a session instance

    returns

    Future[Unit] since Connection cannot modify the state of HttpConnection

    Definition Classes
    SessionManager
  29. def withHttpConnection(connection: HttpConnection)(f: (SessionTransaction[Session]) ⇒ Future[SessionTransaction[Session]] = t => Future.successful(t)): Future[SessionTransaction[Session]]

    Permalink

    Functional use of a Session via a transaction that is fully managed with the result being updated to the manager

    Functional use of a Session via a transaction that is fully managed with the result being updated to the manager

    connection

    the HttpConnection to work with

    f

    the functionality to work with and potentially modify a session instance

    returns

    potentially modified HttpConnection

    Definition Classes
    SessionManager

Inherited from SessionManager[Session]

Inherited from AnyRef

Inherited from Any

Ungrouped