Interface CookieSerializer

All Known Implementing Classes:
DefaultCookieSerializer

public interface CookieSerializer
Strategy for reading and writing a cookie value to the HttpServletResponse.
Since:
1.1
  • Method Details

    • writeCookieValue

      void writeCookieValue(CookieSerializer.CookieValue cookieValue)
      Writes a given CookieSerializer.CookieValue to the provided HttpServletResponse.
      Parameters:
      cookieValue - the CookieSerializer.CookieValue to write to CookieSerializer.CookieValue.getResponse(). Cannot be null.
    • readCookieValues

      List<String> readCookieValues(javax.servlet.http.HttpServletRequest request)
      Reads all the matching cookies from the HttpServletRequest. The result is a List since there can be multiple Cookie in a single request with a matching name. For example, one Cookie may have a path of / and another of /context, but the path is not transmitted in the request.
      Parameters:
      request - the HttpServletRequest to read the cookie from. Cannot be null.
      Returns:
      the values of all the matching cookies