Interface SessionId


  • public interface SessionId
    A handle to the session ID.

    It is generally not necessary to use this type directly. It is used by the provided impl of Session to discover (and generate) the session ID.

    The SessionModule provides a default implementation of this type that uses SessionIdGenerator, and a cookie, based on SessionCookieConfig to store the session id.

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      static SessionId constant​(io.netty.util.AsciiString value)
      A session ID that always returns the same value.
      static SessionId empty()
      A session ID that is always empty.
      io.netty.util.AsciiString getValue()
      Get the session ID value, generating a new one if necessary.
      void terminate()
      Terminate the current session id, disassociating it from the current user.
    • Method Detail

      • getValue

        io.netty.util.AsciiString getValue()
        Get the session ID value, generating a new one if necessary.
        Returns:
        the session id value
      • terminate

        void terminate()
        Terminate the current session id, disassociating it from the current user.
      • constant

        static SessionId constant​(io.netty.util.AsciiString value)
        A session ID that always returns the same value. Suitable to use if no session ID is required, and if using client side sessions.
        Parameters:
        value - the session ID value
        Returns:
        the session ID
        Since:
        1.7
      • empty

        static SessionId empty()
        A session ID that is always empty. Suitable to use if no session ID is required, and if using client side sessions.
        Returns:
        the session ID
        Since:
        1.7