Packages

case class Session(data: Map[String, String] = Map.empty) extends Product with Serializable

HTTP Session.

Session data are encoded into an HTTP cookie, and can only contain simple String values.

Source
Session.scala
Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Session
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Session(data: Map[String, String] = Map.empty)

Value Members

  1. def +(kv: (String, String)): Session

    Returns a new session with the given key-value pair added.

    Returns a new session with the given key-value pair added.

    For example:

    session + ("username" -> "bob")
    kv

    the key-value pair to add

    returns

    the modified session

  2. def ++(kvs: Iterable[(String, String)]): Session

    Returns a new session with elements added from the given Iterable.

    Returns a new session with elements added from the given Iterable.

    kvs

    an Iterable containing key-value pairs to add.

  3. def -(key: String): Session

    Returns a new session with the given key removed.

    Returns a new session with the given key removed.

    For example:

    session - "username"
    key

    the key to remove

    returns

    the modified session

  4. def --(keys: Iterable[String]): Session

    Returns a new session with the given keys removed.

    Returns a new session with the given keys removed.

    For example:

    session -- Seq("username", "name")
    keys

    the keys to remove

    returns

    the modified session

  5. def apply(key: String): String

    Retrieves the session value associated with the given key.

    Retrieves the session value associated with the given key.

    Exceptions thrown

    NoSuchElementException if no value exists for the key.

  6. lazy val asJava: mvc.Http.Session
  7. val data: Map[String, String]
  8. def get(key: String): Option[String]

    Optionally returns the session value associated with a key.

  9. def isEmpty: Boolean

    Returns true if this session is empty.

  10. def productElementNames: Iterator[String]
    Definition Classes
    Product