Class DefaultSessionKey

  • All Implemented Interfaces:
    , SessionKey

    public class DefaultSessionKey
    extends 
    implements 
    Default implementation of the SessionKey interface, which allows setting and retrieval of a concrete sessionId that the SessionManager implementation can use to look up a Session instance.
    Since:
    1.0
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultSessionKey()  
       sessionId)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      getSessionId()
      Returns the id of the session to acquire.
      void  sessionId)  
      • Methods inherited from class java.lang.

        , , , , , , , , , ,
    • Constructor Detail

      • DefaultSessionKey

        public DefaultSessionKey()
      • DefaultSessionKey

        public DefaultSessionKey​( sessionId)
    • Method Detail

      • setSessionId

        public void setSessionId​( sessionId)
      • getSessionId

        public  getSessionId()
        Description copied from interface: SessionKey
        Returns the id of the session to acquire.

        Acquiring sessions by ID only is a suitable strategy when sessions are natively managed by Shiro directly. For example, the Servlet specification does not have an API that allows session acquisition by session ID, so the session ID alone is not sufficient for ServletContainer-based SessionManager implementations.

        Specified by:
        getSessionId in interface SessionKey
        Returns:
        the id of the session to acquire.