public final class GrizzlySessionManager extends Object implements org.glassfish.grizzly.http.server.SessionManager
| Modifier and Type | Class and Description |
|---|---|
static class |
GrizzlySessionManager.Binder
HK2 Binder for our injector context.
|
| Constructor and Description |
|---|
GrizzlySessionManager(SystemConfiguration c,
javax.inject.Provider<org.hibernate.SessionFactory> sfProvider)
Create a new instance of this session manager.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.glassfish.grizzly.http.server.Session |
asSession(HttpSession entity)
Convert a database entity session to a regular detached grizzly session.
|
String |
changeSessionId(org.glassfish.grizzly.http.server.Request request,
org.glassfish.grizzly.http.server.Session session)
Change the session ID of a provided session in-place.
|
void |
configureSessionCookie(org.glassfish.grizzly.http.server.Request request,
org.glassfish.grizzly.http.Cookie cookie)
Configure session cookie before adding it to the
Request.getResponse(). |
org.glassfish.grizzly.http.server.Session |
createSession(org.glassfish.grizzly.http.server.Request request)
Create a new
Session associated with the Request. |
org.glassfish.grizzly.http.server.Session |
getSession(org.glassfish.grizzly.http.server.Request request,
String requestedSessionId)
Return the session associated with this Request.
|
String |
getSessionCookieName()
Return the current session cookie name.
|
void |
setSessionCookieName(String name)
Set the current session cookie name.
|
@Inject public GrizzlySessionManager(SystemConfiguration c, javax.inject.Provider<org.hibernate.SessionFactory> sfProvider)
c - The system configuration.sfProvider - The session factory provider.public org.glassfish.grizzly.http.server.Session getSession(org.glassfish.grizzly.http.server.Request request,
String requestedSessionId)
getSession in interface org.glassfish.grizzly.http.server.SessionManagerrequest - RequestrequestedSessionId - the session id associated with the
RequestSessionpublic org.glassfish.grizzly.http.server.Session createSession(org.glassfish.grizzly.http.server.Request request)
Session associated with the Request.createSession in interface org.glassfish.grizzly.http.server.SessionManagerrequest - RequestSession associated with the Requestpublic String changeSessionId(org.glassfish.grizzly.http.server.Request request, org.glassfish.grizzly.http.server.Session session)
changeSessionId in interface org.glassfish.grizzly.http.server.SessionManagerrequest - The request context.session - The session whose ID to change.public String getSessionCookieName()
getSessionCookieName in interface org.glassfish.grizzly.http.server.SessionManagerpublic void setSessionCookieName(String name)
setSessionCookieName in interface org.glassfish.grizzly.http.server.SessionManagername - The name of the cookie.public void configureSessionCookie(org.glassfish.grizzly.http.server.Request request,
org.glassfish.grizzly.http.Cookie cookie)
Request.getResponse().configureSessionCookie in interface org.glassfish.grizzly.http.server.SessionManagerrequest - The request.cookie - The cookie to configure.protected org.glassfish.grizzly.http.server.Session asSession(HttpSession entity)
entity - The entity to convert.Copyright © 2018 krotscheck.net. All rights reserved.