Class DefaultSessionManager
- java.lang.Object
-
- org.glassfish.grizzly.http.server.DefaultSessionManager
-
- All Implemented Interfaces:
SessionManager
public class DefaultSessionManager extends Object implements SessionManager
DefaultSessionManagerimplementation.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringchangeSessionId(Request request, Session session)Change theSessionid and return the original id.voidconfigureSessionCookie(Request request, org.glassfish.grizzly.http.Cookie cookie)Configure session cookie before adding it to theRequest.getResponse().SessioncreateSession(Request request)SessiongetSession(Request request, String requestedSessionId)Return the session associated with this Request, creating one if necessary and requested.StringgetSessionCookieName()static SessionManagerinstance()voidsetSessionCookieName(String name)Set the session cookie name that will be used by sessions created by thisSessionManager.
-
-
-
Method Detail
-
instance
public static SessionManager instance()
- Returns:
- DefaultSessionManager singleton
-
getSession
public Session getSession(Request request, String requestedSessionId)
Description copied from interface:SessionManagerReturn the session associated with this Request, creating one if necessary and requested.- Specified by:
getSessionin interfaceSessionManager- Parameters:
request-RequestrequestedSessionId- the session id associated with theRequest- Returns:
Session
-
createSession
public Session createSession(Request request)
Description copied from interface:SessionManager- Specified by:
createSessionin interfaceSessionManager- Parameters:
request-Request- Returns:
- a new
Sessionassociated with theRequest
-
changeSessionId
public String changeSessionId(Request request, Session session)
Description copied from interface:SessionManagerChange theSessionid and return the original id.- Specified by:
changeSessionIdin interfaceSessionManager- Parameters:
request-Requestsession-Session- Returns:
- the old session id
-
configureSessionCookie
public void configureSessionCookie(Request request, org.glassfish.grizzly.http.Cookie cookie)
Description copied from interface:SessionManagerConfigure session cookie before adding it to theRequest.getResponse().- Specified by:
configureSessionCookiein interfaceSessionManager
-
setSessionCookieName
public void setSessionCookieName(String name)
Description copied from interface:SessionManagerSet the session cookie name that will be used by sessions created by thisSessionManager.- Specified by:
setSessionCookieNamein interfaceSessionManager- Parameters:
name- the session cookie name
-
getSessionCookieName
public String getSessionCookieName()
- Specified by:
getSessionCookieNamein interfaceSessionManager- Returns:
- the session cookie name
-
-