Interface CookieSerializer
- All Known Implementing Classes:
DefaultCookieSerializer
public interface CookieSerializer
Strategy for reading and writing a cookie value to the
HttpServletResponse.- Since:
- 1.1
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classContains the information necessary to write a value to theHttpServletResponse. -
Method Summary
Modifier and TypeMethodDescriptionreadCookieValues(javax.servlet.http.HttpServletRequest request) Reads all the matching cookies from theHttpServletRequest.voidwriteCookieValue(CookieSerializer.CookieValue cookieValue) Writes a givenCookieSerializer.CookieValueto the providedHttpServletResponse.
-
Method Details
-
writeCookieValue
Writes a givenCookieSerializer.CookieValueto the providedHttpServletResponse.- Parameters:
cookieValue- theCookieSerializer.CookieValueto write toCookieSerializer.CookieValue.getResponse(). Cannot be null.
-
readCookieValues
Reads all the matching cookies from theHttpServletRequest. The result is a List since there can be multipleCookiein 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- theHttpServletRequestto read the cookie from. Cannot be null.- Returns:
- the values of all the matching cookies
-