Packages

t

io.youi.server.session

SessionManager

trait SessionManager[Session] extends AnyRef

SessionManager must be implemented in order to have support for sessions

Session

the type of session

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SessionManager
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def create(sessionId: String): Future[Session]

    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
  2. abstract def loadBySessionId(sessionId: String, connection: HttpConnection): Future[Option[SessionTransaction[Session]]]

    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
  3. abstract def save(transaction: SessionTransaction[Session]): Future[SessionTransaction[Session]]

    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

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def applySessionId(id: String, connection: HttpConnection): HttpConnection

    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. Also updates the URL if applyToURL is true.

    id

    the session id to apply

    connection

    the HttpConnection to use

    returns

    modified HttpConnection

    Attributes
    protected
  5. def applyToURL: Boolean

    Set to true to apply the session id to the URL.

    Set to true to apply the session id to the URL. Defaults to false.

    Attributes
    protected
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. def createBySessionId(sessionId: String, connection: HttpConnection): Future[SessionTransaction[Session]]

    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
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def generateSessionId: String

    Generates a unique id for use when creating a new session

    Generates a unique id for use when creating a new session

    Attributes
    protected
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def getOrCreateSessionId(connection: HttpConnection): (HttpConnection, String)

    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
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. def session(connection: HttpConnection, f: (SessionTransaction[Session]) ⇒ Future[SessionTransaction[Session]], requestModifiable: Boolean): Future[SessionTransaction[Session]]

    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
  21. def sessionId(connection: HttpConnection): Option[String]

    Retrieves the session id from the request / response cookies if available and from the URL if applyToURL is true.

    Retrieves the session id from the request / response cookies if available and from the URL if applyToURL is true.

    connection

    the HttpConnection to look in

    returns

    the session id if found

    Attributes
    protected
  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  27. def withConnection(connection: Connection)(f: (SessionTransaction[Session]) ⇒ Future[SessionTransaction[Session]] = t => Future.successful(t)): Future[Session]
  28. def withHttpConnection(connection: HttpConnection)(f: (SessionTransaction[Session]) ⇒ Future[SessionTransaction[Session]] = t => Future.successful(t)): Future[SessionTransaction[Session]]

    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

  29. def withWebSocketListener(listener: WebSocketListener)(f: (SessionTransaction[Session]) ⇒ Future[SessionTransaction[Session]] = t => Future.successful(t)): Future[Session]

    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

    listener

    the WebSocketListener

    f

    the functionality to work with and potentially modify a session instance

    returns

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

Inherited from AnyRef

Inherited from Any

Ungrouped