Package play.mvc

Class Http.Session

  • Enclosing class:
    Http

    public static class Http.Session
    extends Object
    HTTP Session.

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

    • Constructor Detail

      • Session

        public Session()
      • Session

        public Session​(play.api.mvc.Session underlying)
    • Method Detail

      • get

        public Optional<String> get​(String key)
        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.