Package play.mvc
Class Http.Session
- Object
-
- play.mvc.Http.Session
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Http.Session
adding(String key, String value)
Returns a new session with the given key-value pair added.Http.Session
adding(Map<String,String> values)
Returns a new session with the values from the given map added.Optional<String>
apply(String key)
Deprecated.Deprecated as of 2.8.0.play.api.mvc.Session
asScala()
Convert this session to a Scala session.Map<String,String>
data()
Optional<String>
get(String key)
Optionally returns the session value associated with a key.Optional<String>
getOptional(String key)
Deprecated.Deprecated as of 2.8.0.Http.Session
removing(String... keys)
Returns a new session with the given keys removed.
-
-
-
Method Detail
-
get
public Optional<String> get(String key)
Optionally returns the session value associated with a key.
-
getOptional
@Deprecated public Optional<String> getOptional(String key)
Deprecated.Deprecated as of 2.8.0. Renamed toget(String)
.Optionally returns the session value associated with a key.
-
apply
@Deprecated public Optional<String> apply(String key)
Deprecated.Deprecated as of 2.8.0. Useget(String)
instead.Optionally returns the session value associated with a key.
-
removing
public Http.Session removing(String... keys)
Returns a new session with the given keys removed.
-
adding
public Http.Session adding(String key, String value)
Returns a new session with the given key-value pair added.
-
adding
public Http.Session adding(Map<String,String> values)
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.
-
-