Package play.mvc

Class Scope.Session

  • Enclosing class:
    Scope

    public static class Scope.Session
    extends java.lang.Object
    Session scope
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.ThreadLocal<Scope.Session> current  
    • Constructor Summary

      Constructors 
      Constructor Description
      Session()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.String> all()  
      void clear()  
      boolean contains​(java.lang.String key)  
      static Scope.Session current()  
      java.lang.String get​(java.lang.String key)  
      java.lang.String getAuthenticityToken()  
      java.lang.String getId()  
      boolean isEmpty()
      Returns true if the session is empty, e.g.
      void put​(java.lang.String key, java.lang.Object value)  
      void put​(java.lang.String key, java.lang.String value)  
      boolean remove​(java.lang.String key)  
      void remove​(java.lang.String... keys)  
      static Scope.Session restore()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • current

        public static final java.lang.ThreadLocal<Scope.Session> current
    • Constructor Detail

      • Session

        public Session()
    • Method Detail

      • getId

        public java.lang.String getId()
      • all

        public java.util.Map<java.lang.String,​java.lang.String> all()
      • getAuthenticityToken

        public java.lang.String getAuthenticityToken()
      • put

        public void put​(java.lang.String key,
                        java.lang.String value)
      • put

        public void put​(java.lang.String key,
                        java.lang.Object value)
      • get

        public java.lang.String get​(java.lang.String key)
      • remove

        public boolean remove​(java.lang.String key)
      • remove

        public void remove​(java.lang.String... keys)
      • clear

        public void clear()
      • isEmpty

        public boolean isEmpty()
        Returns true if the session is empty, e.g. does not contain anything else than the timestamp
        Returns:
        true if the session is empty, otherwise false
      • contains

        public boolean contains​(java.lang.String key)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object