public class PxtCookieManager
extends java.lang.Object
This class is thread-safe.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_PATH |
static java.lang.String |
PXT_SESSION_COOKIE_NAME
The name of the pxt session cookie
|
Constructor and Description |
---|
PxtCookieManager() |
Modifier and Type | Method and Description |
---|---|
javax.servlet.http.Cookie |
createPxtCookie(java.lang.Long pxtSessionId,
javax.servlet.http.HttpServletRequest request,
int timeout)
Creates a new pxt cookie with the specified session id and timeout.
|
javax.servlet.http.Cookie |
getPxtCookie(javax.servlet.http.HttpServletRequest request)
Retrieves the pxt cookie from the request if one is included in the request.
|
public static final java.lang.String PXT_SESSION_COOKIE_NAME
public static final java.lang.String DEFAULT_PATH
public javax.servlet.http.Cookie createPxtCookie(java.lang.Long pxtSessionId, javax.servlet.http.HttpServletRequest request, int timeout)
pxtSessionId
- The id of the pxt session for which the cookie is being created.request
- The current request.timeout
- The max age of the cookie in seconds.public javax.servlet.http.Cookie getPxtCookie(javax.servlet.http.HttpServletRequest request)
request
- The current request.null
if no cookie is
found.