Interface SessionDao

All Known Implementing Classes:
RedisSessionDao, ServletSessionDao

public interface SessionDao
The Session Data Access Object interface.
Author:
Martin Lindström, Felix Hellman
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    read(String key, Class<T> tClass, jakarta.servlet.http.HttpServletRequest request)
    Reads the object identified by key of type tClass.
    void
    remove(String key, jakarta.servlet.http.HttpServletRequest request)
    Removes the object identified by key.
    void
    write(String key, Object value, jakarta.servlet.http.HttpServletRequest request)
    Writes object value under the key key.
  • Method Details

    • write

      void write(String key, Object value, jakarta.servlet.http.HttpServletRequest request)
      Writes object value under the key key.
      Parameters:
      key - the object key
      value - the object
      request - the HTTP servlet request
    • read

      <T> T read(String key, Class<T> tClass, jakarta.servlet.http.HttpServletRequest request)
      Reads the object identified by key of type tClass.
      Type Parameters:
      T - the type
      Parameters:
      key - the object key
      tClass - the type of the object to read
      request - the HTTP servlet request
      Returns:
      the object, or null if none is available
    • remove

      void remove(String key, jakarta.servlet.http.HttpServletRequest request)
      Removes the object identified by key.
      Parameters:
      key - the object key
      request - the HTTP servlet request