java.lang.Object
org.apache.wicket.protocol.http.mock.Cookies
A helper class for dealing with cookies
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic jakarta.servlet.http.Cookie
copyOf
(jakarta.servlet.http.Cookie cookie) Make a copy of the passed cookie.static boolean
isEqual
(jakarta.servlet.http.Cookie c1, jakarta.servlet.http.Cookie c2) Checks whether two cookies are equal.static boolean
isExpired
(jakarta.servlet.http.Cookie cookie) detect if this cookie is expiredstatic Cookies.Key
keyOf
(jakarta.servlet.http.Cookie cookie) creates a key based on the property for cookie equality
-
Method Details
-
copyOf
Make a copy of the passed cookie.- Parameters:
cookie
- The cookie to copy- Returns:
- A copy of the passed cookie. May be
null
if the argument isnull
.
-
keyOf
creates a key based on the property for cookie equality- Parameters:
cookie
- cookie- Returns:
- key
-
isEqual
Checks whether two cookies are equal. See http://www.ietf.org/rfc/rfc2109.txt, p.4.3.3- Parameters:
c1
- the first cookiec2
- the second cookie- Returns:
true
only if the cookies have the same name, path and domain
-
isExpired
detect if this cookie is expired- Parameters:
cookie
-- Returns:
-