Package play.mvc
Class Http.Session
java.lang.Object
play.mvc.Http.Session
- Enclosing class:
- Http
HTTP Session.
Session data are encoded into an HTTP cookie, and can only contain simple String
values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a new session with the given key-value pair added.Returns a new session with the values from the given map added.Deprecated.Deprecated as of 2.8.0.play.api.mvc.SessionasScala()Convert this session to a Scala session.data()Optionally returns the session value associated with a key.getOptional(String key) Deprecated.Deprecated as of 2.8.0.Returns a new session with the given keys removed.
-
Constructor Details
-
Session
public Session() -
Session
-
Session
public Session(play.api.mvc.Session underlying)
-
-
Method Details
-
data
-
get
Optionally returns the session value associated with a key. -
getOptional
Deprecated.Deprecated as of 2.8.0. Renamed toget(String).Optionally returns the session value associated with a key. -
apply
Deprecated.Deprecated as of 2.8.0. Useget(String)instead.Optionally returns the session value associated with a key. -
removing
Returns a new session with the given keys removed. -
adding
Returns a new session with the given key-value pair added. -
adding
Returns a new session with the values from the given map added. -
asScala
public play.api.mvc.Session asScala()Convert this session to a Scala session.- Returns:
- the Scala session.
-